Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OCSS - DOCKER HTTP ERROR 500 #1643

Open
KAALP974 opened this issue Oct 21, 2024 · 1 comment
Open

OCSS - DOCKER HTTP ERROR 500 #1643

KAALP974 opened this issue Oct 21, 2024 · 1 comment

Comments

@KAALP974
Copy link

Bonjour,

Après avoir installé OCS Inventory (Nightly) dans un conteneur Docker avec MariaDB, je n'ai aucun accès à mon http://localhost:8080/ocsreports/ et plusieurs erreurs sont survenues dans les logs. J'ai tenté d'apporter plusieurs correctifs pour résoudre ces problèmes, mais malgré cela, les erreurs persistent et les corrections ne semblent pas prises en compte. Voici les détails complets :

Processus de création des conteneurs :

Conteneur MariaDB :

docker run --name mariadb -e MYSQL_ROOT_PASSWORD=****** -e MYSQL_DATABASE=ocsweb -e MYSQL_USER=****** -e MYSQL_PASSWORD=****** -d mariadb:latest

Conteneur OCS Inventory :

docker run -d --name ocs_inventory -e OCS_DB_HOST=mariadb -e OCS_DB_NAME=ocsweb -e OCS_DB_USER=***** -e OCS_DB_PASS=****** -p 8080:80 ocsinventory/ocsinventory-docker-image:nightly

Erreurs après le démarrage :

Paramètres OCS Inventory non définis : Malgré l'ajout des paramètres dans le fichier de configuration d'OCS Inventory, les erreurs suivantes continuent d'apparaître :

ocsinventory-server: Bad setting. SCAN_TYPE_SNMP is not set. Default: ICMP ocsinventory-server: Bad setting. SCAN_ARP_BANDWIDTH is not set. Default: 256 ocsinventory-server: Bad setting. SNMP_LINK_TAG is not set. Default: 0 ocsinventory-server: Bad setting. GENERATE_OCS_FILES_SNMP is not set. Default: 0 ocsinventory-server: Bad setting. SCAN_TYPE_IPDISCOVER is not set. Default: ICMP ocsinventory-server: Bad setting. IPDISCOVER_LINK_TAG_NETWORK is not set. Default: 0

Modules Perl manquants : J'ai installé les modules Perl nécessaires pour SOAP, mais les erreurs suivantes sont toujours présentes dans les logs :

OCSINVENTORY: (SOAP): Cannot find XML::Entities ocsinventory-server: Can't load SOAP::Transport::HTTP* - Web service will be unavailable

Avertissement Apache - ServerName non défini : J'ai ajouté ServerName localhost dans la configuration Apache, mais l'avertissement persiste :

AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.18.0.5. Set the 'ServerName' directive globally to suppress this message

Erreur install.php manquant : L'erreur suivante continue d'apparaître malgré plusieurs tentatives de correction :

PHP Warning: require(install.php): Failed to open stream: No such file or directory in /usr/share/ocsinventory-reports/ocsreports/require/header.php on line 169 PHP Fatal error: Uncaught Error: Failed opening required 'install.php' (include_path='.:/usr/share/php') in /usr/share/ocsinventory-reports/ocsreports/require/header.php on line 169

Le conteneur ne démarre pas sur la version 12.2.3 (latest) : En utilisant la version 12.2.3 d'OCS Inventory, le conteneur ne démarre pas en raison d'une erreur dans le fichier Apache à la ligne 77. Des erreurs multiples apparaissent également sur la version 12.2. L'erreur est la suivante :
AH00526: Syntax error on line 77 of /etc/apache2/conf-enabled/z-ocsinventory-server.conf: PerlS

       Une multitude d'erreurs surviennent également avec les autres versions en deça de la 12.2.. 

J'ai tenté de corriger ces erreurs en suivant les recommandations (paramètres dans le fichier de configuration, installation des modules manquants, etc.), mais les problèmes persistent. Je souhaiterais obtenir de l'aide à p

Merci d'avance pour votre assistance.

Cordialement,
KAA

@KAALP974
Copy link
Author

Bonjour,

Malgré l'ajout de la ligne de commande " OCS_OPT_DBI_PRINT_ERROR (=0 ou =1) " dans le lancement du container, je n'ai aucun accès au : http://localhost:8080/ocsreports/

Cette page n’est pas disponible pour le moment

localhost ne peut actuellement pas traiter cette demande.

HTTP ERROR 500

Voici les erreurs :

2024-10-04 1458:40 /docker-entrypoint.sh: Configuration complete; ready for start up 2024-10-04 14:58:41 ocsinventory-server: Bad setting. SCAN_ARP_BANDWIDTH is not set. Default: 256 2024-10-04 14:58:41 ocsinventory-server: Bad setting. IPDISCOVER_LINK_TAG_NETWORK is not set. Default: 0 2024-10-04 14:58:41 ocsinventory-server: Bad setting. GENERATE_OCS_FILES_SNMP is not set. Default: 0 2024-10-04 14:58:41 ocsinventory-server: Bad setting. SCAN_TYPE_SNMP is not set. Default: ICMP 2024-10-04 14:58:41 ocsinventory-server: Bad setting. SCAN_TYPE_IPDISCOVER is not set. Default: ICMP 2024-10-04 14:58:41 ocsinventory-server: Bad setting. SNMP_LINK_TAG is not set. Default: 0 2024-10-04 14:58:41 [Fri Oct 4 12:58:41 2024] OCSINVENTORY: (SOAP): Cannot find XML::Entities 2024-10-04 14:58:42 ocsinventory-server: Can't load SOAP::Transport::HTTP* - Web service will be unavailable 2024-10-04 14:58:42 AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.18.0.2. Set the 'ServerName' directive globally to suppress this message 2024-10-04 14:58:42 ocsinventory-server: Bad setting. SCAN_ARP_BANDWIDTH is not set. Default: 256 2024-10-04 14:58:42 ocsinventory-server: Bad setting. SNMP_LINK_TAG is not set. Default: 0 2024-10-04 14:58:42 ocsinventory-server: Bad setting. GENERATE_OCS_FILES_SNMP is not set. Default: 0 2024-10-04 14:58:42 ocsinventory-server: Bad setting. IPDISCOVER_LINK_TAG_NETWORK is not set. Default: 0 2024-10-04 14:58:42 ocsinventory-server: Bad setting. SCAN_TYPE_IPDISCOVER is not set. Default: ICMP 2024-10-04 14:58:42 ocsinventory-server: Bad setting. SCAN_TYPE_SNMP is not set. Default: ICMP 2024-10-04 14:58:42 [Fri Oct 4 12:58:42 2024] OCSINVENTORY: (SOAP): Cannot find XML::Entities 2024-10-04 14:58:43 ocsinventory-server: Can't load SOAP::Transport::HTTP* - Web service will be unavailable 2024-10-04 14:58:43 AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.18.0.2. Set the 'ServerName' directive globally to suppress this message 2024-10-04 14:58:43 [Fri Oct 04 12:58:43.916387 2024] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.52 (Ubuntu) mod_perl/2.0.12 Perl/v5.34.0 configured -- resuming normal operations 2024-10-04 14:58:43 [Fri Oct 04 12:58:43.917240 2024] [core:notice] [pid 1] AH00094: Command line: '/usr/sbin/apache2 -D FOREGROUND' 2024-10-04 14:58:57 [Fri Oct 04 12:58:57.657872 2024] [php:warn] [pid 129] [client 172.18.0.1:47412] PHP Warning: require(install.php): Failed to open stream: No such file or directory in /usr/share/ocsinventory-reports/ocsreports/require/header.php on line 169 2024-10-04 14:58:57 [Fri Oct 04 12:58:57.660434 2024] [php:error] [pid 129] [client 172.18.0.1:47412] PHP Fatal error: Uncaught Error: Failed opening required 'install.php' (include_path='.:/usr/share/php') in /usr/share/ocsinventory-reports/ocsreports/require/header.php:169\nStack trace:\n#0 /usr/share/ocsinventory-reports/ocsreports/index.php(44): require()\n#1 {main}\n thrown in /usr/share/ocsinventory-reports/ocsreports/require/header.php on line 169 2024-10-04 14:58:57 172.18.0.1 - - [04/Oct/2024:12:58:57 +0200] "GET /ocsreports/ HTTP/1.1" 500 295 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36 Edg/129.0.0.0" 2024-10-04 14:59:42 172.18.0.1 - - [04/Oct/2024:12:59:42 +0200] "-" 408 0 "-" "-

Cordialement

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants