Welcome to OCS Inventory NG community support, where you can ask questions and receive answers from other members of the community.

Please ask questions only in English or French.

Release 2.6 available

The official documentation can be found on http://wiki.ocsinventory-ng.org. Read it before asking your question.

Cannot establish communication 503 [closed]

Hello

I am trying to make the ocsinventory work. It seems that the problem is with the communication between server and client. the log and versions

* Server comunication: Centos 7/ OSCNF UNIX SERVER 2.5

* Server BD: debian 7 (They were in different servers because at the beginning intall server in debian and reuse BD)

* Agent: Debian 9/  Ocsinventory Unix Agent 2.4.2

var/log/httpd/error.log:

[Wed Apr 17 08:18:19.085700 2019] [:error] [pid 15782] [client 172.16.39.101:53567] PHP Warning:  date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_t

[Wed Apr 17 08:18:19.085911 2019] [:error] [pid 15782] [client 172.16.39.101:53567] PHP Warning:  date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_t

[Wed Apr 17 08:18:19.086012 2019] [:error] [pid 15782] [client 172.16.39.101:53567] PHP Warning:  date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_t

[Wed Apr 17 08:18:19.086047 2019] [:error] [pid 15782] [client 172.16.39.101:53567] PHP Warning:  date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_t

[Wed Apr 17 08:18:19.086089 2019] [:error] [pid 15782] [client 172.16.39.101:53567] PHP Warning:  date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_t

[Wed Apr 17 08:18:19.086132 2019] [:error] [pid 15782] [client 172.16.39.101:53567] PHP Warning:  mktime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default

[Wed Apr 17 08:18:19.086174 2019] [:error] [pid 15782] [client 172.16.39.101:53567] PHP Warning:  date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_t

[Wed Apr 17 08:18:19.093265 2019] [:error] [pid 15782] [client 172.16.39.101:53567] PHP Warning:  vsprintf(): Too few arguments in /usr/share/ocsinventory-reports/ocsreports/require/function_commun.php on line 74, referer: http://172.16.

[Wed Apr 17 08:18:19.093315 2019] [:error] [pid 15782] [client 172.16.39.101:53567] PHP Warning:  mysqli_query(): Empty query in /usr/share/ocsinventory-reports/ocsreports/require/function_commun.php on line 103, referer: http://172.16.6

SV = PV(0x55de7ed1d190) at 0x55de7ed03d88

  REFCNT = 2

  FLAGS = ()

  PV = 0

[Wed Apr 17 10:43:11.274230 2019] [:error] [pid 15786] [client 172.16.39.101:55153] PHP Warning:  date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_t

[Wed Apr 17 10:43:11.275525 2019] [:error] [pid 15786] [client 172.16.39.101:55153] PHP Warning:  date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_t

[Wed Apr 17 10:43:11.275591 2019] [:error] [pid 15786] [client 172.16.39.101:55153] PHP Warning:  date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_t

[Wed Apr 17 10:43:11.275624 2019] [:error] [pid 15786] [client 172.16.39.101:55153] PHP Warning:  date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_t

[Wed Apr 17 10:43:11.275658 2019] [:error] [pid 15786] [client 172.16.39.101:55153] PHP Warning:  date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_t

[Wed Apr 17 10:43:11.275707 2019] [:error] [pid 15786] [client 172.16.39.101:55153] PHP Warning:  mktime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default

[Wed Apr 17 10:43:11.275754 2019] [:error] [pid 15786] [client 172.16.39.101:55153] PHP Warning:  date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_t

[Wed Apr 17 10:43:11.279168 2019] [:error] [pid 15786] [client 172.16.39.101:55153] PHP Warning:  vsprintf(): Too few arguments in /usr/share/ocsinventory-reports/ocsreports/require/function_commun.php on line 74, referer: http://172.16.

[Wed Apr 17 10:43:11.279244 2019] [:error] [pid 15786] [client 172.16.39.101:55153] PHP Warning:  mysqli_query(): Empty query in /usr/share/ocsinventory-reports/ocsreports/require/function_commun.php on line 103, referer: http://172.16.6

[Wed Apr 17 11:09:26.668818 2019] [:error] [pid 28706] [client 172.16.39.101:55557] PHP Warning:  date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_t

[Wed Apr 17 11:09:26.669757 2019] [:error] [pid 28706] [client 172.16.39.101:55557] PHP Warning:  date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_t

[Wed Apr 17 11:09:26.669824 2019] [:error] [pid 28706] [client 172.16.39.101:55557] PHP Warning:  date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_t

[Wed Apr 17 11:09:26.669859 2019] [:error] [pid 28706] [client 172.16.39.101:55557] PHP Warning:  date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_t

[Wed Apr 17 11:09:26.669892 2019] [:error] [pid 28706] [client 172.16.39.101:55557] PHP Warning:  date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_t

[Wed Apr 17 11:09:26.669927 2019] [:error] [pid 28706] [client 172.16.39.101:55557] PHP Warning:  mktime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default

[Wed Apr 17 11:09:26.669963 2019] [:error] [pid 28706] [client 172.16.39.101:55557] PHP Warning:  date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_t

[Wed Apr 17 11:09:26.673193 2019] [:error] [pid 28706] [client 172.16.39.101:55557] PHP Warning:  vsprintf(): Too few arguments in /usr/share/ocsinventory-reports/ocsreports/require/function_commun.php on line 74, referer: http://172.16.

[Wed Apr 17 11:09:26.673241 2019] [:error] [pid 28706] [client 172.16.39.101:55557] PHP Warning:  mysqli_query(): Empty query in /usr/share/ocsinventory-reports/ocsreports/require/function_commun.php on line 103, referer: http://172.16.6

#var/log/ocsinventory-server/activity.log

   Is empty

I also show log in agent /var/log/ocs.agent.log

[Wed Apr 17 11:25:23 2019][error] Cannot establish communication : 503 Service Unavailable

[Wed Apr 17 11:25:33 2019][debug] Ocsinventory unified agent for UNIX, Linux and MacOSX 2.4.2

[Wed Apr 17 11:25:33 2019][debug] Log system initialised (File)

[Wed Apr 17 11:25:33 2019][debug] --scan-homedirs missing. Don't scan user directories

[Wed Apr 17 11:25:33 2019][debug] Accountinfo file: /var/lib/ocsinventory-agent/http:__172.16.61.184_ocsreports/ocsinv.adm

[Wed Apr 17 11:25:33 2019][debug] OCS Agent initialised

[Wed Apr 17 11:25:33 2019][debug] Turns hooks on for /etc/ocsinventory-agent/modules.conf

[Wed Apr 17 11:25:33 2019][debug] Ocsinventory unified agent for UNIX, Linux and MacOSX 2.4.2

[Wed Apr 17 11:25:33 2019][debug] Log system initialised (File)

[Wed Apr 17 11:25:33 2019][debug] Ocsinventory unified agent for UNIX, Linux and MacOSX 2.4.2

[Wed Apr 17 11:25:33 2019][debug] Log system initialised (File)

[Wed Apr 17 11:25:33 2019][debug] Calling handlers : `start_handler'

[Wed Apr 17 11:25:33 2019][debug] [download] Calling download_start_handler

[Wed Apr 17 11:25:33 2019][debug]  - LWP loaded

[Wed Apr 17 11:25:33 2019][debug]  - LWP::Protocol::https loaded

[Wed Apr 17 11:25:33 2019][debug] [snmp] Calling snmp_start_handler

[Wed Apr 17 11:25:33 2019][debug]  - Net::SNMP loaded

[Wed Apr 17 11:25:33 2019][debug] Compress::Zlib is available.

[Wed Apr 17 11:25:33 2019][debug] Calling handlers : `prolog_writer'

[Wed Apr 17 11:25:33 2019][debug] sending XML

[Wed Apr 17 11:25:33 2019][debug] sending: <?xml version="1.0" encoding="UTF-8"?>

<REQUEST>

  <DEVICEID>pruebasd9-2019-04-17-10-59-09</DEVICEID>

  <QUERY>PROLOG</QUERY>

</REQUEST>

[Wed Apr 17 11:25:33 2019][error] Cannot establish communication : 503 Service Unavailable

[Wed Apr 17 11:25:50 2019][debug] Ocsinventory unified agent for UNIX, Linux and MacOSX 2.4.2

[Wed Apr 17 11:25:50 2019][debug] Log system initialised (File)

[Wed Apr 17 11:25:50 2019][debug] --scan-homedirs missing. Don't scan user directories

[Wed Apr 17 11:25:50 2019][debug] Accountinfo file: /var/lib/ocsinventory-agent/http:__172.16.61.184_ocsinventory/ocsinv.adm

[Wed Apr 17 11:25:50 2019][debug] OCS Agent initialised

[Wed Apr 17 11:25:50 2019][debug] Turns hooks on for /etc/ocsinventory-agent/modules.conf

[Wed Apr 17 11:25:50 2019][debug] Ocsinventory unified agent for UNIX, Linux and MacOSX 2.4.2

[Wed Apr 17 11:25:50 2019][debug] Log system initialised (File)

[Wed Apr 17 11:25:50 2019][debug] Ocsinventory unified agent for UNIX, Linux and MacOSX 2.4.2

[Wed Apr 17 11:25:50 2019][debug] Log system initialised (File)

[Wed Apr 17 11:25:50 2019][debug] Calling handlers : `start_handler'

[Wed Apr 17 11:25:50 2019][debug] [snmp] Calling snmp_start_handler

[Wed Apr 17 11:25:50 2019][debug]  - Net::SNMP loaded

[Wed Apr 17 11:25:50 2019][debug] [download] Calling download_start_handler

[Wed Apr 17 11:25:50 2019][debug]  - LWP loaded

[Wed Apr 17 11:25:50 2019][debug]  - LWP::Protocol::https loaded

[Wed Apr 17 11:25:50 2019][debug] Compress::Zlib is available.

[Wed Apr 17 11:25:51 2019][debug] Calling handlers : `prolog_writer'

[Wed Apr 17 11:25:51 2019][debug] sending XML

[Wed Apr 17 11:25:51 2019][debug] sending: <?xml version="1.0" encoding="UTF-8"?>

<REQUEST>

  <DEVICEID>pruebasd9-2019-04-17-10-32-13</DEVICEID>

  <QUERY>PROLOG</QUERY>

</REQUEST>

[Wed Apr 17 11:25:51 2019][error] Cannot establish communication : 503 Service Unavailable

Note: ip 172.16.39.101 is host were I'm working.

PD: Sorry, I write very bad in English

closed with the note: problem was solved
in OCS Inventory NG agent for Unix by (210 points)
closed by

2 Answers

0 votes

Dear all

Change version ocsinventory:

  • Server comunication: Centos 7:
    •  OSC SERVER 2.6
    • PHP 7.3.6
    • MariaDB 10.3.15
  • Agent: Debian 9: 
    •  Ocsinventory Unix Agent 2.4.1

Use install sh for ocsinventory server.

I show the different logs:

  • var/log/httpd/error.log: 
    It's empty 
  • var/log/ocsinventory-server/activity.log:
    Thu Jun  6 02:10:37 2019;5805;505;NA;172.16.61.186;OCS-NG_unified_unix_agent_v2..4.1;handler;Database connection

  • /var/log/ocs.agent.log (the log agent):

    [Thu Jun  6 10:36:15 2019][debug] Ocsinventory unified agent for UNIX, Linux and MacOSX 2.4.1
    [Thu Jun  6 10:36:15 2019][debug] Log system initialised (File)
    [Thu Jun  6 10:36:15 2019][debug] --scan-homedirs missing. Don't scan user directories
    [Thu Jun  6 10:36:15 2019][debug] Accountinfo file: /var/lib/ocsinventory-agent/http:__172.16.61.184_ocsinventory/ocsinv.adm
    [Thu Jun  6 10:36:15 2019][debug] OCS Agent initialised
    [Thu Jun  6 10:36:15 2019][debug] Turns hooks on for /etc/ocsinventory-agent/modules.conf
    [Thu Jun  6 10:36:15 2019][debug] Ocsinventory unified agent for UNIX, Linux and MacOSX 2.4.1
    [Thu Jun  6 10:36:15 2019][debug] Log system initialised (File)
    [Thu Jun  6 10:36:15 2019][debug] Ocsinventory unified agent for UNIX, Linux and MacOSX 2.4.1
    [Thu Jun  6 10:36:15 2019][debug] Log system initialised (File)
    [Thu Jun  6 10:36:15 2019][debug] Calling handlers : `start_handler'
    [Thu Jun  6 10:36:15 2019][debug] [snmp] Calling snmp_start_handler
    [Thu Jun  6 10:36:15 2019][debug]  - Net::SNMP loaded
    [Thu Jun  6 10:36:15 2019][debug] [download] Calling download_start_handler
    [Thu Jun  6 10:36:15 2019][debug]  - LWP loaded
    [Thu Jun  6 10:36:15 2019][debug]  - LWP::Protocol::https loaded
    [Thu Jun  6 10:36:15 2019][debug] Compress::Zlib is available.
    [Thu Jun  6 10:36:15 2019][debug] Calling handlers : `prolog_writer'
    [Thu Jun  6 10:36:15 2019][debug] sending XML
    [Thu Jun  6 10:36:15 2019][debug] sending: <?xml version="1.0" encoding="UTF-8"?>
    <REQUEST>
      <DEVICEID>pruebasd9-2019-05-07-09-23-44</DEVICEID>
      <QUERY>PROLOG</QUERY>
    </REQUEST>
    [Thu Jun  6 10:36:15 2019][error] Cannot establish communication : 503 Service Unavailable

Please, I'm still trying to install

by (210 points)
edited by
0 votes

It's already working. Install with RPM following this guide: https://celerium.org/2018/11/03/setup-install-ocsng-on-centos-7/

It started to work when the agent sent a report to the server.

by (210 points)
 
Powered by Question2Answer
...