RechercheTech / mss

Main MSS feature tracking repo. Also the place for default MSS issues fallinng under no other repo.
1 stars 3 forks source link

Zabbix services not starting on new installs #96

Closed intelliant01 closed 4 years ago

intelliant01 commented 4 years ago

Even after 15 minutes of boot up this is the status -

● zabbix-proxy.service - Zabbix Proxy
   Loaded: loaded (/lib/systemd/system/zabbix-proxy.service; enabled; vendor preset: enabled)
   Active: activating (start) since Tue 2020-02-18 10:46:36 IST; 15min ago
  Process: 2553 ExecStart=/usr/sbin/zabbix_proxy -c $CONFFILE (code=exited, status=0/SUCCESS)
    Tasks: 0 (limit: 4545)
   CGroup: /system.slice/zabbix-proxy.service

Feb 18 10:46:36 server systemd[1]: Starting Zabbix Proxy...
Feb 18 10:46:37 server systemd[1]: zabbix-proxy.service: Can't open PID file /run/zabbix/zabbix_proxy.pid (yet?) after start: No such file or directory
Feb 18 10:46:37 server zabbix_proxy[2553]: zabbix_proxy [2555]: cannot open "/var/log/zabbix-proxy/zabbix_proxy.log": [2] No such file or directory

● zabbix-agent.service - Zabbix Agent
   Loaded: loaded (/lib/systemd/system/zabbix-agent.service; enabled; vendor preset: enabled)
   Active: activating (start) since Tue 2020-02-18 11:01:18 IST; 49s ago
  Process: 6625 ExecStart=/usr/sbin/zabbix_agentd -c $CONFFILE (code=exited, status=0/SUCCESS)
    Tasks: 0 (limit: 4545)
   CGroup: /system.slice/zabbix-agent.service

Feb 18 11:01:18 server systemd[1]: Starting Zabbix Agent...
Feb 18 11:01:18 server systemd[1]: zabbix-agent.service: Can't open PID file /run/zabbix/zabbix_agentd.pid (yet?) after start: No such file or directory
Feb 18 11:01:18 server zabbix_agentd[6625]: zabbix_agentd [6636]: cannot open "/var/log/zabbix-agent/zabbix_agentd.log": [2] No such file or directory
# ll -d /var/log/zabbix/
drwxr-xr-x 2 zabbix zabbix 4096 Nov 12  2018 /var/log/zabbix/

root@server:~# ls -l /var/log/zabbix/
total 0
# ll -d /run/zabbix
drwxr-xr-x 2 zabbix zabbix 40 Feb 18 10:46 /run/zabbix

root@server:~# ls -l  /run/zabbix
total 0
root@server:~# ll -d /var/lib/zabbix/
drwxr-xr-x 2 zabbix root 4096 Apr  4  2017 /var/lib/zabbix/
root@server:~# ll /var/lib/zabbix/
total 0

After 20 minutes -

# systemctl status zabbix-*
● zabbix-proxy.service - Zabbix Proxy
   Loaded: loaded (/lib/systemd/system/zabbix-proxy.service; enabled; vendor preset: enabled)
   Active: activating (start) since Tue 2020-02-18 10:46:36 IST; 19min ago
  Process: 2553 ExecStart=/usr/sbin/zabbix_proxy -c $CONFFILE (code=exited, status=0/SUCCESS)
    Tasks: 0 (limit: 4545)
   CGroup: /system.slice/zabbix-proxy.service

Feb 18 10:46:36 server systemd[1]: Starting Zabbix Proxy...
Feb 18 10:46:37 server systemd[1]: zabbix-proxy.service: Can't open PID file /run/zabbix/zabbix_proxy.pid (yet?) after start: No such file or directory
Feb 18 10:46:37 server zabbix_proxy[2553]: zabbix_proxy [2555]: cannot open "/var/log/zabbix-proxy/zabbix_proxy.log": [2] No such file or directory

● zabbix-agent.service - Zabbix Agent
   Loaded: loaded (/lib/systemd/system/zabbix-agent.service; enabled; vendor preset: enabled)
   Active: activating (auto-restart) (Result: timeout) since Tue 2020-02-18 11:06:09 IST; 3s ago
  Process: 7021 ExecStart=/usr/sbin/zabbix_agentd -c $CONFFILE (code=exited, status=0/SUCCESS)

Feb 18 11:06:09 server systemd[1]: zabbix-agent.service: Failed with result 'timeout'.
Feb 18 11:06:09 server systemd[1]: Failed to start Zabbix Agent.

At least one device has been shipped with this problem, so that too needs to be fixed.

cyberorg commented 4 years ago

wget http://$serverip/mss/zabbix-conf.tar.bz2 tar xvf zabbix-conf.tar.bz2 -C / restart services after that

intelliant01 commented 4 years ago

Works.

Hoping this need not be done on next installation. Pls advise.

Bagunda commented 12 months ago

$serverip/mss/zabbix-conf.tar.bz2

What is this? I have same issue. I'm trying to find a solution

Bagunda commented 12 months ago

What helped me: changing the configuration file nano /etc/zabbix/zabbix_proxy.conf line DBName=zabbix_proxy to DBName=/var/lib/zabbix/zabbix_proxy Then:

mkdir /var/lib/zabbix/
chown -R zabbix: /var/lib/zabbix/
systemctl restart zabbix-proxy
systemctl status zabbix-proxy