Forem Creators and Builders 🌱

Charles Lin
Charles Lin

Posted on

Error on docker based forem dev environment

while following this guide https://developers.forem.com/getting-started/installation/containers

I run into this error.

I followed the suggestion in https://forem.dev/sidthedev/connection-refused-500a to update /etc/hosts with 127.0.0.1 railsbut the issue remains.

Appreciate your inputs.

forem_sidekiq          | 2022/04/01 17:35:17 Problem with dial: dial tcp 172.18.0.7:3000: connect: connection refused. Sleeping 20s
forem_seed             | 2022/04/01 17:35:17 Problem with dial: dial tcp 172.18.0.7:3000: connect: connection refused. Sleeping 20s
forem_seed             | 2022/04/01 17:35:37 Problem with dial: dial tcp 172.18.0.7:3000: connect: connection refused. Sleeping 20s
forem_sidekiq          | 2022/04/01 17:35:37 Problem with dial: dial tcp 172.18.0.7:3000: connect: connection refused. Sleeping 20s
forem_seed             | 2022/04/01 17:35:57 Problem with dial: dial tcp 172.18.0.7:3000: connect: connection refused. Sleeping 20s
forem_sidekiq          | 2022/04/01 17:35:57 Problem with dial: dial tcp 172.18.0.7:3000: connect: connection refused. Sleeping 20s
Enter fullscreen mode Exit fullscreen mode

Oldest comments (2)

Collapse
 
djuber profile image
Daniel Uber

@charlesfrm - this looks like you have a few containers that are waiting on the rails container to start successfully.

Two possible explanations are that the rails service didn't start (the snippet above doesn't have any errors that might have occurred earlier) or that you're not waiting long enough (the bundle and yarn steps need to complete successfully before the rails server will attempt to start).

Since I only see seed and sidekiq there, my assumption is the rails container attempted to start, but failed (there's not enough information here to guess why). If the database service had failed to start you might see instead connection refused waiting on those as well as the rails server port 3000 . If bundle or yarn failed I would expect the rails to be waiting for those.

Usually, if you're in this situation, stopping the containers and restarting the docker-compose command will either fix it, or cause the error to become more visible (less noise from bundle and yarn if the packages are current).

Collapse
 
charlesfrm profile image
Charles Lin

thanks Daniel, I'll give it another try!