urlopen error [Errno 99] Cannot assign requested address
Closed this issue · 3 comments
Dear @erasche,
I'd like to integrate a web service I have created, as a Galaxy data_source. I therefore applied the procedure you described in the README on a Docker Galaxy stable:
docker container run -t -i -p 8080:80 -v /abs/path/to/dir/galaxy_storage:/export/ bgruening/galaxy-stable
From this point on, my $GALAXY_ROOT is "/abs/path/to/dir/galaxy_storage/galaxy-central".
Then:
- I copied sync.xml to $GALAXY_ROOT/tools/data_source/
- I couldn't add sync.xml as an XML entry in $GALAXY_ROOT/config/tool_conf.xml because there was no such file; I therefore added it in $GALAXY_ROOT/config/tool_conf.xml.main and $GALAXY_ROOT/config/tool_conf.xml.sample
- I launched sync.py
At this point, the local Docker Galaxy stable shows "DataSource Test Sync Test Sync" as one of its tools.
Once selected, the web service is loaded, but as soon as I hit "Export data" and return to the Galaxy interface, the history reports an error:
Dataset error
An error occurred while running the tool ds_test_sync
Tool execution generated the following messages:
The remote data source application may be offline, please try again later. Error: <urlopen error [Errno 99] Cannot assign requested address>
I checked with netstat, but the flask web server running from the sync.py script was the only one binding on 0.0.0.0:4000.
I tried also with the cherrypy example, following the same procedure, and obtained the same error.
Since the outcome is the same regardless which data_source web service I launch, do you think the problem is related to how I added the new data_source as an XML entry? Shall I otherwise test the whole thing on a different Docker image?
Thank you for your time
I would guess this is due to the fact that you run it in docker. I imagine what happens is that the request is made to localhost:4000 inside of the container which is different from localhost:4000 outside of the container.
Indeed. Thanks Helena. I didn't think of that. I changed the request's address to the actual IP address of the localhost outside the container, and it worked right away.
Awesome! Glad I could help. Let me know if you have any other questions.