llng-fastcgi.sock failed
Concerned version
Version: %2.0.0
Platform: Nginx
Summary
Hello,
After installing LemonLDAP::NG2.0 on centos7 from the tarball, I got "502 bad gateway" or "server internal error" when trying to access to manager, portal or test1 and test2.
Logs
Nginx error_log
2018/06/21 10:03:43 [crit] 3428#0: *4 connect() to unix:/usr/local/run/llng-fastcgi.sock failed (2: No such file or directory) while connecting to upstream, client: 127.0.0.1, server: auth.example.com, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/usr/local/run/llng-fastcgi.sock:", host: "auth.example.com"
Backends used
left by default.
Possible fixes
It's because the fastcgi_pass of portal and manager is different from the llng-fastcgi-server's $socket variable. In fact,
in portal for example :
vi /usr/local/lemonldap-ng/etc/portal-nginx.conf
[...]
fastcgi_pass unix:/usr/local/run/llng-fastcgi.sock;
[...]
and in llng-fastcgi-server:
vi /usr/share/lemonldap-ng/sbin/llng-fastcgi-server
[...]
$socket ||= $ENV{SOCKET} || '/var/run/llng-fastcgi-server/llng-fastcgi.sock';
[...]
So portal is looking for llng-fastcgi.sock
in /usr/local/run/
while it's created in /var/run/llng-fastcgi-server/
By replacing /usr/local/run/llng-fastcgi.sock
by /var/run/llng-fastcgi-server/llng-fastcgi.sock
in nginx virtual hosts(portal, manager,test) it works fine.