scrapinghub / splash

Lightweight, scriptable browser as a service with an HTTP API
BSD 3-Clause "New" or "Revised" License
4.09k stars 513 forks source link

Splash wont load home page on 8050, cannot run script #797

Open Swordyjohn opened 6 years ago

Swordyjohn commented 6 years ago

Hello, I am having an issue with splash. when running the "docker run -p 5000:5000 -p 5023:5023 scrapinghub/splash" commmand I am getting the "Starting factory <twisted.web.server.Site object at 0x7efc279d97f0>" hang time in my powershell (windows 10), and localhost:8050 shows no page. in addition, when i run the example script from the docs it returns:"ConnectionError: HTTPConnectionPool(host='localhost', port=8050): Max retries exceeded with url: /run (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x00000209C41382B0>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it',))" i cannot locate port 8050 with a netstat search. any ideas on how to fix this?

lopuhin commented 6 years ago

@Swordyjohn it could be that on Windows you need to use a different ip address instead of localhost, please see https://docs.docker.com/machine/reference/ip/

Swordyjohn commented 6 years ago

Thank you for getting back to me lopuhin, I tried to navigate to all 3 of these ip addresses using both port 5000 and port 8050 and neither worked to bring up the splash page. When i first installed splash i was able to navigate to this page with localhost:8050 but now i am unable to. when i try to start it with : docker run --restart=always --expose 8050 --net=host -p 8050:8050 scrapinghub/splash I get the following error:

2018-07-30 21:43:08.567199 [-] twisted.internet.error.CannotListenError: Couldn't listen on 0.0.0.0:8050: [Errno 98] Address already in use.

as stated before i cannot locate 8050 with a netstat search, i am thinking maybe splash is still running on this port? any idea how i can either get it to start again on this port or switch it to a new port?