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

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

Closed
mzico opened this issue Oct 21, 2018 · 12 comments
Assignees
Labels
Milestone

Comments

@mzico
Copy link

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
Copy link
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
Copy link
Contributor

also see #49 (comment)

@jgomer2001
Copy link
Contributor

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
Copy link
Contributor

@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
Copy link

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
Copy link
Contributor

should we assume that the service will be started automatically

yes

@ganesh-at-wiw
Copy link

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

@natt-tester
Copy link

Passport still doesn't start properly in 3.1.5_3 and when you try to (re)start it manually, there are errors in the logs:
start.log

@natt-tester natt-tester reopened this Dec 18, 2018
@jgomer2001
Copy link
Contributor

@natt-tester the log error indicates there is no file /etc/gluu/conf/passport-inbound-idp-initiated.json. It seems the package is missing it.

@devrimyatar
Copy link

this commit closed this issue: GluuFederation/community-edition-setup@e7bcc46

@natt-tester please download this setup.py, and then install: https://github.com/GluuFederation/community-edition-setup/edit/version_3.1.5/setup.py

@natt-tester Please close this issue after confirmation.

@jgomer2001
Copy link
Contributor

seems fine in 3.1.5-4

@natt-tester
Copy link

Tested in 3.1.5-5, it's DONE.

yurem pushed a commit to GluuFederation/community-edition-setup that referenced this issue Jan 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants