DiUS / pact_broker-docker

'Dockerised' pact broker
http://pact.io
MIT License
76 stars 102 forks source link

404 Not Found when trying to load Pact Broker #35

Closed iamdavidfrancis closed 7 years ago

iamdavidfrancis commented 7 years ago

Hi, I'm trying to get the pact broker working, but when I run the container I get a 404 page from nginx. I would appreciate some guidance on this.

image

I've attached part of the logs:


Status: Downloaded newer image for dius/pact-broker:latest
2017-05-23T01:46:16.256549997Z May 23 01:46:15 136ed7e7dc55 syslog-ng[23]: syslog-ng starting up; version='3.5.3'
2017-05-23T01:46:16.266815405Z ok: run: /etc/service/nginx-log-forwarder: (pid 33) 0s
2017-05-23T01:46:26.285570357Z [ 2017-05-23 01:46:16.5525 37/7feea7a347c0 age/Cor/Main.cpp:957 ]: Starting Passenger core...
2017-05-23T01:46:26.285599869Z [ 2017-05-23 01:46:16.5532 37/7feea7a347c0 age/Cor/Main.cpp:234 ]: Passenger core running in multi-application mode.
2017-05-23T01:46:26.285607572Z [ 2017-05-23 01:46:16.5608 37/7feea7a347c0 age/Cor/Main.cpp:707 ]: Passenger core online, PID 37
2017-05-23T01:46:26.285614575Z [ 2017-05-23 01:46:16.5903 42/7ff8bb5c57c0 age/Ust/Main.cpp:430 ]: Starting Passenger UstRouter...
2017-05-23T01:46:26.285621078Z [ 2017-05-23 01:46:16.5948 42/7ff8bb5c57c0 age/Ust/Main.cpp:311 ]: Passenger UstRouter online, PID 42
2017-05-23T01:46:26.285636684Z 2017/05/23 01:46:16 [error] 51#0: *1 open() "/home/app/pact_broker/public/robots933456.txt" failed (2: No such file or directory), client: <redacted>, server: , request: "HEAD /robots933456.txt HTTP/1.1", host: "<redacted>"
2017-05-23T01:46:26.285648689Z 2017/05/23 01:46:16 [error] 51#0: *2 "/home/app/pact_broker/public/index.html" is not found (2: No such file or directory), client: <redacted>, server: , request: "GET / HTTP/1.1", host: "<redacted>"
2017-05-23T01:46:26.285656592Z 2017/05/23 01:46:16 [error] 51#0: *3 "/home/app/pact_broker/public/index.html" is not found (2: No such file or directory), client: <redacted>, server: , request: "GET / HTTP/1.1", host: "<redacted>"
2017-05-23T01:46:26.285663995Z 2017/05/23 01:46:16 [error] 51#0: *4 "/home/app/pact_broker/public/index.html" is not found (2: No such file or directory), client: <redacted>, server: , request: "GET / HTTP/1.1", host: "<redacted>"
2017-05-23T01:46:26.285671298Z 2017/05/23 01:46:17 [error] 51#0: *5 open() "/home/app/pact_broker/public/favicon.ico" failed (2: No such file or directory), client: <redacted>, server: , request: "GET /favicon.ico HTTP/1.1", host: "<redacted>", referrer: "<redacted>"
2017-05-23T01:46:42.283010369Z 2017/05/23 01:46:42 [error] 51#0: *6 "/home/app/pact_broker/public/index.html" is not found (2: No such file or directory), client: <redacted>, server: , request: "GET / HTTP/1.1", host: "<redacted>"
2017-05-23T01:47:39.275701702Z 2017/05/23 01:47:38 [error] 51#0: *7 "/home/app/pact_broker/public/index.html" is not found (2: No such file or directory), client: <redacted>, server: , request: "GET / HTTP/1.1", host: "<redacted>"
bethesque commented 7 years ago

Hm. That's strange. It's never had an index.html, so I'm not sure why it's complaining now. I'm running it locally, and if I hit http://192.168.99.100 I get redirected to http://192.168.99.100/ui/relationships. Can you hit the ui/relationships path?

bethesque commented 7 years ago

Are you running something in front of it that is trying to hit robots, favicon and index?

iamdavidfrancis commented 7 years ago

The browser will automatically hit favicon and index, not sure about robots.

ui/relationships also returns a 404

mefellows commented 7 years ago

That robots933456.txt request looks really suspicious.

bethesque commented 7 years ago

Are there any other errors in the logs? None of those errors explain why you're getting 404 for paths that actually should exist.

iamdavidfrancis commented 7 years ago

No, there's nothing else.

bethesque commented 7 years ago

How are you running it?

iamdavidfrancis commented 7 years ago

It's running on an Azure App Service on Linux instance

mefellows commented 7 years ago

Does that mean it's publicly accessible? That would explain the suspicious looking traffic.

On Wed, May 24, 2017 at 10:11 AM, David Francis notifications@github.com wrote:

It's running on an Azure App Service instance

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/DiUS/pact_broker-docker/issues/35#issuecomment-303576687, or mute the thread https://github.com/notifications/unsubscribe-auth/AADSjMTIxcMhvoIlAkcCtFZhajw4UlEEks5r83W6gaJpZM4NkTDE .

-- Matt Fellows

iamdavidfrancis commented 7 years ago

Yes, it's publicly accessible, but the robots file is being requested every time index.html is.

bethesque commented 7 years ago

I'd say you need to look to the Azure docs for help.

iamdavidfrancis commented 7 years ago

I've been through them. I was hoping you might have some more information that could help me. It's alright if you can't, I'll keep looking.

bethesque commented 7 years ago

What happens if you docker exec into the container and curl http://localhost?

iamdavidfrancis commented 7 years ago

Okay, I figured out the problem. We had the wrong IP whitelisted on the postgres server. It's working now.

iamdavidfrancis commented 7 years ago

Thanks for the help though.

bethesque commented 7 years ago

👍