Problem with a non-existant service (Zabbix Agent)
-
I upgrade from an old netgate appliance to a 6100. I restored a backup from the old appliance and had no issues. However, I have one problem. We use Zabbix to monitor our network. We were using the Zabbix agent on the old appliance, on the new appliance the package manager shows zabbix agent 4 and zabbix agent 5 as available packages.
In my Services drop down it shows Zabbix Agent 4.4, which was the package that was installed on the old pfsense appliance. If you click this option, you get the error: "No valid package defined."
Additionally, zabbix_agentd is listed under Status / Services as not running and it cannot be started.
I've tried installing and uninstalling both the zabbix agent 4 and agent 5 options, but they add and remove new entries in the services drop down. So, I don't know how to remove the invalid Zabbix Agent 4.4 entry.
Relatedly, I am unable to get either Zabbix Agent 4 nor Zabbix Agent 5 to work.
I'm assuming there are artifacts from the 4.4 agent that are preventing the new packages from working. Are there directions for how to clean this up?
-
Yes if you were running a package that no longer exists it cannot uninstall the config parts from the config file You can manually remove the menu and service items from the config file.
I'm not sure why you wouldn't be able to get the other pkgs to work though. The old config should not have any effect there.
Are there errors logged?
Steve
-
@stephenw10 So it's valid to download the backup xml file, delete the xml elements under the installedpackages element related to the zabbix agent 4.4 page and reupload it? or is there a better way to clean that up?
-
I used Diagnostics / Edit File to directly edit /conf/config.xml and remove the entries. I then reinstalled the Zabbix Agent 5 package, and everything looks correct now.
So now I can look into the Zabbix Agent 5 not working issue:
Let me know if this should be a separate thread.
I looked through Status / System Logs and see the following in General:
Jan 18 14:02:28 php-fpm 3828 /pkg_mgr_install.php: Configuration Change: admin@192.168.0.252 (Local Database): Creating restore point before package installation. Jan 18 14:02:28 check_reload_status 431 Syncing firewall Jan 18 14:02:31 pkg-static 60441 zabbix5-agent-5.0.37 installed Jan 18 14:02:31 php 61641 //etc/rc.packages: Beginning package installation for Zabbix Agent 5.0 . Jan 18 14:02:31 php 61641 //etc/rc.packages: Configuration Change: (system): Intermediate config write during package install for Zabbix Agent 5.0. Jan 18 14:02:31 check_reload_status 431 Syncing firewall Jan 18 14:02:31 php 61641 //etc/rc.packages: Configuration Change: (system): Installed Zabbix Agent 5.0 package. Jan 18 14:02:31 check_reload_status 431 Syncing firewall Jan 18 14:02:31 php 61641 //etc/rc.packages: Successfully installed package: Zabbix Agent 5.0. Jan 18 14:02:31 sshguard 90756 Exiting on signal. Jan 18 14:02:31 sshguard 68034 Now monitoring attacks. Jan 18 14:02:31 pkg-static 60441 pfSense-pkg-zabbix-agent5-1.0.6 installed Jan 18 14:02:33 check_reload_status 431 Reloading filter Jan 18 14:02:33 check_reload_status 431 Starting packages Jan 18 14:02:34 php-fpm 54504 /rc.start_packages: Restarting/Starting all packages. Jan 18 14:03:38 php-fpm 45154 /pkg_edit.php: Configuration Change: admin@192.168.0.252 (Local Database): Zabbix Agent has been created/modified.
Under Packages / Zabbix Agent 5.0 it says "No logs to display"
Under Status / Services I see:
zabbix_agentd Zabbix Agent Host Monitor Daemon (red X) (blue play)
If I click the play button it changes to a spinning green gear for about 8 seconds, then returns to the play button. I am unable to find any logs related to the attempts to start the service.
-
It's your thread and not long so I'd fine to continue here.
Hmm, no additional logs when you try to start it?
You are testing in 23.09.1?
-
@stephenw10 I'm actually running 23.05.1 have not updated to 23.09.1 yet because I'll have to schedule downtime to reboot the router.
I do not see any other logs after attempting to start the service.
-
Hmm, OK. What pkg version do you have installed? You may have pulled in a pkg from the wrong repo unless you have updates set to 23.05.1 specifically.
-
@stephenw10 I'm not sure how to verify this. Also, if recommended I can put off further troubleshooting until after we get on the latest pfsense version.
I uninstalled the package again, and this is what I see under available packages:
-
Yup that's too new the pkg from 23.05.1 should be
zabbix4-agent-4.0.45
.Uninstall the package. Then go to System > Updates > Update settings and make sure the repo is set to 23.05.1.
Then check the available packages.
-
@stephenw10 Thank you for the education. That was indeed the issue, and all is well.
-
Yeah, it's a long standing issue in pfSense that is finally addressed in 23.09. From there on you have to opt in to new releases so you cannot accidentally get the wrong packages.