https://prefect.io logo
Title
p

Pedro Machado

05/24/2020, 12:22 AM
I am trying to run prefect server on Ubuntu running inside of Windows Subsystem for Linux 2. I am getting the following error when trying to start the server.
prefect server start
Pulling postgres  ... done
Pulling hasura    ... done
Pulling graphql   ... done
Pulling apollo    ... done
Pulling scheduler ... done
Pulling ui        ... done
Creating network "prefect-server" with the default driver
Creating tmp_postgres_1 ... error

ERROR: for tmp_postgres_1  Cannot create container for service postgres: invalid IP address in add-host: ""

ERROR: for postgres  Cannot create container for service postgres: invalid IP address in add-host: ""
ERROR: Encountered errors while bringing up the project.
Any ideas? How can I see the docker compose logs?
r

Rafal

05/24/2020, 9:02 AM
I’ve got the same error. @Laura Lorenz (she/her) I’ve seen yours tutorials. Is there a chance for normal docker-compose file? How does it works exactly? I mean this pulling images thing...
l

Laura Lorenz (she/her)

05/26/2020, 3:59 AM
Hi @Pedro Machado, you can access the docker container logs with docker or docker-compose directly. If you want to use docker-compose, the file specifically (to your question too, @Rafal) that is being used by
prefect server start
is this docker compose file in src/prefect/cli/docker-compose (https://github.com/PrefectHQ/prefect/blob/master/src/prefect/cli/docker-compose.yml) — which you can also use directly and/or copy if you want to make amends! Let me know if you get more logs @Pedro Machado, I haven’t seen that particular error before
p

Pedro Machado

05/26/2020, 6:56 AM
Thanks Laura. Will check tomorrow. Where do you put the docker compose file if you want to override the default one and still use
prefect server start
l

Laura Lorenz (she/her)

05/26/2020, 1:54 PM
Hi @Pedro Machado, you wouldn’t use
prefect server start
anymore, but instead use the docker compose CLI itself so you can put the file wherever you want. You might be interested in the python file that controls
prefect server start
to see what it does, which is mostly some configuration merging and then it calls docker-compose under the hood anyways: https://github.com/PrefectHQ/prefect/blob/master/src/prefect/cli/server.py
r

Rafal

05/27/2020, 7:38 PM
@Pedro Machado I managed how to rewrite docker-compose and use it directly. Working 😉 I am not only sure about this one graphql_1 | INFO: 192.168.64.6:37910 - "POST /graphql HTTP/1.1" 404 Not Found apollo_1 | 2020-05-27T19:40:06.924Z { ServerParseError: Unexpected token N in JSON at position 0 apollo_1 | at JSON.parse (<anonymous>) apollo_1 | at /apollo/node_modules/apollo-link-http-common/lib/index.js:35:25 etc... UI is working fine. @Laura Lorenz (she/her) should it be that way?
p

Pedro Machado

05/29/2020, 2:50 PM
Rafal, did you manage to run the server with your own docker compose or are you still stuck on this error?
l

Laura Lorenz (she/her)

05/29/2020, 3:39 PM
Hi @Rafal, no that doesn’t look familiar (apollo does retry for a while waiting for graphql to come up, but not with that error). It looks like something is wrong with one of the node modules in the apollo container based on the traceback, like that it is corrupted. Are you using the prefecthq images in your docker compose file (
prefecthq/server:latest
?) or did you build your own or are using different ones?
r

Rafal

06/08/2020, 2:49 PM
Thank you Laura, I've opened issue and everything is fine for now