Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] Instance openwisp_config::instance1 s in a crash loop x #223

Open
kellerman opened this issue Oct 17, 2024 · 6 comments
Open

[bug] Instance openwisp_config::instance1 s in a crash loop x #223

kellerman opened this issue Oct 17, 2024 · 6 comments
Labels

Comments

@kellerman
Copy link

Describe the bug
Hello everyone!
I recently upgraded the package of openwisp-config to version 1.1.0-1 in OpenWrt 23.05.5. I couldn't connect to the controller anymore.
In logs this message appears (and controller doesn't see the client):
Instance openwisp_config::instance1 s in a crash loop 6
I downgraded to 1.0.1 using this package from 22.03.7 and everything was back to normal:

Steps To Reproduce
Steps to reproduce the behavior:
opkg update
opkg install openwisp-config openwisp-monitoring luci-app-openwisp
#check system log for crash info

Expected behavior
There is no crashes and controller recognizes the client.

System Informatioon:

  • OpenWrt Version: 23.05.5
@kellerman kellerman added the bug label Oct 17, 2024
@diepeterpan
Copy link

I am having the same problem, I will see if I can rollback the agent and report back.

@diepeterpan
Copy link

Jip, I fixed my by manually download https://downloads.openwrt.org/releases/22.03.7/packages/aarch64_cortex-a53/packages/openwisp-config_1.0.1-1_all.ipk in tmp# curl https://downloads.openwrt.org/releases/22.03.7/packages/aarch64_cortex-a53/packages/openwisp-config_1.0.1-1_all.ipk -o openwisp-config_1.0.1-1_all.ipk and then opkg install openwisp-config_1.0.1-1_all.ipk --force-downgrade and immediately it registered.

@kellerman
Copy link
Author

Jip, I fixed my by manually download *** and immediately it registered.

So I am not alone, there is some problem with the new version. Downgrade works!

@diepeterpan
Copy link

Hunting down the bug I discovered that /etc/init.d/openwisp_config wants to execute PROG="/usr/sbin/openwisp-config" but it does not exists, it is called PROG="/usr/sbin/openwisp_config" according to the changelog there were changes re: the - 'hyphen' vs _ 'underscore' ; maybe it just gets packaged incorrectly? Once I edited /etc/init.d/openwisp_config and changed the - 'hyphen' to a _ 'underscore' in PROG= the new agent also started to work. Easier than rolling back.

@diepeterpan
Copy link

diepeterpan commented Oct 19, 2024

@pandafy - Looks like the problem is in the OpenWrt Makefile - https://github.com/openwrt/packages/blob/dd2e7105e6f0abf9b72155e2b26298ed19a92ab9/admin/openwisp-config/Makefile which needs to be updated to produce hyphens instead of underscores.

	$(INSTALL_BIN) \
		$(PKG_BUILD_DIR)/openwisp-config/files/openwisp.agent \
		$(1)/usr/sbin/openwisp_config

	$(INSTALL_BIN) \
		$(PKG_BUILD_DIR)/openwisp-config/files/openwisp.init \
		$(1)/etc/init.d/openwisp_config

should maybe be

	$(INSTALL_BIN) \
		$(PKG_BUILD_DIR)/openwisp-config/files/openwisp.agent \
		$(1)/usr/sbin/openwisp-config

	$(INSTALL_BIN) \
		$(PKG_BUILD_DIR)/openwisp-config/files/openwisp.init \
		$(1)/etc/init.d/openwisp-config

@nemesifier
Copy link
Member

nemesifier commented Oct 23, 2024

Thanks for bringing this up, a fix is ready on the OpenWrt packages repository: openwrt/packages#25186

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants