Zabbix configuration file error permission denied

I believe it's related to any daemon, but here will consider only agent daemon.

I believe it’s related to any daemon, but here will consider only agent daemon.

It’s obvious that «zabbix» account should have READ permissions to conf file.
But when the requirement is not satisfied, it’s not very clear what happens if try to run zabbix agent from root shell (exactly how it usually happens).

For example if run NOT from root shell:

# sudo -u zabbix ./zabbix_agentd3.0 -c /zab/bin/3.0/zabbix_agentd.conf; echo $?
zabbix_agentd3.0 [12004]: cannot open config file "/zab/bin/3.0/zabbix_agentd.conf": [13] Permission denied
1

the error is printed to STDERR and that’s fine, but zabbix agent usually is not started in this way.

But if try to run as root (as usually):

# ./zabbix_agentd3.0 -c /zab/bin/3.0/zabbix_agentd.conf; echo $?
0

it looked like started successfully, but actually it does not.

If in zabbix_agentd.conf logging is configured to native log file then we can see these lines:

zabbix_agentd3.0 [12186]: cannot create IPC key for path '/zab/bin/3.0/etc/zabbix_agentd.conf', try to create for path '.': [13] Permission denied
 12186:20160427:160845.337 Starting Zabbix Agent [it0]. Zabbix 3.0.2rc1 (revision 58788).
 12186:20160427:160845.337 **** Enabled features ****
 12186:20160427:160845.337 IPv6 support:          YES
 12186:20160427:160845.337 TLS support:            NO
 12186:20160427:160845.337 **************************
 12186:20160427:160845.337 using configuration file: /zab/bin/3.0/etc/zabbix_agentd.conf
zabbix_agentd3.0 [12186]: cannot create IPC key for path [/zab/bin/3.0/etc/zabbix_agentd.conf] id [l]: [13] Permission denied
 12186:20160427:160845.337 cannot create IPC key for collector

if configured to syslog, then is syslog:

 
Apr 27 16:10:02 it0 zabbix_agentd[12246]: Starting Zabbix Agent [it0]. Zabbix 3.0.2rc1 (revision 58788).
Apr 27 16:10:02 it0 zabbix_agentd[12246]: **** Enabled features ****
Apr 27 16:10:02 it0 zabbix_agentd[12246]: IPv6 support:          YES
Apr 27 16:10:02 it0 zabbix_agentd[12246]: TLS support:            NO
Apr 27 16:10:02 it0 zabbix_agentd[12246]: **************************
Apr 27 16:10:02 it0 zabbix_agentd[12246]: using configuration file: /zab/bin/3.0/etc/zabbix_agentd.conf
Apr 27 16:10:02 it0 zabbix_agentd[12246]: cannot create IPC key for collector

Note the difference in logged lines in syslog and native log — that’s also not very good because in syslog we don’t have human «understandable» part like «Permission denied»

Just in case, with LogType=console but without AllowRoot=1, as expected:

# ./zabbix_agentd3.0 -c /zab/bin/3.0/etc/zabbix_agentd.conf -f
zabbix_agentd3.0 [20082]: cannot run as root!

So, because of double forking, zabbix agent was able to actually read the config file (to know where to write log to), but when it switched to «zabbix» account it could not work correctly and stopped.

Such specific behavior is not very clear and I believe have to be improved to not mislead zabbix users.

Ideally agent should print the error message to STDERR in any case and exit with error code 1 (that’s very important for init scripts too).

Home
>
Linux
>
Detail page

After Zabbix was installed, startup service reported the following error:

4546:201 Seven 0322:172341.835 Starting Zabbix Server. Zabbix 3.2.4 (revision 65975).
4546:20170322:172341.836 ****** Enabled features ******
4546:20170322:172341.836 SNMP monitoring:           YES
4546:20170322:172341.836 IPMI monitoring:           YES
4546:20170322:172341.836 Web monitoring:            YES
4546:20170322:172341.836 VMware monitoring:         YES
4546:20170322:172341.836 SMTP authentication:        NO
4546:20170322:172341.836 Jabber notifications:      YES
4546:20170322:172341.836 Ez Texting notifications:  YES
4546:20170322:172341.836 ODBC:                      YES
4546:20170322:172341.836 SSH2 support:              YES
4546:20170322:172341.836 IPv6 support:              YES
4546:20170322:172341.836 TLS support:               YES
4546:20170322:172341.836 ******************************
4546:20170322:172341.836 using configuration file: /etc/zabbix/zabbix_server.conf
4546:20170322:172341.837 cannot set resource limit: [13] Permission denied
4546:20170322:172341.837 cannot disable core dump, exiting...

Check Selinux log error as follows:

type=AVC msg=audit(1490193042.90:426): avc:  denied  { setrlimit } for  pid=5781 comm="zabbix_server" scontext=unconfined_u:system_r:zabbix_t:s0 tcontext=unconfined_u:system_r:zabbix
_t:s0 tclass=process

type=SYSCALL msg=audit(1490193042.90:426): arch=x86_64 syscall=setrlimit success=no exit=EACCES a0=4 a1=7fffa011e310 a2=0 a3=8 items=0 ppid=1 pid=5781 auid=0 uid=495 gid=201 euid=495
 suid=495 fsuid=495 egid=201 sgid=201 fsgid=201 ses=46 tty=(none) comm=zabbix_server exe=/usr/sbin/zabbix_server_mysql subj=unconfined_u:system_r:zabbix_t:s0 key=(null)

At this point, if close SELinux, Zabbix can startup.

setenforce 0

In order to ensure the safety of the system, do not want to close selinux, as follows.

1, analysis of audit log, first install the setroubleshoot analysis component:

yum install setroubleshoot

The SELinux will writte the log in /var/log/audit/audit.log through auditd by default, and this service is enabled by default. If auditd is not running, the information will be written into /var/log/messages. SELinux logs are tagged with the AVC keyword, which is convenient for them to be filtered out of other information.

2, generate Reading Report

sealert -a /var/log/audit/audit.log > /opt/audit_report

3, open reading report

found 1 alerts in /var/log/audit/audit.log
--------------------------------------------------------------------------------

SELinux is preventing /usr/sbin/zabbix_server_mysql from using the setrlimit access on a process.

***** plug-in catchall (100. confidence) suggestions ********************************************

If you are determined to allow zabbix_server_mysql setrlimit to be marked as zabbix_t by default.
Then you should use this as a bug report.
You can generate local policy modules that allow this access.
Do
Please execute the following command to allow this access:
# grep zabbix_server /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp


More information:
Source context       unconfined_u:system_r:zabbix_t:s0
Target context       unconfined_u:system_r:zabbix_t:s0
Target object        [process]
Source               zabbix_server
Source path          /usr/sbin/zabbix_server_mysql
Port                 <unknown>
Host                 <unknown>
Source RPM package   zabbix-server-mysql-3.2.4-1.el6.x86_64
Target RPM package                    
Policy RPM           selinux-policy-3.7.19-231.el6.noarch
Selinux activated    True
Policy type          targeted
Force mode           Enforcing
Host name            DXFU
Platform             Linux DXFU #1 Tue Aug 20 SMP
                              14:10:49 UTC 2013 x86_64 x86_64
Alarm count          7
The first            2017-03-22 Wednesday 17:23:41
The last             2017-03-22 Wednesday 22:30:42
Local ID             e92b8541-d792-4dd7-bae2-5307467bf13c

Original verification information
type=AVC msg=audit(1490193042.90:426): avc:  denied  { setrlimit } for  pid=5781 comm="zabbix_server" scontext=unconfined_u:system_r:zabbix_t:s0 tcontext=unconfined_u:system_r:zabbix
_t:s0 tclass=process

type=SYSCALL msg=audit(1490193042.90:426): arch=x86_64 syscall=setrlimit success=no exit=EACCES a0=4 a1=7fffa011e310 a2=0 a3=8 items=0 ppid=1 pid=5781 auid=0 uid=495 gid=201 euid=495
 suid=495 fsuid=495 egid=201 sgid=201 fsgid=201 ses=46 tty=(none) comm=zabbix_server exe=/usr/sbin/zabbix_server_mysql subj=unconfined_u:system_r:zabbix_t:s0 key=(null)
Hash: zabbix_server,zabbix_t,zabbix_t,process,setrlimit

audit2allow

#============= zabbix_t ==============
allow zabbix_t self:process setrlimit;

audit2allow -R

#============= zabbix_t ==============
allow zabbix_t self:process setrlimit;

4, according to the suggestion in report, recommended operation

# grep zabbix_server /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

5, start Zabbix Service

service zabbix-server start

6, the service has been started.

zabbix_server (pid  6048) Being run...
#tail -f /var/log/zabbix/zabbix_server.log
 6048:20170322:224559.790 using configuration file: /etc/zabbix/zabbix_server.conf
  6048:20170322:224559.800 current database version (mandatory/optional): 03020000/03020000
  6048:20170322:224559.800 required mandatory version: 03020000
  6048:20170322:224559.822 server #0 started [main process]
  6050:20170322:224559.823 server #1 started [configuration syncer #1]
  6051:20170322:224559.824 server #2 started [db watchdog #1]
  6052:20170322:224559.825 server #3 started [poller #1]
  6053:20170322:224559.825 server #4 started [poller #2]
  6054:20170322:224559.826 server #5 started [poller #3]
  6055:20170322:224559.827 server #6 started [poller #4]
  6056:20170322:224559.828 server #7 started [poller #5]
  6057:20170322:224559.829 server #8 started [unreachable poller #1]
  6058:20170322:224559.829 server #9 started [trapper #1]
  6059:20170322:224559.830 server #10 started [trapper #2]
  6060:20170322:224559.831 server #11 started [trapper #3]
  6062:20170322:224559.836 server #13 started [trapper #5]
  6063:20170322:224559.838 server #14 started [icmp pinger #1]
  6071:20170322:224559.839 server #20 started [history syncer #1]
  6061:20170322:224559.839 server #12 started [trapper #4]
  6064:20170322:224559.840 server #15 started [alerter #1]
  6065:20170322:224559.842 server #16 started [housekeeper #1]
  6067:20170322:224559.843 server #18 started [http poller #1]
  6069:20170322:224559.843 server #19 started [discoverer #1]
  6073:20170322:224559.845 server #21 started [history syncer #2]
  6079:20170322:224559.846 server #25 started [proxy poller #1]
  6074:20170322:224559.846 server #22 started [history syncer #3]
  6066:20170322:224559.847 server #17 started [timer #1]
  6080:20170322:224559.848 server #26 started [self-monitoring #1]
  6075:20170322:224559.848 server #23 started [history syncer #4]
  6077:20170322:224559.849 server #24 started [escalator #1]
  6082:20170322:224559.853 server #27 started [task manager #1]

Posted by veryenglish
in Linux
at Mar 22, 2017 — 7:09 PM
Tag:
Zabbix
SELinux

I have installed zabbix server on red Hat 7.4 server with SELinux policy in Enforcing mode.

If I launch Zabbix-server (3.4.11), I have theses errors :

/var/log/zabbix/zabbix_server.log
Jul 25 16:51:38 master-01 systemd: zabbix-server.service never wrote its PID file. Failing.
Jul 25 16:51:38 master-01 systemd: Failed to start Zabbix Server.
Jul 25 16:51:38 master-01 systemd: Unit zabbix-server.service entered failed state.
Jul 25 16:51:38 master-01 systemd: zabbix-server.service failed.

==> /var/log/messages <==
Jul 25 16:57:47 master-01 systemd: PID file /run/zabbix/zabbix_server.pid not readable (yet?) after start.
Jul 25 16:57:57 master-01 systemd: zabbix-server.service never wrote its PID file. Failing.
Jul 25 16:57:57 master-01 systemd: Failed to start Zabbix Server.
Jul 25 16:57:57 master-01 systemd: Unit zabbix-server.service entered failed state.
Jul 25 16:57:57 master-01 systemd: zabbix-server.service failed.
Jul 25 16:58:08 master-01 systemd: zabbix-server.service holdoff time over, scheduling restart.

==> /var/log/audit/audit.log <==
type=AVC msg=audit(1532530831.592:161220): avc:  denied  { setrlimit } for  pid=11475 comm="zabbix_server" scontext=system_u:system_r:zabbix_t:s0 tcontext=system_u:system_r:zabbix_t:s0 tclass=process
type=SYSCALL msg=audit(1532530831.592:161220): arch=c000003e syscall=160 success=no exit=-13 a0=4 a1=7ffd64898360 a2=0 a3=8 items=0 ppid=1 pid=11475 auid=4294967295 uid=997 gid=995 euid=997 suid=997 fsuid=997 egid=995 sgid=995 fsgid=995 tty=(none) ses=4294967295 comm="zabbix_server" exe="/usr/sbin/zabbix_server_mysql" subj=system_u:system_r:zabbix_t:s0 key=(null)
type=PROCTITLE msg=audit(1532530831.592:161220): proctitle=2F7573722F7362696E2F7A61626269785F736572766572002D63002F6574632F7A61626269782F7A61626269785F7365727665722E636F6E66

After severals retry, without modification theses errors occured :

==> /var/log/zabbix/zabbix_server.log <==
zabbix_server [11390]: cannot open log: cannot create semaphore set: [28] No space left on device

In this case, I launch theses commands :

[root@master-01 ~]# ipcs | grep zabbix | wc -l
93
[root@master-01 ~]# ipcrm -a

==> /var/log/zabbix/zabbix_server.log <==
 11577:20180725:170244.842 Starting Zabbix Server. Zabbix 3.4.11 (revision 82160).
 11577:20180725:170244.842 ****** Enabled features ******
 11577:20180725:170244.842 SNMP monitoring:           YES
 11577:20180725:170244.842 IPMI monitoring:           YES
 11577:20180725:170244.842 Web monitoring:            YES
 11577:20180725:170244.842 VMware monitoring:         YES
 11577:20180725:170244.843 SMTP authentication:       YES
 11577:20180725:170244.843 Jabber notifications:      YES
 11577:20180725:170244.843 Ez Texting notifications:  YES
 11577:20180725:170244.843 ODBC:                      YES
 11577:20180725:170244.843 SSH2 support:              YES
 11577:20180725:170244.843 IPv6 support:              YES
 11577:20180725:170244.843 TLS support:               YES
 11577:20180725:170244.843 ******************************
 11577:20180725:170244.843 using configuration file: /etc/zabbix/zabbix_server.conf
 11577:20180725:170244.843 cannot set resource limit: [13] Permission denied
 11577:20180725:170244.843 cannot disable core dump, exiting...

In the original configuration, the permission denied error with solve with restorecon -v /etc/zabbix/zabbix_server.conf, in fact, the SELinux type set with «etc_t» instead «zabbix_exec_t» but appear again…

For the test (that is my first SELinux configuration), I have disable SELinux and service properly work.

I try to configure setsebool httpd_can_network_connect on (In this post), without success.

I check SELinux context :

[root@master-01 ~]# grep Pid /etc/zabbix/zabbix_server.conf | grep -v '#'
PidFile=/var/run/zabbix/zabbix_server.pid

[root@master-01 ~]# ls -Z /var/run/zabbix/
    srwx------. zabbix zabbix system_u:object_r:zabbix_var_run_t:s0 zabbix_server_alerter.sock
    srwx------. zabbix zabbix system_u:object_r:zabbix_var_run_t:s0 zabbix_server_preprocessing.sock

[root@master-01 ~]# ls -Z /etc/zabbix/zabbix_server.conf
    -rw-r-----. root zabbix system_u:object_r:zabbix_exec_t:s0 /etc/zabbix/zabbix_server.conf

[root@master-01 ~]# sesearch -s zabbix_t -t zabbix_exec_t --allow
Found 1 semantic av rules:
   allow zabbix_t zabbix_exec_t : file { ioctl read getattr lock execute execute_no_trans entrypoint open } ;

[root@master-01 ~]# sesearch -s zabbix_t -t zabbix_var_run_t --allow
Found 6 semantic av rules:
   allow zabbix_t zabbix_var_run_t : dir { ioctl read write create getattr setattr lock unlink link rename add_name remove_name reparent search rmdir open } ;
   allow nsswitch_domain pidfile : dir { getattr search open } ;
   allow domain pidfile : sock_file { write getattr append open } ;
   allow zabbix_t zabbix_var_run_t : file { ioctl read write create getattr setattr lock append unlink link rename open } ;
   allow nsswitch_domain pidfile : dir { getattr search open } ;
   allow nsswitch_domain pidfile : dir { getattr search open } ;

[root@master-01 ~]# sesearch -s zabbix_t --allow | grep mysql
   allow zabbix_t mysqld_t : unix_stream_socket connectto ;
   allow zabbix_t mysqld_var_run_t : sock_file { write getattr append open } ;
   allow zabbix_t mysqld_db_t : dir { getattr search open } ;
   allow zabbix_t mysqld_var_run_t : dir { getattr search open } ;

[root@master-01 ~]# sesearch -s zabbix_t -t zabbix_exec_t --allow
Found 1 semantic av rules:
   allow zabbix_t zabbix_exec_t : file { ioctl read getattr lock execute execute_no_trans entrypoint open } ;

I try add entry with audit2allow :

[root@master-01 ~]# audit2allow -a -m zabbix
[root@master-01 ~]# cat zabbix.te

module zabbix 1.0;

require {
        type httpd_t;
        type zabbix_t;
        type zabbix_port_t;
        class process setrlimit;
        class tcp_socket name_connect;
}

#============= httpd_t ==============

#!!!! This avc is allowed in the current policy
allow httpd_t zabbix_port_t:tcp_socket name_connect;

#============= zabbix_t ==============
allow zabbix_t self:process setrlimit;
[root@master-01 ~]# semodule -i zabbix.pp
libsemanage.semanage_direct_install_info: Overriding zabbix module at lower priority 100 with module at priority 400.
Failed to resolve typeattributeset statement at /etc/selinux/targeted/tmp/modules/400/zabbix/cil:2
semodule:  Failed!

Any idea ?

Thank you :)

Hi,
I have Centos 7

[root@localhost log]# cat /etc/redhat-release
CentOS Linux release 7.6.1810 (Core)

I did install zbxtg from wiki

cat /var/log/zabbix/zabbix_server.log
13460:20190209:001533.252 Got signal
[signal:15(SIGTERM),sender_pid:13797,sender_uid:0,reason:0]. Exiting …
13460:20190209:001533.310 [Z3001] connection to database ‘zabbix’ failed: [2002] Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2 «No such file or directory»)
13460:20190209:001533.311 Cannot connect to the database. Exiting…
3538:20190209:001851.365 Starting Zabbix Server. Zabbix 4.0.4 (revision 89349).
3538:20190209:001851.382 ****** Enabled features ******
3538:20190209:001851.382 SNMP monitoring: YES
3538:20190209:001851.382 IPMI monitoring: YES
3538:20190209:001851.382 Web monitoring: YES
3538:20190209:001851.382 VMware monitoring: YES
3538:20190209:001851.382 SMTP authentication: YES
3538:20190209:001851.382 Jabber notifications: YES
3538:20190209:001851.382 Ez Texting notifications: YES
3538:20190209:001851.382 ODBC: YES
3538:20190209:001851.382 SSH2 support: YES
3538:20190209:001851.382 IPv6 support: YES
3538:20190209:001851.382 TLS support: YES
3538:20190209:001851.382 ******************************
3538:20190209:001851.382 using configuration file: /etc/zabbix/zabbix_server.conf
3538:20190209:001851.419 [Z3001] connection to database ‘zabbix’ failed: [2002] Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2 «No such file or directory»)
3538:20190209:001851.419 database is down: reconnecting in 10 seconds
3538:20190209:001859.049 database connection re-established
3538:20190209:001859.051 current database version (mandatory/optional): 04000000/04000003
3538:20190209:001859.051 required mandatory version: 04000000
3538:20190209:001859.148 server #0 started [main process]
4091:20190209:001859.150 server #1 started [configuration syncer #1]
4092:20190209:001859.150 server #2 started [alerter #1]
4093:20190209:001859.151 server #3 started [alerter #2]
4094:20190209:001859.151 server #4 started [alerter #3]
4095:20190209:001859.152 server #5 started [housekeeper #1]
4096:20190209:001859.152 server #6 started [timer #1]
4097:20190209:001859.153 server #7 started [http poller #1]
4098:20190209:001859.154 server #8 started [discoverer #1]
4100:20190209:001859.155 server #10 started [history syncer #2]
4103:20190209:001859.159 server #13 started [escalator #1]
4108:20190209:001859.164 server #17 started [poller #1]
4101:20190209:001859.164 server #11 started [history syncer #3]
4105:20190209:001859.165 server #14 started [proxy poller #1]
4099:20190209:001859.166 server #9 started [history syncer #1]
4107:20190209:001859.170 server #16 started [task manager #1]
4111:20190209:001859.171 server #20 started [poller #4]
4109:20190209:001859.177 server #18 started [poller #2]
4102:20190209:001859.178 server #12 started [history syncer #4]
4106:20190209:001859.179 server #15 started [self-monitoring #1]
4110:20190209:001859.180 server #19 started [poller #3]
4112:20190209:001859.183 server #21 started [poller #5]
4115:20190209:001859.190 server #22 started [unreachable poller #1]
4117:20190209:001859.200 server #24 started [trapper #2]
4122:20190209:001859.201 server #26 started [trapper #4]
4121:20190209:001859.205 server #25 started [trapper #3]
4116:20190209:001859.205 server #23 started [trapper #1]
4125:20190209:001859.209 server #29 started [alert manager #1]
4124:20190209:001859.212 server #28 started [icmp pinger #1]
4126:20190209:001859.213 server #30 started [preprocessing manager #1]
4123:20190209:001859.213 server #27 started [trapper #5]
4128:20190209:001859.224 server #31 started [preprocessing worker #1]
4129:20190209:001859.225 server #32 started [preprocessing worker #2]
4134:20190209:001859.235 server #33 started [preprocessing worker #3]

When i started scrip manual — it’s ok.

[root@localhost zabbix]# /usr/lib/zabbix/alertscripts/zbxtg.py «@avdanilov» «тест21» «тестовое сообщение12» —debug
zbxtg.py: {u’ok’: True, u’result’: {u’username’: u’ithelp_group_zbx_bot’, u’first_name’: u’Monitoring IT Help Group’, u’is_bot’: True, u’id’: 762026319}}
zbxtg.py: Cache file with uids: /usr/lib/zabbix/zbxtg/uids.txt
zbxtg.py: Trying to read cached uid for avdanilov, private, from /usr/lib/zabbix/zbxtg/uids.txt
zbxtg.py: Telegram uid of private ‘avdanilov’: 111981553

zbxtg.py: Trying to /sendMessage:
zbxtg.py: https://api.telegram.org/bot762026319:AAG6jb7vde0JNZV9WZWk-WaLfvxRToBycYs/sendMessage
zbxtg.py: post params: {‘text’: ‘xd1x82xd0xb5xd1x81xd1x8221nxd1x82xd0xb5xd1x81xd1x82xd0xbexd0xb2xd0xbexd0xb5 xd1x81xd0xbexd0xbexd0xb1xd1x89xd0xb5xd0xbdxd0xb8xd0xb512’, ‘disable_notification’: False, ‘chat_id’: ‘111981553n’, ‘disable_web_page_preview’: False}
{u’ok’: True, u’result’: {u’date’: 1549662356, u’text’: u’u0442u0435u0441u044221nu0442u0435u0441u0442u043eu0432u043eu0435 u0441u043eu043eu0431u0449u0435u043du0438u043512′, u’from’: {u’username’: u’ithelp_group_zbx_bot’, u’first_name’: u’Monitoring IT Help Group’, u’is_bot’: True, u’id’: 762026319}, u’message_id’: 60, u’chat’: {u’username’: u’avdanilov’, u’first_name’: u’u0410u043du0434u0440u0435u0439′, u’last_name’: u’u0414u0430u043du0438u043bu043eu0432′, u’type’: u’private’, u’id’: 111981553}}}

But when it’s did zabbix, i get error:

Traceback (most recent call last):
File «/usr/lib/zabbix/alertscripts/zbxtg.py», line 909, in
main()
File «/usr/lib/zabbix/alertscripts/zbxtg.py», line 785, in main
uid = tg.get_uid(zbx_to)
File «/usr/lib/zabbix/alertscripts/zbxtg.py», line 179, in get_uid
updates = self.get_updates()
File «/usr/lib/zabbix/alertscripts/zbxtg.py», line 67, in get_updates
answer = requests.post(url, params=params, proxies=self.proxies)
File «/usr/lib/python2.7/site-packages/requests/api.py», line 112, in post
return request(‘post’, url, data=data, json=json, **kwargs)
File «/usr/lib/python2.7/site-packages/requests/api.py», line 58, in request
return session.request(method=method, url=url, **kwargs)
File «/usr/lib/python2.7/site-packages/requests/sessions.py», line 508, in request
resp = self.send(prep, **send_kwargs)
File «/usr/lib/python2.7/site-packages/requests/sessions.py», line 618, in send
r = adapter.send(request, **kwargs)
File «/usr/lib/python2.7/site-packages/requests/adapters.py», line 502, in send
raise ProxyError(e, request=request)
requests.exceptions.ProxyError: HTTPSConnectionPool(host=’api.telegram.org’, port=443): Max retries exceeded with url: /bot762026319:AAG6jb7vde0JNZV9WZWk-WaLfvxRToBycYs/getUpdates?offset=0 (Caused by ProxyError(‘Cannot connect to proxy.’, NewConnectionError(‘<urllib3.connection.VerifiedHTTPSConnection object at 0x7f1e5678efd0>: Failed to establish a new connection: [Errno 13] Permission denied’,))

[root@localhost zabbix]# pip list
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won’t be maintained after that date. A future version of pip will drop support for Python 2.7.
Package Version


backports.ssl-match-hostname 3.5.0.1
certifi 2018.11.29
chardet 3.0.4
configobj 4.7.2
decorator 3.4.0
idna 2.6
iniparse 0.4
ipaddress 1.0.16
IPy 0.75
oauthlib 3.0.1
pep8 1.7.1
perf 0.1
pip 19.0.1
policycoreutils-default-encoding 0.1
proxy 0.0.1
pycurl 7.19.0
pygobject 3.22.0
pygpgme 0.3
pyliblzma 0.5.3
PySocks 1.6.8
python-linux-procfs 0.4.9
pyudev 0.15
pyxattr 0.5.1
requests 2.18.4
requests-oauthlib 0.6.2
requests-toolbelt 0.9.1
schedutils 0.4
seobject 0.1
sepolicy 1.1
setuptools 0.9.8
slip 0.4.0
slip.dbus 0.4.0
urlgrabber 3.10
urllib3 1.22
wheel 0.32.3
yum-metadata-parser 1.1.4

What is wrong ? =)

View previous topic :: View next topic  
Author Message
m0n085
n00b
n00b

Joined: 06 Feb 2018
Posts: 9

PostPosted: Tue Nov 27, 2018 3:26 pm    Post subject: zabbix_server (Zabbix) 4.0.1 failed to start Reply with quote

Code:

sudo /etc/init.d/zabbix-server start

 * Starting Zabbix server …

zabbix_server [14913]: cannot open config file «/etc/zabbix/zabbix_server.conf»: [13] Permission denied

 * start-stop-daemon: failed to start `/usr/sbin/zabbix_server’                                                  [ !! ]

 * ERROR: zabbix-server failed to start

ls -lah /etc/zabbix/

drwxr-xr-x  2 root root 4,0K 11-27 15:30 .

drwxr-xr-x 52 root root 4,0K 11-27 15:16 ..

-rw-r—r—  1 root root    0 11-24 13:36 .keep_net-analyzer_zabbix-0

-rw-r——  1 root root  11K 11-24 13:36 zabbix_agentd.conf

-rw-r——  1 root root  15K 11-27 15:30 zabbix_server.conf

 eix -I zabbix

[I] net-analyzer/zabbix

     Available versions:  2.2.16 ~2.2.21 ~2.2.23 ~3.0.19 ~3.0.20 ~3.0.21 ~3.0.22 ~3.2.11 ~3.4.10 ~3.4.11 ~3.4.12 ~3.4.13 ~3.4.14 (**)4.0.1 {+agent curl frontend ipv6 java ldap libxml2 mysql odbc openipmi oracle (+)postgres proxy server snmp sqlite ssh ssl static xmpp ELIBC=»FreeBSD»}

     Installed versions:  4.0.1(13:36:16 24.11.2018)(agent frontend openipmi postgres server snmp ssh ssl -curl -ipv6 -java -ldap -libxml2 -mysql -odbc -oracle -proxy -sqlite -static -xmpp ELIBC=»-FreeBSD»)

     Homepage:            https://www.zabbix.com/

     Description:         ZABBIX is software for monitoring of your applications, network and servers

I found https://bugs.gentoo.org/670650

what to do :roll:

Back to top

View user's profile Send private message

Dwosky
Tux’s lil’ helper
Tux's lil' helper

Joined: 07 Nov 2018
Posts: 129

PostPosted: Tue Nov 27, 2018 4:04 pm    Post subject: Reply with quote

I would check what user its that process being launched with, because despite being called with sudo, it might do a su — $USER inside the init.d script.
Back to top

View user's profile Send private message

m0n085
n00b
n00b

Joined: 06 Feb 2018
Posts: 9

PostPosted: Thu Nov 29, 2018 8:26 am    Post subject: Reply with quote

@Dwosky thx for your help

Code:

chmod 755 /etc/zabbix/

saved the situation

Back to top

View user's profile Send private message

Display posts from previous:   

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Понравилась статья? Поделить с друзьями:

Читайте также:

  • Zabbix appliance database error
  • Zabbix an authentication function returned an error
  • Zabbix agent ошибка 1053 служба не ответила на запрос своевременно
  • Zabbix agent failed first network error wait for 15 seconds
  • Zabbix agent ended prematurely because of an error

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии