Ad Widget

Collapse

zabbix_server.log entry: file:'log.c',line:246] lock failed: [22] Invalid argument

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    zabbix_server.log entry: file:'log.c',line:246] lock failed: [22] Invalid argument

    I am installing zabbix 3.4.11 using puppet. Before I do the installation, I made sure I manually added the SELinux policies as per instructions in https://support.zabbix.com/browse/ZBX-12567, so I stopped getting messages in zabbix_server.log about out of space due to semaphores . As matter of fact, there are not too many zabbix semaphores this time; I've been with 10 for the last 2 hours so far.

    However, the message I get at the end of zabbix_server.log ends with:

    7358:20180807:162104.822 server #360 started [poller #126]
    7354:20180807:162104.889 server #356 started [poller #122]
    6732:20180807:162105.021 cannot connect to alert manager service: Cannot connect to service "alerter": [2] No such file or directory.
    6734:20180807:162105.027 cannot connect to alert manager service: Cannot connect to service "alerter": [2] No such file or directory.
    6733:20180807:162105.032 cannot connect to alert manager service: Cannot connect to service "alerter": [2] No such file or directory.
    7368:20180807:162105.088 server #361 started [poller #127]
    7369:20180807:162105.099 server #362 started [poller #128]
    7374:20180807:162105.109 server #367 started [poller #133]
    7370:20180807:162105.119 server #363 started [poller #129]
    7372:20180807:162105.131 server #365 started [poller #131]
    7373:20180807:162105.141 server #366 started [poller #132]
    7371:20180807:162105.152 server #364 started [poller #130]
    7375:20180807:162105.163 server #368 started [poller #134]
    6723:20180807:162105.262 One child process died (PID:6732,exitcode/signal:1). Exiting ...
    7380:20180807:162106.534 server #369 started [poller #135]
    6723:20180807:162107.320 syncing history data...
    6723:20180807:162107.320 syncing history data done
    6723:20180807:162107.320 syncing trend data...
    6723:20180807:162107.321 syncing trend data done
    6723:20180807:162107.321 Zabbix Server stopped. Zabbix 3.4.11 (revision 82160).
    zabbix_server [7380]: [file:'log.c',line:246] lock failed: [22] Invalid argument

    What does this mean? I found a thread in https://support.zabbix.com/browse/ZB...comment-212666 that took me to the page https://www.zabbix.com/documentation...x/other_issues . But what exactly does it mean with "Stop using zabbix account for anything else than Zabbix processes, create a dedicated account for other things".
    I create a zabbix account (called "zabbix") with a password and set it up in zabbix_server.conf then use it within puppet to create the initial zabbix db. But I do not use it to physically psql to the zabbix db or via ssh.

    Can anybody explain better what is this statement saying? Is it related to the error in zabbix_server.log? I don't see any such error in zabbix_agent.log. zabbix-agent is running without issues; zabbix-server I cannot start.

    Thanks,
    Last edited by rk325; 07-08-2018, 22:31.

    #2
    What other people created in the past may not be perfect.
    It may be necessary to adjust according to the environment you are using.

    If you want to run it in an environment with SELinux enabled, please check the log properly and check if the policy setting is not insufficient.
    ex. /var/log/audit/audit.log

    If there is a shortage, please use the audit2allow command etc. with reference to the log file to create a policy and cancel the restriction.

    Comment


      #3
      Make sure Zabbix has permissions to create files in SocketDir: https://www.zabbix.com/documentation...on_parameters1

      Comment


      • rk325
        rk325 commented
        Editing a comment
        Yes, I added the following as policy and now I can run all 3 zabbix services. Got the file from a post in the zabbix forums I believe from one of the support people who after it updated the Zabbix manual to indicate the issues with SELinux.

        module zabbix_server_add 1.1;

        require {
        type zabbix_var_run_t;
        type tmp_t;
        type zabbix_t;
        class sock_file { create unlink write };
        class unix_stream_socket connectto;
        class process setrlimit;
        }

        #============= zabbix_t ==============

        #!!!! This avc is allowed in the current policy
        allow zabbix_t selfrocess setrlimit;

        #!!!! This avc is allowed in the current policy
        allow zabbix_t self:unix_stream_socket connectto;

        #!!!! This avc is allowed in the current policy
        allow zabbix_t tmp_t:sock_file { create unlink write };

        #!!!! This avc is allowed in the current policy
        allow zabbix_t zabbix_var_run_t:sock_file { create unlink write };

      #4
      Do you get something Zabbix related in audit.log?

      Comment

      Announcement

      Collapse
      No announcement yet.
      Working...
      X