Minor error when applying configuration using manager with non-standard port
Concerned version
- version: 2.0.11
- run in demo mode using docker
Summary
- manager try to connect to localhost:80 when applying a new configuration instead of the custom port (localhost:8080 in my case)
Step to reproduce
- set LLNG behind a proxy with the redirection proxy_host:80 <-> LLNG_host:8080
- LLNG use NGINX and FAST_CGI that use the 8080 port and redirect to LLNG vhost
- log as default admin
- got to manager and update the config
- config is saved but the text box show
Successfully saved
Apply result
localhost: Error 500 (Can't connect to localhost:80 (Connection refused))
Possible fixes
First what the point of this connection ? I assume this is use to reload portal in order to apply the new config.
We could add a var to set the port used for internal communication (vhost port management can't be used because of the proxy). (It may already exist but i can't find any relevant information about it).
Logs
[LLNG:36] [debug] Check configuration for Lemonldap::NG::Handler::PSGI::Main
[LLNG:36] [debug] Get configuration from cache without verification.
[LLNG:36] [debug] Lemonldap::NG::Handler::PSGI::Main: configuration is up to date
[LLNG:36] [debug] Get session 1243b8abe3ae3be05e473c08dacddb880d207b8221c64fd0b49ba4978bd9fb96 from Handler::Main::Run
[LLNG:36] [debug] Check session validity from Handler
[LLNG:36] [debug] Session timeout -> 72000
[LLNG:36] [debug] Session _utime -> 1625820200
[LLNG:36] [debug] now -> 1625820351
[LLNG:36] [debug] Session timeoutActivityInterval -> 60
[LLNG:36] [debug] Session TTL = 71849
[LLNG:36] [debug] No URL authentication level found...
[LLNG:36] [debug] Regexp "Configuration" match
[LLNG:36] [debug] removing cookie
[LLNG:36] [debug] Cookies -> llnglanguage=en; lemonldap=1243b8abe3ae3be05e473c08dacddb880d207b8221c64fd0b49ba4978bd9fb96
[LLNG:36] [debug] CookieName -> lemonldap
[LLNG:36] [debug] newCookies -> llnglanguage=en;
[LLNG:36] [debug] User dwho was granted to access to /manager.psgi/confs/?cfgNum=1
[LLNG:36] [debug] User authenticated, calling handler()
[LLNG:36] [debug] Start routing confs
[LLNG:36] [notice] Request for configuration reload
[LLNG:36] [debug] Check configuration for Lemonldap::NG::Handler::Main
[LLNG:36] [debug] Configuration 2 stored.
Get configuration 2.
[LLNG:36] [debug] Get configuration 2
[LLNG:36] [info] Loading configuration 2 for process 36
[LLNG:36] [debug] Process 36 calls defaultValuesInit
[LLNG:36] [debug] Options maintenance for vhost manager.example.org: 0
[LLNG:36] [debug] Process 36 calls jailInit
[LLNG:36] [debug] Process 36 calls portalInit
[LLNG:36] [debug] Process 36 calls locationRulesInit
[LLNG:36] [debug] Process 36 calls sessionStorageInit
[LLNG:36] [debug] Process 36 calls headersInit
[LLNG:36] [debug] Process 36 calls postUrlInit
[LLNG:36] [debug] Process 36 calls aliasInit
[LLNG:36] [debug] Process 36 calls oauth2Init
[LLNG:36] [debug] Launching Lemonldap::NG::Handler::FastCGI::Loader->loadCustomHandlers(conf)
[LLNG:36] [debug] Lemonldap::NG::Handler::Main: configuration is up to date
[LLNG:36] [debug] Returned userId: dwho
[LLNG:36] [notice] User dwho has stored conf 2
[LLNG:36] [debug] [notice] User dwho has stored conf 2
[LLNG:36] [debug] Check configuration for Lemonldap::NG::Handler::PSGI::Main
[LLNG:36] [debug] Get configuration from cache without verification.
[LLNG:36] [debug] Lemonldap::NG::Handler::PSGI::Main: configuration is up to date
[LLNG:36] [debug] Sending reload request to localhost
[LLNG:36] [error] Apply configuration for localhost: error 500 (Can't connect to localhost:80 (Connection refused))
[LLNG:31] [debug] Check configuration for Lemonldap::NG::Handler::PSGI::Main
[LLNG:31] [debug] Get configuration from cache without verification.
[LLNG:31] [debug] Get configuration 2
[LLNG:31] [info] Loading configuration 2 for process 31
[LLNG:31] [debug] Process 31 calls defaultValuesInit
[LLNG:31] [debug] Options maintenance for vhost manager.example.org: 0
[LLNG:31] [debug] Process 31 calls jailInit
[LLNG:31] [debug] Process 31 calls portalInit
[LLNG:31] [debug] Process 31 calls locationRulesInit
[LLNG:31] [debug] Process 31 calls sessionStorageInit
[LLNG:31] [debug] Process 31 calls headersInit
[LLNG:31] [debug] Process 31 calls postUrlInit
[LLNG:31] [debug] Process 31 calls aliasInit
[LLNG:31] [debug] Process 31 calls oauth2Init
[LLNG:31] [debug] Launching Lemonldap::NG::Handler::FastCGI::Loader->loadCustomHandlers(conf)
[LLNG:31] [debug] Launching Lemonldap::NG::Portal::Main->reloadConf(conf)
[LLNG:31] [debug] Declaring unauth route
[LLNG:31] [debug] Add GET route:
[LLNG:31] [debug] route * added
[LLNG:31] [debug] Declaring unauth route
[LLNG:31] [debug] Add POST route:
[LLNG:31] [debug] route * added
[LLNG:31] [debug] Declaring auth route
[LLNG:31] [debug] Add GET route:
[LLNG:31] [debug] route * added
[LLNG:31] [debug] Declaring auth route
[LLNG:31] [debug] Add POST route:
[LLNG:31] [debug] route * added
[LLNG:31] [debug] Declaring unauth route
[LLNG:31] [debug] Add GET route:
[LLNG:31] [debug] route psgi.js added
[LLNG:31] [debug] Declaring auth route
[LLNG:31] [debug] Add GET route:
[LLNG:31] [debug] route psgi.js added
[LLNG:31] [debug] Declaring unauth route
[LLNG:31] [debug] Add GET route:
[LLNG:31] [debug] route portal.css added
[LLNG:31] [debug] Declaring auth route
[LLNG:31] [debug] Add GET route:
[LLNG:31] [debug] route portal.css added
[LLNG:31] [debug] Declaring unauth route
[LLNG:31] [debug] Add GET route:
[LLNG:31] [debug] route : added
[LLNG:31] [debug] Declaring auth route
[LLNG:31] [debug] Add GET route:
[LLNG:31] [debug] route : added
[LLNG:31] [debug] Declaring unauth route
[LLNG:31] [debug] Add GET route:
[LLNG:31] [debug] route ping added
[LLNG:31] [debug] Declaring auth route
[LLNG:31] [debug] Add GET route:
[LLNG:31] [debug] route ping added
[LLNG:31] [debug] Declaring auth route
[LLNG:31] [debug] Add GET route:
[LLNG:31] [debug] route refresh added
[LLNG:31] [debug] Declaring auth route
[LLNG:31] [debug] Add OPTIONS route:
[LLNG:31] [debug] route * added
[LLNG:31] [debug] Declaring unauth route
[LLNG:31] [debug] Add OPTIONS route:
[LLNG:31] [debug] route * added
[LLNG:31] [debug] Declaring auth route
[LLNG:31] [debug] Add GET route:
[LLNG:31] [debug] route logout added
[LLNG:31] [debug] Declaring unauth route
[LLNG:31] [debug] Add GET route:
[LLNG:31] [debug] route logout added
[LLNG:31] [debug] Initialized CSP headers : default-src 'self';img-src 'self' data:;style-src 'self';font-src 'self';connect-src 'self';script-src 'self';
[LLNG:31] [debug] Initialized CORS headers : Access-Control-Allow-Origin;*;Access-Control-Allow-Credentials;true;Access-Control-Allow-Headers;*;Access-Control-Allow-Methods;POST,GET;Access-Control-Expose-Headers;*;Access-Control-Max-Age;86400;
[LLNG:31] [debug] Cookies will use SameSite=Lax
[LLNG:31] [debug] Module Lemonldap::NG::Portal::Main::Menu loaded
[LLNG:31] [debug] Plugin ::Main::Menu initializated
[LLNG:31] [debug] Module Lemonldap::NG::Portal::Auth::Demo loaded
[LLNG:31] [warn] Using demonstration mode, go to Manager to edit the configuration
[LLNG:31] [debug] Module Lemonldap::NG::Portal::Lib::OneTimeToken loaded
[LLNG:31] [debug] Plugin ::Auth::Demo initializated
[LLNG:31] [debug] Module Lemonldap::NG::Portal::UserDB::Demo loaded
[LLNG:31] [debug] Plugin ::UserDB::Demo initializated
[LLNG:31] [debug] Module Lemonldap::NG::Portal::2F::Engines::Default loaded
[LLNG:31] [debug] Checking utotp2fActivation
[LLNG:31] [debug] -> not enabled
[LLNG:31] [debug] Checking totp2fActivation
[LLNG:31] [debug] -> not enabled
[LLNG:31] [debug] Checking u2fActivation
[LLNG:31] [debug] -> not enabled
[LLNG:31] [debug] Checking rest2fActivation
[LLNG:31] [debug] -> not enabled
[LLNG:31] [debug] Checking mail2fActivation
[LLNG:31] [debug] -> not enabled
[LLNG:31] [debug] Checking ext2fActivation
[LLNG:31] [debug] -> not enabled
[LLNG:31] [debug] Checking yubikey2fActivation
[LLNG:31] [debug] -> not enabled
[LLNG:31] [debug] Checking radius2fActivation
[LLNG:31] [debug] -> not enabled
[LLNG:31] [debug] Checking totp2fSelfRegistration
[LLNG:31] [debug] -> not enabled
[LLNG:31] [debug] Checking u2fSelfRegistration
[LLNG:31] [debug] -> not enabled
[LLNG:31] [debug] Checking yubikey2fSelfRegistration
[LLNG:31] [debug] -> not enabled
[LLNG:31] [debug] Processing Extra 2F modules
[LLNG:31] [debug] Plugin ::2F::Engines::Default initializated
[LLNG:31] [debug] Module Lemonldap::NG::Portal::Plugins::Notifications loaded
[LLNG:31] [debug] Declaring unauth route
[LLNG:31] [debug] Add POST route:
[LLNG:31] [debug] route notifback added
[LLNG:31] [debug] Add GET route:
[LLNG:31] [debug] route notifback added
[LLNG:31] [debug] Declaring auth route
[LLNG:31] [debug] Add POST route:
[LLNG:31] [debug] route notifback added
[LLNG:31] [debug] Module Lemonldap::NG::Portal::Lib::Notifications::JSON loaded
[LLNG:31] [debug] Use extension "json" to store notification files
[LLNG:31] [debug] Found endAuth entry point:
[LLNG:31] [debug] -> checkNotifDuringAuth
[LLNG:31] [debug] Plugin ::Plugins::Notifications initializated
[LLNG:31] [debug] Module Lemonldap::NG::Portal::Plugins::History loaded
[LLNG:31] [debug] Found endAuth entry point:
[LLNG:31] [debug] -> run
[LLNG:31] [debug] Plugin ::Plugins::History initializated
[LLNG:31] [debug] Module Lemonldap::NG::Portal::Plugins::Upgrade loaded
[LLNG:31] [debug] Declaring auth route
[LLNG:31] [debug] Add GET route:
[LLNG:31] [debug] route upgradesession added
[LLNG:31] [debug] Declaring auth route
[LLNG:31] [debug] Add POST route:
[LLNG:31] [debug] route upgradesession added
[LLNG:31] [debug] Declaring auth route
[LLNG:31] [debug] Add GET route:
[LLNG:31] [debug] route renewsession added
[LLNG:31] [debug] Declaring auth route
[LLNG:31] [debug] Add POST route:
[LLNG:31] [debug] route renewsession added
[LLNG:31] [debug] Plugin ::Plugins::Upgrade initializated
[LLNG:31] [debug] Module Lemonldap::NG::Portal::Plugins::RESTServer loaded
[LLNG:31] [debug] Module Lemonldap::NG::Portal::Lib::Captcha loaded
[LLNG:31] [debug] Declaring unauth route
[LLNG:31] [debug] Add GET route:
[LLNG:31] [debug] route renewcaptcha added
[LLNG:31] [debug] Declaring auth route
[LLNG:31] [debug] Add GET route:
[LLNG:31] [debug] route * added
[LLNG:31] [debug] Add POST route:
[LLNG:31] [debug] route * added
[LLNG:31] [debug] Declaring auth route
[LLNG:31] [debug] Add DELETE route:
[LLNG:31] [debug] route : added
[LLNG:31] [debug] route * added
[LLNG:31] [debug] Declaring auth route
[LLNG:31] [debug] Add PUT route:
[LLNG:31] [debug] route : added
[LLNG:31] [debug] Plugin ::Plugins::RESTServer initializated
[LLNG:31] [debug] Module Lemonldap::NG::Portal::Password::Demo loaded
[LLNG:31] [debug] Found forAuthUser entry point:
[LLNG:31] [debug] -> _modifyPassword
[LLNG:31] [debug] Plugin ::Password::Demo initializated
[LLNG:31] [debug] Module Lemonldap::NG::Portal::Plugins::Register loaded
[LLNG:31] [debug] Declaring unauth route
[LLNG:31] [debug] Add POST route:
[LLNG:31] [debug] route register added
[LLNG:31] [debug] Add GET route:
[LLNG:31] [debug] route register added
[LLNG:31] [debug] Module Lemonldap::NG::Portal::Lib::Captcha loaded
[LLNG:31] [debug] Module Lemonldap::NG::Portal::Register::Demo loaded
[LLNG:31] [debug] Plugin ::Register::Demo initializated
[LLNG:31] [debug] Plugin ::Plugins::Register initializated
[LLNG:31] [debug] Vhost test2.example.org added in trusted domains
[LLNG:31] [debug] Vhost manager.example.org added in trusted domains
[LLNG:31] [debug] Vhost sso.example.org added in trusted domains
[LLNG:31] [debug] Vhost test1.example.org added in trusted domains
[LLNG:31] [debug] Lemonldap::NG::Handler::PSGI::Main: configuration is up to date
[LLNG:31] [debug] Get session 1243b8abe3ae3be05e473c08dacddb880d207b8221c64fd0b49ba4978bd9fb96 from Handler::Main::Run
[LLNG:31] [debug] Check session validity from Handler
[LLNG:31] [debug] Session timeout -> 72000
[LLNG:31] [debug] Session _utime -> 1625820200
[LLNG:31] [debug] now -> 1625820351
[LLNG:31] [debug] Session timeoutActivityInterval -> 60
[LLNG:31] [debug] Session TTL = 71849
[LLNG:31] [debug] No URL authentication level found...
[LLNG:31] [debug] Regexp "Configuration" match
[LLNG:31] [debug] removing cookie
[LLNG:31] [debug] Cookies -> llnglanguage=en; lemonldap=1243b8abe3ae3be05e473c08dacddb880d207b8221c64fd0b49ba4978bd9fb96
[LLNG:31] [debug] CookieName -> lemonldap
[LLNG:31] [debug] newCookies -> llnglanguage=en;
[LLNG:31] [debug] User dwho was granted to access to /manager.psgi/confs/latest
[LLNG:31] [debug] User authenticated, calling handler()
[LLNG:31] [debug] Start routing confs
[LLNG:31] [debug] Search for cfgNum in conf
[LLNG:31] [debug] Cfgnum set to latest
[LLNG:31] [debug] Search for cfgAuthor in conf
[LLNG:31] [debug] Cfgnum set to 2
[LLNG:31] [debug] Search for cfgDate in conf
[LLNG:31] [debug] Cfgnum set to 2
[LLNG:31] [debug] Search for cfgAuthorIP in conf
[LLNG:31] [debug] Cfgnum set to 2
[LLNG:31] [debug] Search for cfgLog in conf
[LLNG:31] [debug] Cfgnum set to 2
[LLNG:31] [debug] Search for cfgVersion in conf
[LLNG:31] [debug] Cfgnum set to 2
[LLNG:31] [info] REST request to get configuration metadata (2)