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

Localhost shows 502 Bad Gateway nginx/1.15.2 #1

Closed
naoestouaconseguir opened this issue Aug 24, 2018 · 7 comments
Closed

Localhost shows 502 Bad Gateway nginx/1.15.2 #1

naoestouaconseguir opened this issue Aug 24, 2018 · 7 comments

Comments

@naoestouaconseguir
Copy link

naoestouaconseguir commented Aug 24, 2018

All services are running ok but no response in localhost.
Please advise.
hk@hk15ISK:~/poopak$ sudo docker-compose restart
Restarting poopak_server_1 ... done
Restarting web-app ... done
Restarting app-worker ... done
Restarting panel-worker ... done
Restarting detector-worker ... done
Restarting crawler-worker ... done
Restarting poopak_mongoclient_1 ... done
Restarting redis ... done
Restarting poopak_spacy_1 ... done
Restarting poopak_torpool_1 ... done
Restarting poopak_splash_1 ... done
Restarting poopak_mongodb_1 ... done

@teal33t
Copy link
Owner

teal33t commented Aug 27, 2018

try
docker-compose down -v
and next
docker-compose up -d

if that was not success put your out logs here to check
docker-compose logs -t -f

@icepaule
Copy link

Hi thelematic,
I'm having the same issue. The log says:
Host mongodb:27017 not yet availabile
web-app | 2018-08-31T14:33:22.508628400Z Host mongodb:27017 not yet availabile
web-app | 2018-08-31T14:33:23.515262971Z Host mongodb:27017 not yet availabile
web-app | 2018-08-31T14:33:24.522050946Z Host mongodb:27017 not yet availabile
web-app | 2018-08-31T14:33:25.535440011Z Host mongodb:27017 not yet availabile

me@ubuntu:~# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
7781b51e7ea7 nginx "nginx -g 'daemon ..." 2 minutes ago Up 2 minutes 0.0.0.0:80->80/tcp poopak_server_1
4b71137ad9f2 web-app "bash -c '/wait &&..." 2 minutes ago Up 37 seconds 8000/tcp web-app
e42c037f3d5c poopak_crawler-worker "bash -c '/wait &&..." 2 minutes ago Up Less than a second crawler-worker
fb494f79bdaf poopak_panel-worker "bash -c '/wait &&..." 2 minutes ago Up 4 seconds panel-worker
16c100bf4920 poopak_app-worker "bash -c '/wait &&..." 2 minutes ago Up 3 seconds app-worker
977b77663b20 poopak_detector-worker "bash -c '/wait &&..." 2 minutes ago Up 4 seconds detector-worker
443e70ca9b9c mongoclient/mongoclient "./entrypoint.sh n..." 2 minutes ago Up 2 minutes 0.0.0.0:3000->3000/tcp poopak_mongoclient_1
7e5b9dd4dab1 scrapinghub/splash "python3 /app/bin/..." 2 minutes ago Up 2 minutes 5023/tcp, 0.0.0.0:5023->8050/tcp poopak_splash_1
1e43bc52ab9f zeta0/alpine-tor "/bin/sh -c 'ruby ..." 2 minutes ago Up 2 minutes 0.0.0.0:2090->2090/tcp, 0.0.0.0:5566->5566/tcp, 8118/tcp poopak_torpool_1
dc3a24ea3eba jgontrum/spacyapi "supervisord -n" 2 minutes ago Up 2 minutes 0.0.0.0:8080->80/tcp poopak_spacy_1
13e3e4956a4d bitnami/redis:latest "/entrypoint.sh /r..." 2 minutes ago Up 2 minutes 0.0.0.0:6379->6379/tcp redis

Thanks so much for the help and the tool. :-)

Cheers
Marcus

@teal33t
Copy link
Owner

teal33t commented Sep 1, 2018

@icepaule Hi
Would you please put your run log?
docker-compose up -d
or
docker-compose logs -t -f

@icepaule
Copy link

icepaule commented Sep 1, 2018

Hi @thelematic,
thanks for comming back so quickly. Parts of the log I already mentioned yesterday.
But I've done a complete restart and captured from the very start of the docker.

Thanks a lot already for the help.

Cheers
Marcus

poopak_docker.tgz.zip

@icepaule
Copy link

icepaule commented Sep 6, 2018

Hi @thelematic ,

after a bit os debugging, the problem possibly is in the mongodb as there is an error while creating /bitnami/mongodb (access denied). See: https://github.com/bitnami/bitnami-docker-mongodb/issues/103

I'll check with them first. ;-)

Thx a lot
Marcus

@icepaule
Copy link

icepaule commented Sep 6, 2018

Hi @thelematic,

I did an ugly hack to bypass the access denied issue by starting and running the mongodb container as root. No, don't yam because of the security considerations, I know. :-)

At least it's a workaround until bitnami has fixed the issue.

Cheers
Marcus

Below is the docker-compose part of mongodb I've changed:

mongodb:
image: 'bitnami/mongodb:latest'
hostname: mongodb
user: ${USER}
volumes:
- .:/bitnami
ports:
- "27017:27017"
environment:
- MONGODB_ROOT_PASSWORD=123qwe
- MONGODB_USERNAME=admin
- MONGODB_PASSWORD=123qwe
- MONGODB_DATABASE=crawler
networks:
- app-tier

@teal33t
Copy link
Owner

teal33t commented Sep 9, 2018

@icepaule Nice man, thank you

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