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

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

debian 10 - last version of ocs HTTP Status #404

Bonjour,

J'ai installé le dernier ocs 2.8.1 sur une debian 10.

Apres l installation le site fonctionne bien, je peux creer un tout ce que je veux.

Mon soucis vient de la remonté des agents qui sont installés sous windows 10, j'ai ce message :

COM SERVER => HTTP Post response received <HTTP Status Code #404>

j ai bien execute a2config sur les 3 fichiers pas de soucis rencontrés, j'ai vérifié les noms user et password dans les fichiers tout est bon.

Dites moi ce dont vous avez besoin comme fichiers de log .
in OCS Inventory NG server for Unix by (770 points)
retagged by

29 Answers

+1 vote

Avez-vous vérifié dbconfig.inc.php?

nano /usr/share/ocsinventory-reports/ocsreports/dbconfig.inc.php

Également

nano /etc/apache2/conf-available/z-ocsinventory-server.conf

by (1.4k points)
edited by
0 votes

Oui les voila, ils me semblent correct

/usr/share/ocsinventory-reports/ocsreports/dbconfig.inc.php

<?php

define("DB_NAME", "ocsdb");

define("SERVER_READ","localhost");

define("SERVER_WRITE","localhost");

define("SERVER_PORT","3306");

define("COMPTE_BASE","ocsuser");

define("PSWD_BASE","C@mpusFrance");

define("ENABLE_SSL","0");

define("SSL_MODE","");

define("SSL_KEY","");

define("SSL_CERT","");

define("CA_CERT","");

?>

Et le fichier /etc/apache2/conf-available/z-ocsinventory-server.conf

PerlSetEnv OCS_DB_HOST localhost

  # Replace 3306 by port where running MySQL server, generally 3306

  PerlSetEnv OCS_DB_PORT 3306

  # Name of database

  PerlSetEnv OCS_DB_NAME ocsdb

  PerlSetEnv OCS_DB_LOCAL ocsdb

  # User allowed to connect to database

  PerlSetEnv OCS_DB_USER ocsuser

  # Password for user

  PerlSetVar OCS_DB_PWD C@mpusFrance

  # SSL Configuration

  # 0 to disable the SSL support for MySQL/MariaDB

  # 1 to enable the SSL support for MySQL/MariaDB

  PerlSetEnv OCS_DB_SSL_ENABLED 0

  # PerlSetEnv OCS_DB_SSL_CLIENT_KEY /etc/ssl/private/client.key

  # PerlSetEnv OCS_DB_SSL_CLIENT_CERT /etc/ssl/certs/client.crt

  # PerlSetEnv OCS_DB_SSL_CA_CERT /etc/ssl/certs/ca.crt

  # SSL Mode

  # Password for user

by (770 points)
0 votes
Est ce que les fichiers sont correct pour vous ?
by (770 points)
0 votes

Dans le fichier d'erreur de mysql j'ai ca :

2021-03-18 12:39:25 90 [Warning] Access denied for user 'ocs'@'localhost'

mais je ne comprends pas ou il peut voir ce user .

by (770 points)
0 votes
1.
mysql -u root -p
SELECT User FROM mysql.user;
Voyez-vous « ocsuser » dans la liste?

2.
mysql -u root -p
SHOW GRANTS FOR 'ocs'@'localhost';

3.
nano /etc/apache2/conf-available/zz-ocsinventory-restapi.conf
Que vois-tu?
by (1.4k points)
edited by
0 votes
A chaque modification dans le fichier z-ocsinventory-server.conf il faut redémarrer apache sinon les modifications ne sont pas prises en compte.
by (88.5k points)
0 votes
voila mon fichier zz-ocsinventory-restapi.conf

$ENV{plack_env] = 'production';

$ENV{mojo_home]= '/usr/local/share/perl/5.28.1';

ocs_db_port = localhost

ocs_db_port = 3306

ocs_db_user = ocsuser

ocs_db_pwd = C@mpusFrance

ocs_db_ssl_enabled = 0

ocs_db_SSL_client_key = ''

ocs_db_db_client = ''

ocs_db_ssl_ca_cert = ''

ocs_db_ssl_mode = ssl_mode_preferred

Et oui je vois bien le ocsuser dans la base de mysql
by (770 points)
0 votes

S’il vous plaît essayer cette commande. Que vois-tu?

mysql -u root -p
SHOW GRANTS FOR 'ocs'@'localhost';

Exemple:

by (1.4k points)
0 votes

Voila ce que cela donne

MariaDB [(none)]> show grants for 'ocsuser'@'localhost';

+----------------------------------------------------------------------------------------------------------------+

| Grants for ocsuser@localhost                                                                                   |

+----------------------------------------------------------------------------------------------------------------+

| GRANT USAGE ON *.* TO `ocsuser`@`localhost` IDENTIFIED BY PASSWORD '*B8095007AFBAAF5A50CF5EA564791203B0013CFB' |

| GRANT ALL PRIVILEGES ON `ocsdb`.* TO `ocsuser`@`localhost`                                                     |

+----------------------------------------------------------------------------------------------------------------+

2 rows in set (0.000 sec)

by (770 points)
0 votes

"2021-03-18 12:39:25 90 [Warning] Access denied for user 'ocs'@'localhost'"

Il semble que l’agent utilise « ocs » et non « ocsuser ». Avez-vous essayé cette commande pour installer l’agent?

Exemple: 

c:\OCS-Windows-Agent-Setup.exe /S /NOSPLASH /UPGRADE /NO_SYSTRAY /NOW /SERVER=http://xx.xx.xx.xx:80/ocsinventory /USER=ocsuser /PWD=C@mpusFrance

by (1.4k points)
 
Powered by Question2Answer
...