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

Passport service doesn't perform restart properly / Error: Received unexpected HTTP status code of 503 #51

Closed
mzico opened this Issue Oct 21, 2018 · 7 comments

Comments

Projects
None yet
4 participants
@mzico

mzico commented Oct 21, 2018

Installed passport in 3.1.4. By default it's running as I said 'yes' at the time of installation.
I added my external IDP in saml config file and went to stop/start passport; but passport didn't start.
I had to remove passport related logs manually to start passport again.
Whole output from terminal is below:

- Ubuntu 16.04
- Gluu Server version: 3.1.4

root@localhost:/etc/gluu/conf# service passport stop
Stopping passport: OK
root@localhost:/etc/gluu/conf# service passport start
Starting passport:
Checking logs for possible errors:
Some error encountered...
See log below: 

2018-10-21T19:11:46+0000 [WARN] Error: Received unexpected HTTP status code of 503
2018-10-21T19:12:46+0000 [WARN] Error: Received unexpected HTTP status code of 503
2018-10-21T19:13:46+0000 [WARN] Error: Received unexpected HTTP status code of 503
2018-10-21T19:14:29+0000 [WARN] Error: Received unexpected HTTP status code of 503

For details please check /opt/gluu/node/passport/server/logs/passport-2018-10-21.log .

Stopping passport: OK

Exiting...
root@localhost:/etc/gluu/conf# rm -f -r /opt/gluu/node/passport/server/logs/
.audit.json              passport-2018-10-21.log  start.log                
root@localhost:/etc/gluu/conf# rm -f -r /opt/gluu/node/passport/server/logs/*
root@localhost:/etc/gluu/conf# ls /opt/gluu/node/passport/server/logs/
root@localhost:/etc/gluu/conf# service passport start
Starting passport:
Checking logs for possible errors:
PID: [18321]
OK Sun Oct 21 19:15:53 UTC 2018
root@localhost:/etc/gluu/conf# service passport status
Node running pid=18321

NODE_HOME     =  /opt/node
NODE_BASE     =  /opt/gluu/node/passport/server
NODE_CONF     =  
NODE_PID_FILE      =  /var/run/passport.pid
NODE_START    =  /opt/gluu/node/passport/server/app.js
NODE_LOGS     =  /opt/gluu/node/passport/server/logs
NODE_STATE    =  /opt/gluu/node/passport/server/passport.state
CLASSPATH      =  
NODE           =  /opt/node/bin/node
NODE_OPTIONS   =  PORT=8090 NODE_ENV=unknown NODE_CONFIG_DIR=/opt/gluu/node/passport/server HOSTNAME=localhost NODE_LOGGING_DIR=/opt/gluu/node/passport/server/logs
NODE_ARGS     =  --max-old-space-size=384
RUN_CMD        =  PORT=8090 NODE_ENV=unknown NODE_CONFIG_DIR=/opt/gluu/node/passport/server HOSTNAME=localhost NODE_LOGGING_DIR=/opt/gluu/node/passport/server/logs /opt/node/bin/node --max-old-space-size=384 /opt/gluu/node/passport/server/app.js

root@localhost:/etc/gluu/conf# 

@mzico mzico added the bug label Oct 21, 2018

@mzico mzico added this to the 3.1.4 milestone Oct 21, 2018

@yurem

This comment has been minimized.

Contributor

yurem commented Oct 22, 2018

On which server we can find logs?

For details please check /opt/gluu/node/passport/server/logs/passport-2018-10-21.log
@jgomer2001

This comment has been minimized.

Contributor

jgomer2001 commented Nov 11, 2018

also see #49 (comment)

@jgomer2001

This comment has been minimized.

Contributor

jgomer2001 commented Nov 11, 2018

I added my external IDP in saml config file and went to stop/start passport; but passport didn't start.

@mzico there is no need to apply restarts after configuration changes in 3.1.4 onwards. Waiting 1 min suffices

@jgomer2001 jgomer2001 removed their assignment Nov 28, 2018

@jgomer2001

This comment has been minimized.

Contributor

jgomer2001 commented Nov 28, 2018

@ganesh-at-wiw starting with passport 3.1.4 there is no need to check log for errors at startup

Due to passport dependency on oxauth and oxtrust, and that most of times these applications are not ready when passport is starting, we added a mechanism in node application to retry until data is available. In that sense, there might be errors in log but they disappear once passport is enabled, configured and oxtrust is ready.

This also helped us avoid the need of doing frequent manual restarts

ganesh-at-wiw added a commit to GluuFederation/community-edition-setup that referenced this issue Dec 5, 2018

@ganesh-at-wiw

This comment has been minimized.

ganesh-at-wiw commented Dec 5, 2018

Hello @jgomer2001 if that is the case that we don't need to check log for errors at startup, should we assume that the service will be started automatically?
If that is the case, we can remove the dependability in next commit, else below is the fix for now.

GluuFederation/community-edition-setup@1645f9f#diff-34b91de3b6cf5b1fad78ef4a6b245b09

@jgomer2001

This comment has been minimized.

Contributor

jgomer2001 commented Dec 5, 2018

should we assume that the service will be started automatically

yes

@ganesh-at-wiw

This comment has been minimized.

ganesh-at-wiw commented Dec 5, 2018

That's cool.
Then I think we can close this issue.

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