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.9.1 available

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

I can't deploy the OCS Inventory NG server

Community I need your help 

I can't deploy the OCS Inventory NG server, I get the following error.

Service Unavailable

The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.

in OCS Inventory NG server for Unix by (240 points)

7 Answers

0 votes
Please start to help you : give us MORE informations ! No info = no help !

'I can't deploy the server' : I know only 'I install server' !

The better is to follow tutorial like https://ask.ocsinventory-ng.org/13105/tutorial-ocsserver-2-9-on-debian-10-buster?show=13105#q13105 (It's for Debian but it's efficiant !).

As Apache is a requirement, you need to verify the service starts correctly and have a look on the log (tail -f /var/log/apache2/access.log). You need to know also how Apache use configuration file ou site file, and probably adapt the config file supplied by OCS server installation ...
by (7.6k points)
edited by
0 votes
Access log
[root@lxtocsinvent0001 httpd]# cat access_log-20220102
::1 - - [28/Dec/2021:15:01:13 -0400] "POST /cgi-bin/soap.cgi HTTP/1.1" 404 196 "-" "SOAP::Lite/Perl/1.27"
::1 - - [28/Dec/2021:15:01:13 -0400] "POST /soap HTTP/1.1" 404 196 "-" "SOAP::Lite/Perl/1.27"
::1 - - [28/Dec/2021:15:01:14 -0400] "POST /mod_perl/soap.mod_cgi HTTP/1.1" 404196 "-" "SOAP::Lite/Perl/1.27"
::1 - - [28/Dec/2021:15:01:14 -0400] "POST / HTTP/1.1" 403 199 "-" "SOAP::Lite/Perl/1.27"
::1 - - [28/Dec/2021:15:01:14 -0400] "POST /mod_soap HTTP/1.1" 404 196 "-" "SOAP::Lite/Perl/1.27"
172.27.129.165 - - [29/Dec/2021:11:47:33 -0400] "GET /ocsreports HTTP/1.1" 403 199 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36 Edg/96.0.1054.62"
172.27.129.165 - - [29/Dec/2021:11:47:33 -0400] "GET /favicon.ico HTTP/1.1" 404196 "http://172.27.177.160/ocsreports" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36 Edg/96.0.1054.62"
172.27.129.165 - - [29/Dec/2021:11:47:39 -0400] "GET /ocsreports HTTP/1.1" 403 199 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36 Edg/96.0.1054.62"
////////////////////////////////////////////////////////////////////////////////////////////////////////////
httpd.service - The Apache HTTP Server is running

   Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor pres>

   Active: active (running) since Thu 2022-01-06 06:31:15 AST; 6 days ago
by (240 points)
0 votes
what error have you in apache error log file ?
by (87.1k points)
0 votes
root@lxtocsinvent0001 logs]# cat error_log

[Wed Jan 05 09:50:09.240867 2022] [proxy:error] [pid 35255:tid 139811941177088] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /run/php-fpm/www.sock (*) failed

[Wed Jan 05 09:50:09.240990 2022] [proxy_fcgi:error] [pid 35255:tid 139811941177088] [client 172.27.129.165:21148] AH01079: failed to make connection to backend: httpd-UDS

[Wed Jan 05 09:50:10.557947 2022] [proxy:error] [pid 35252:tid 139811738130176] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /run/php-fpm/www.sock (*) failed

[Wed Jan 05 09:50:10.558030 2022] [proxy_fcgi:error] [pid 35252:tid 139811738130176] [client 172.27.129.165:21147] AH01079: failed to make connection to backend: httpd-UDS

[Wed Jan 05 09:50:10.786551 2022] [proxy:error] [pid 35255:tid 139811932784384] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /run/php-fpm/www.sock (*) failed

[Wed Jan 05 09:50:10.786594 2022] [proxy_fcgi:error] [pid 35255:tid 139811932784384] [client 172.27.129.165:21153] AH01079: failed to make connection to backend: httpd-UDS

[Wed Jan 05 09:50:11.000976 2022] [proxy:error] [pid 35255:tid 139811839006464] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /run/php-fpm/www.sock (*) failed

[Wed Jan 05 09:50:11.001068 2022] [proxy_fcgi:error] [pid 35255:tid 139811839006464] [client 172.27.129.165:21154] AH01079: failed to make connection to backend: httpd-UDS

[Wed Jan 05 09:50:11.203235 2022] [proxy:error] [pid 35255:tid 139811822221056] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /run/php-fpm/www.sock (*) failed
by (240 points)
0 votes
Your server seems mis-installed ...

Without informations of your installation and the way you choose to install, it's impossible to help you. (Sometimes it's more easy to follow a well tested tutorial ...)
by (7.6k points)
0 votes

Could you share a reliable tutorial with me?

by (240 points)
0 votes

IMHO creation of OCS server is easy with Debian.

For example https://ask.ocsinventory-ng.org/13105/tutorial-ocsserver-2-9-on-debian-10-buster?show=13105#q13105 is running well

My own procedure (for a fresh Debian Bullseye) :

# install MariaDB
apt install mariadb-server
mysql_secure_installation        # add password for root
mysql -u root -p XXXXX
 CREATE DATABASE ocsweb;
 CREATE USER 'ocsuser'@'localhost' IDENTIFIED BY 'password';
 GRANT ALL PRIVILEGES ON ocsweb.* to 'ocsuser'@'localhost';
 FLUSH PRIVILEGES;
 EXIT ;

# install Apache2 Php Perl + lib
apt install make cmake gcc build-essential        # for Perl building
apt install apache2 libapache2-mod-perl2 libapache-dbi-perl libapache-db-perl libapache2-mod-php
apt install php php-zip php-pclzip php-gd php-mysql php-soap php-curl php-json php-xml php-mbstring php-ldap
apt install perl libxml-simple-perl libcompress-zlib-perl libdbi-perl libdbd-mysql-perl libnet-ip-perl \
    libsoap-lite-perl libio-compress-perl libapache-dbi-perl libapache2-mod-perl2 libapache2-mod-perl2-dev \
    libdbd-mysql-perl libnet-ip-perl libxml-simple-perl libarchive-zip-perl

cpan install CPAN                # update cmd 'cpan'
cpan install XML::Entities Apache2::SOAP Net::IP Apache::DBI Mojolicious Switch Plack::Handler Archive::Zip

# install OCS Server
cd sources
wget https://github.com/OCSInventory-NG/OCSInventory-ocsreports/releases/ \
     download/2.X/OCSNG_UNIX_SERVER_2.X.tar.gz

tar xvzf OCSNG_UNIX_SERVER_2.X.X.tar.gz
cd OCSNG_UNIX_SERVER_2.X.X
vi setup.sh                 # put info DB_SERVER_xxx and some path
./setup.sh

Do you wish to continue ([y]/n)?  Enter
Which host is running database server [localhost] ?  Enter
On which port is running database server [3306] ?  Enter
Where is Apache daemon binary [/usr/sbin/apache2ctl] ?  Enter
Where is Apache main configuration file [/etc/apache2/apache2.conf] ?  Enter
Which user group is running Apache web server [www-data] ?  Enter
Where is Apache Include configuration directory [/etc/apache2/conf-available] ?  Enter
Where is PERL interpreter binary [/usr/bin/perl] ?  Entree
Do you wish to setup Communication server on this computer ([y]/n)?  Enter
Where to put Communication server log directory [/var/log/ocsinventory-server] ?  Enter
Where to put Communication server plugins configuration files [/etc/ocsinventory-server/plugins] ?  Enter
Where to put Communication server plugins Perl modules files [/etc/ocsinventory-server/perl] ?  Enter
Do you wish to setup Rest API server on this computer ([y]/n)?  Enter
Where do you want the API code to be store [/usr/local/share/perl/5.24.1] ?  Enter
Do you allow Setup renaming Communication Server Apache configuration file
 to ‘z-ocsinventory-server.conf’ ([y]/n) ?  Enter
Do you wish to setup Administration Server (Web Administration Console)
on this computer ([y]/n)?  Enter
Do you wish to continue ([y]/n)?  Enter
Where to copy Administration Server static files for PHP Web Console
 [/usr/share/ocsinventory-reports] ?  Enter
Where to create writable/cache directories for deployment packages,
 administration console logs, IPDiscover and SNMP [/var/lib/ocsinventory-reports] ?  Enter

# Apache conf
cd /etc/apache2/conf-available
vi ocsinventory-reports.conf       # check config
vi z-ocsinventory-server.conf      # check config : put correct value OCS_DB_XXXX
a2enconf ocsinventory-reports
a2enconf z-ocsinventory-server

apache2ctl -t         # is syntax correct ?
apache2ctl -S         # virtualhost ?
systemctl restart apache2

# launch reports to initialize DB
http://server/ocsreports/

# if OK
rm ocsreports/install.php   # better mv xxx xxx.old

# have a look on apache log
tail -f /var/log/apache2/access.log
# have a look on ocs activity
tail -f /var/log/ocsinventory-server/activity.log

(I tested : from a fresh VM Debian Bullseye, I dit it in 20' with copy/paste + 5' for adding/setting agent ... but I'm experienced ;) it need more and more time and knowledge for add certificate, use https, use different path, ...)

by (7.6k points)
edited by
 
Powered by Question2Answer
...