Skip to content

Parse on AWS 503 error when calling from Auth0 and ok from local #3131

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

Closed
kostiag opened this issue Nov 28, 2016 · 5 comments
Closed

Parse on AWS 503 error when calling from Auth0 and ok from local #3131

kostiag opened this issue Nov 28, 2016 · 5 comments

Comments

@kostiag
Copy link

kostiag commented Nov 28, 2016

HI,
I am trying to implement Auth0 integration described here. Login attempt returns 404 which is fine but POST I get
54.67.15.170 - - [28/Nov/2016:14:26:54 +0000] "GET /parse/login?username=auth0%7C0123456789&password=XXXXXX HTTP/1.1" 404 49
54.67.15.170 - - [28/Nov/2016:14:26:55 +0000] "POST /parse/users/ HTTP/1.1" 503 299

Creating user from local:
curl -X POST -H "X-Parse-Application-Id: appid" -H "X-Parse-REST-API-Key:mk" -H "Content-Type: application/json" -d '{"username":"Sean Plott","password":"aaaaaaa"}' https://tablebuds.com/parse/users
{"objectId":"2H32s7C45c","createdAt":"2016-11-28T14:29:50.515Z","sessionToken":"r:dfdasfdafd"}
works fine.

Can anyone suggest what I should look at?

@hramos
Copy link
Contributor

hramos commented Nov 29, 2016

Thanks for your question!

We want to make sure to keep signal strong in the GitHub issue tracker – to make sure that it remains the best place to track issues that affect the development of Parse Server.

Questions like yours deserve a purpose-built Q&A forum. Would you like to post this question to Stack Overflow with the tag #parse.com? We'll be happy to answer there. Post a link to your Stack Overflow question here, so that we don't lose track of it.

You may also use Server Fault for questions about managing your own servers.

@hramos hramos closed this as completed Nov 29, 2016
@kostiag
Copy link
Author

kostiag commented Dec 8, 2016

This must be a parse issue. multiple gets are also failing the same way if done one after another. Second get and only 2nd get in the code below returns service unavailable.

`request.get({
url: SERVER_NAME + '/parse/login',
qs: {
username: username,
password: PARSE_USER_PASSWORD
},
headers: {
'X-Parse-Application-Id': PARSE_APP_ID,
'X-Parse-REST-API-Key': PARSE_API_KEY
}
},
function (err, response, body) {
if (err) return callback(err);
// user was found, add sessionToken to user profile
if (response.statusCode === 200) {
user.parse_session_token = JSON.parse(body).sessionToken;
return callback(null, user, context);
}

// Not found. Likely the user doesn’t exist, we provision one
if(response.statusCode === 404) {
request.post({
url: SERVER_NAME + '/parse/users',
json: {
username: username,
password: PARSE_USER_PASSWORD,
email: email,
emailVerified: true
},
headers: {
'X-Parse-Application-Id': PARSE_APP_ID,
'X-Parse-REST-API-Key': PARSE_API_KEY,
'Content-Type': 'application/json'
}`

@flovilmart
Copy link
Contributor

Regarding auth0 you should probably ask the author of the post on medium instead of here.

@kostiag
Copy link
Author

kostiag commented Dec 8, 2016

No response, but the issue seems to be with parse. Its a simple attempt to login and then attempt to create if login fails? Seems like second attempt is refused. Doing 2 gets one after another, 2nd fails. Apache reports error: [pid 1150] (111)Connection refused: AH00957: HTTP: attempt to connect to 127.0.0.1:1337 (127.0.0.1) failed
[proxy_http:error] [pid 1150] [client 54.183.204.205:48418] AH01114: HTTP: failed to make connection to backend: 127.0.0.1

@flovilmart
Copy link
Contributor

The issue seems to be that your server gets killed. So provide the logs please, as described in the issue template

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants