Crivaledaz / Mattermost-LDAP

This module provides an external LDAP authentication in Mattermost for the Team Edition (free).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error 500 multiple reasons in docker image

GregpryA opened this issue · comments

Fresh install in docker mode.

  1. Error 500
    nginx log shows that 'ssl on' deprecated in oauth.conf (fixed with editing)
    nginx log shows duplicate localhost server names (fixed with making volume for default.conf with another server_name)

Now - nginx starts fine, but

  1. error 500 when hitting 'GitLab' button is still here.

docker logs showing:

NOTICE: PHP message: PHP Warning: require_once(config_db.php): Failed to open stream: No such file or directory in /var/www/html/oauth/server.php on line 7
NOTICE: PHP message: PHP Fatal error: Uncaught Error: Failed opening required 'config_db.php' (include_path='.:/usr/local/lib/php') in /var/www/html/oauth/server.php:7
Stack trace:
#0 /var/www/html/oauth/authorize.php(11): require_once()
#1 {main}
thrown in /var/www/html/oauth/server.php on line 7
192.168.112.4 - 30/Mar/2023:12:25:37 +0000 "GET /oauth/authorize.php" 500

Hi,

Thank you for your feedback and suggestion to fix the error 500 raised by NGINX.

Have you tried the Demo version with docker-compose? Does it work for you?

In the Demo version, SSL is disabled (commented out in the configuration), so the issues you are experiencing with NGINX should not exist in the Demo. If the Demo is working for you, I would suggest deploying Mattermost-LDAP in HTTP mode initially. Once it works in HTTP mode, you can then focus on configuring HTTPS.

According to your Docker logs, it seems that the PHP server cannot open the database configuration file config_db.php. Please check that this file exists in your working directory and is derived from config_db.php.example. The file config_db.php should be visible in your container (mounted as a volume, as all the oauth should be) and readable by the PHP user.

Additionally, I have pushed a fix for the database init script on the master branch. Please pull the changes and try again.

Please let me know if your issue is resolved.

Regards.

Dear Sir, thank you for the reply.

First of all: I definitely pulled Demo version, because it was the only one docker-based version I was able to find. Sorry, I've been totally M$ and Cisco man for decades until February. So *nix and Git is quite terra incogints for me. Again, sorry - if there is not-Demo docker based version - I wasn't able to find it. Please teach me, how to get it.

As for errors. No worries with HHTPS. As it was said, I managed to owercome this problem. But my fix was definitely not good, Breaking the great idea of flexibility and pkanform-indepebdense of docker concept. Plus my solution is not user-friendly.

But my main pain is second bug, As I said - the file is not existing within my docker. In fact - even location does not exist. Maybe it is because I was not able to find not-demo version with all features? That's possible. Or "dockerised" version was composed not in full. Dont know, who's fault here. Need help. : -))

Found out, that it was my fault in las part. I missed to rename config_db and config_ldap files, which likely lead to not full expansion of DB and other related files. You can safely close the case.