-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Listening on 127.0.0.1 raises a warning #7763
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
Comments
Thanks for opening this issue!
|
@marvinroger I have the similar type of issue, but with localhost
The important thing is that warning happens only when parse-server runs inside a Docker container.
So question here: where is the best place to ask for help/ideas how to resolve this? I'm not sure wether this is a problem in parse-server, or docker, or in my docker-compose configuration. |
@marvinroger Hello! |
Hi @needpower |
A note for Parse Server 6; it's important to await starting Parse Server before adding it to the express app: const parseServer = new ParseServer({ ... });
const expressApp = express();
await parseServer.start();
expressApp.use('/parse', parseServer.app); Asynchronous start of Parse Server has been introduced with Parse Server 6; this issue was reported for Parse Server 4 and any version below Parse Server 6 is unsupported at this time, hence I'm closing this issue. |
New Issue Checklist
Issue Description
This was already raised in #4506, but the issue was closed.
When I start my Parse server listening on
127.0.0.1
, I have the following warning:The problem comes from these lines: https://github.com/parse-community/parse-server/blob/alpha/src/ParseServer.js#L207-L209
There's a race condition here. When the app is mounted, the underlying server might not be listening yet.
When listening on
localhost
, the warning is not raised because of the DNS resolution (either on thelisten
or on theverifyServerUrl
call), which takes some time. But when using an IP, like127.0.0.1
, the DNS resolution is skipped, the request fromverifyServerUrl
is done straight away, and the server is not yet listening, resulting in the warning.I am not sure what can be done here (
mount
is not the right event to listen to,listening
would be perfect, but this event does not exist from within a "sub" express app), except from removing this side-effect.Steps to reproduce
Listen a Parse server with a server URL of
127.0.0.1
Actual Outcome
A warning
Expected Outcome
No warning
Environment
Server
The text was updated successfully, but these errors were encountered: