Bug 961098 - Zabbix Proxy permissions problem and more sugestions
Summary: Zabbix Proxy permissions problem and more sugestions
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: zabbix20
Version: el6
Hardware: x86_64
OS: Linux
unspecified
urgent
Target Milestone: ---
Assignee: Volker Fröhlich
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-05-08 19:22 UTC by Marcelo Barbosa "firemanxbr"
Modified: 2013-08-23 18:49 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-05-15 03:19:11 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Marcelo Barbosa "firemanxbr" 2013-05-08 19:22:11 UTC
I'm testing problem in this it versions:
zabbix20-proxy-2.0.6-1.el6.x86_64
zabbix20-web-2.0.6-1.el6.noarch
zabbix20-server-2.0.6-1.el6.x86_64
zabbix20-proxy-sqlite3-2.0.6-1.el6.x86_64
zabbix20-agent-2.0.6-1.el6.x86_64
zabbix20-web-mysql-2.0.6-1.el6.noarch
zabbix20-2.0.6-1.el6.x86_64
zabbix20-server-mysql-2.0.6-1.el6.x86_64

Sugestions and Bugs:    

1) Move Zabbix config files to directory /etc for /etc/zabbix/
lrwxrwxrwx.  1 root   root     31 May  8 11:18 alertscripts -> /var/lib/zabbixsrv/alertscripts
lrwxrwxrwx.  1 root   root     34 May  8 14:22 externalscripts -> /var/lib/zabbixsrv/externalscripts
drwxr-x---.  2 apache apache 4096 May  8 14:41 web
lrwxrwxrwx.  1 root   root     22 May  8 14:23 zabbix_agent.conf -> /etc/zabbix_agent.conf
lrwxrwxrwx.  1 root   root     23 May  8 14:23 zabbix_agentd.conf -> /etc/zabbix_agentd.conf
lrwxrwxrwx.  1 root   root     22 May  8 14:22 zabbix_proxy.conf -> /etc/zabbix_proxy.conf
lrwxrwxrwx.  1 root   root     23 May  8 11:18 zabbix_server.conf -> /etc/zabbix_server.conf

my config files have not organization.


2) Permissions from config files(zabbix-proxy BUG):
Above view my config files permissions, but looking for directory /etc look:

drwxr-xr-x.  3 root      root     4096 May  8 14:41 zabbix
-rw-r--r--.  1 root      root     1571 Apr 22 10:38 zabbix_agent.conf
-rw-r--r--.  1 root      root     5695 Apr 22 10:38 zabbix_agentd.conf
-rw-------.  1 zabbixsrv zabbix   9970 Apr 22 10:38 zabbix_proxy.conf
-r--------.  1 zabbixsrv zabbix  10404 Apr 22 10:38 zabbix_server.conf

Package zabbix20-agent-2.0.6-1.el6.x86_64 normal user defined, this it not good, my sugestion is use one user for all packages Zabbix:

zabbix:x:497:498:Zabbix Monitoring System:/var/lib/zabbix:/sbin/nologin

example problem permissions in start zabbix-proxy:

# tail -f /var/log/zabbix/zabbix_proxy.log 
 13360:20130508:155446.357 SNMP monitoring:       YES
 13360:20130508:155446.357 IPMI monitoring:       YES
 13360:20130508:155446.357 WEB monitoring:        YES
 13360:20130508:155446.357 ODBC:                  YES
 13360:20130508:155446.357 SSH2 support:          YES
 13360:20130508:155446.357 IPv6 support:          YES
 13360:20130508:155446.357 **************************
 13360:20130508:155446.357 cannot open database file "zabbix_proxy": [2] No such file or directory
 13360:20130508:155446.357 creating database ...
 13360:20130508:155446.357 [Z3002] cannot create database 'zabbix_proxy': [0] unable to open database file


3) Mysql dependences:
After choice and install my packages zabbix*-mysql, this package mysql-server.x86_64 is not installed, look:

zabbix20-proxy-2.0.6-1.el6.x86_64
zabbix20-web-2.0.6-1.el6.noarch
zabbix20-server-2.0.6-1.el6.x86_64
zabbix20-proxy-sqlite3-2.0.6-1.el6.x86_64
zabbix20-agent-2.0.6-1.el6.x86_64
zabbix20-web-mysql-2.0.6-1.el6.noarch
zabbix20-2.0.6-1.el6.x86_64
zabbix20-server-mysql-2.0.6-1.el6.x86_64

but:
php-mysql-5.3.3-22.el6.x86_64
mysql-libs-5.1.69-1.el6_4.x86_64

Mysql server its not depence to zabbix20-*-mysql...

Comment 1 Marcelo Barbosa "firemanxbr" 2013-05-10 18:14:01 UTC
Volker,

   Thank you fast feedback.
   About item 3, it's okay, great observation, it is possible use mysl in another host, perfect abordage.
   About item 1, it is possible move all config file to /etc/zabbix ? it is very important organization for package zabbix20 in my opinion.
   About item 2, look this problem:

   my enviroment is:
   * CentOs 6.4 with updated
   * SELINUX it's configured: 
   [root@centos-64 ~]# cat /etc/selinux/config 
   SELINUX=permissive
   SELINUXTYPE=targeted 

   I installed this packages zabbix:
   [root@centos-64 ~]# yum install zabbix20-proxy-sqlite3.x86_64

   Installed:
   zabbix20-proxy-sqlite3.x86_64 0:2.0.6-1.el6                                                                                                         

   Dependency Installed:
   OpenIPMI-libs.x86_64 0:2.0.16-14.el6  fping.x86_64 0:2.4b2-10.el6       libtool-ltdl.x86_64 0:2.2.6-15.5.el6   lm_sensors-libs.x86_64 0:3.1.1-17.el6
  net-snmp-libs.x86_64 1:5.5-44.el6_4.1 unixODBC.x86_64 0:2.2.14-12.el6_3 zabbix20.x86_64 0:2.0.6-1.el6        zabbix20-proxy.x86_64 0:2.0.6-1.el6  

   Set service init 3 on:
   [root@centos-64 etc]# chkconfig zabbix-proxy on

   PROBLEM AGEND CONFIG: View /etc:
drwxr-xr-x.  2 root      root     4096 May 10 11:56 zabbix
-rw-r--r--.  1 root      root     5695 Apr 22 10:38 zabbix_agentd.conf
-rw-------.  1 zabbixsrv zabbix   9970 Apr 22 10:38 zabbix_proxy.conf

   This it config agentd not instaled, but present :D

   Alter config proxy to:
   DBName=/etc/zabbix/zabbix_proxy.db

   or

   DBName=zabbix_proxy.db

   Run zabbix-proxy:
[root@centos-64 etc]# service zabbix-proxy start
Starting Zabbix proxy:                                     [  OK  ]

   Check zabbix-proxy running ?
[root@centos-64 etc]# service zabbix-proxy status
zabbix_proxy is stopped

   Log this it problem zabbix-proxy:
[root@centos-64 etc]# cat /var/log/zabbix/zabbix_proxy.log 
  1505:20130510:143822.009 Starting Zabbix Proxy (active) [Zabbix proxy]. Zabbix 2.0.6 (revision 35158).
  1505:20130510:143822.009 **** Enabled features ****
  1505:20130510:143822.009 SNMP monitoring:       YES
  1505:20130510:143822.009 IPMI monitoring:       YES
  1505:20130510:143822.009 WEB monitoring:        YES
  1505:20130510:143822.009 ODBC:                  YES
  1505:20130510:143822.009 SSH2 support:          YES
  1505:20130510:143822.009 IPv6 support:          YES
  1505:20130510:143822.009 **************************
  1505:20130510:143822.010 cannot open database file "/etc/zabbix/zabbix_proxy.db": [2] No such file or directory
  1505:20130510:143822.010 creating database ...
  1505:20130510:143822.010 [Z3002] cannot create database '/etc/zabbix/zabbix_proxy.db': [0] unable to open database file

   SOLUTION:
   Set zabbix-proxy config /etc/zabbix/zabbix_proxy.conf
   DBName=/var/lib/zabbixsrv/zabbix_proxy.db

    1562:20130510:144118.256 proxy #3 started [data sender #1]
  1561:20130510:144118.258 proxy #2 started [heartbeat sender #1]
  1560:20130510:144118.264 proxy #1 started [configuration syncer #1]
  1570:20130510:144118.283 proxy #11 started [trapper #2]
  1571:20130510:144118.284 proxy #12 started [trapper #3]
  1572:20130510:144118.284 proxy #13 started [trapper #4]
  1569:20130510:144118.285 proxy #10 started [trapper #1]
  1573:20130510:144118.285 proxy #14 started [trapper #5]
  1574:20130510:144118.293 proxy #15 started [icmp pinger #1]
  1575:20130510:144118.295 proxy #16 started [housekeeper #1]
  1575:20130510:144118.295 executing housekeeper
  1576:20130510:144118.296 proxy #17 started [http poller #1]
  1578:20130510:144118.317 proxy #19 started [history syncer #1]
  1579:20130510:144118.318 proxy #20 started [history syncer #2]
  1580:20130510:144118.318 proxy #21 started [history syncer #3]
  1559:20130510:144118.322 proxy #0 started [main process]
  1581:20130510:144118.338 proxy #22 started [history syncer #4]
  1564:20130510:144118.665 proxy #5 started [poller #2]
  1565:20130510:144118.675 proxy #6 started [poller #3]
  1563:20130510:144118.679 proxy #4 started [poller #1]
  1566:20130510:144118.681 proxy #7 started [poller #4]
  1568:20130510:144118.685 proxy #9 started [unreachable poller #1]
  1567:20130510:144118.692 proxy #8 started [poller #5]
  1577:20130510:144118.705 proxy #18 started [discoverer #1]
  1561:20130510:144118.740 Heartbeat message failed
  1560:20130510:144118.743 Cannot obtain configuration data from server. Proxy host name might not be matching that on the server.
  1575:20130510:144118.750 housekeeper deleted 0 records from history (spent 0.009068 seconds)

conclusive:

   My sugestions:

1) Move all config files from package zabbix20* to /etc/zabbix/
2) No create symlink, use real directory, not connect with /var/lib/zabbixsrv/
3) Remove config file: "zabbix_agentd.conf" from packages:

zabbix20-proxy-sqlite3-2.0.6-1.el6.x86_64
zabbix20-2.0.6-1.el6.x86_64
zabbix20-proxy-2.0.6-1.el6.x86_64

   Use config file: "zabbix_agentd.conf" only if installed:
zabbix20-agent.x86_64 

Best regards.
  
Marcelo Barbosa
Fedora Project Ambassador
firemanxbr

Comment 2 Marcelo Barbosa "firemanxbr" 2013-05-15 03:17:26 UTC
Only sugestion for move all config files the package from /etc/ to /etc/zabbix.

Best regards.
  
Marcelo Barbosa
Fedora Project Ambassador
firemanxbr

Comment 3 Emerson de Oliveira 2013-08-23 18:49:28 UTC
Hi,
I solved this problem setting the full path to DBName:

DBName=/tmp/zabbix_proxy

regards,


Note You need to log in before you can comment on or make changes to this bug.