Local toolshed not working "HTTPError: HTTP Error 400: Bad Request"
Hi, I interested in hosting a local toolshed. I was able to install it and add a tool to it. I have configured my local galaxy instance to pull tools from this local toolshed. As far as I can tell everything is working in the toolshed side of things, but when I try to install the tool I added I get this error: URL: http://galaxydev.bfx.brel.local/admin_toolshed/prepare_for_install?tool_shed_url=http://toolsheddev.bfx.brel.local:9009/&repository_ids=ee9b707789bf4714&changeset_revisions=71b062907e0d File '/local/opt/galaxy/galaxy-dist.dev/eggs/WebError-0.8a-py2.6.egg/weberror/evalexception/middleware.py', line 364 in respond app_iter = self.application(environ, detect_start_response) File '/local/opt/galaxy/galaxy-dist.dev/eggs/Paste-1.6-py2.6.egg/paste/debug/prints.py', line 98 in __call__ environ, self.app) File '/local/opt/galaxy/galaxy-dist.dev/eggs/Paste-1.6-py2.6.egg/paste/wsgilib.py', line 539 in intercept_output app_iter = application(environ, replacement_start_response) File '/local/opt/galaxy/galaxy-dist.dev/eggs/Paste-1.6-py2.6.egg/paste/recursive.py', line 80 in __call__ return self.application(environ, start_response) File '/local/opt/galaxy/galaxy-dist.dev/lib/galaxy/web/framework/middleware/remoteuser.py', line 91 in __call__ return self.app( environ, start_response ) File '/local/opt/galaxy/galaxy-dist.dev/eggs/Paste-1.6-py2.6.egg/paste/httpexceptions.py', line 632 in __call__ return self.application(environ, start_response) File '/local/opt/galaxy/galaxy-dist.dev/lib/galaxy/web/framework/base.py', line 160 in __call__ body = method( trans, **kwargs ) File '/local/opt/galaxy/galaxy-dist.dev/lib/galaxy/web/framework/__init__.py', line 208 in decorator return func( self, trans, *args, **kwargs ) File '/local/opt/galaxy/galaxy-dist.dev/lib/galaxy/webapps/galaxy/controllers/admin_toolshed.py', line 1177 in prepare_for_install response = urllib2.urlopen( url ) File '/usr/lib64/python2.6/urllib2.py', line 126 in urlopen return _opener.open(url, data, timeout) File '/usr/lib64/python2.6/urllib2.py', line 397 in open response = meth(req, response) File '/usr/lib64/python2.6/urllib2.py', line 510 in http_response 'http', request, response, code, msg, hdrs) File '/usr/lib64/python2.6/urllib2.py', line 435 in error return self._call_chain(*args) File '/usr/lib64/python2.6/urllib2.py', line 369 in _call_chain result = func(*args) File '/usr/lib64/python2.6/urllib2.py', line 518 in http_error_default raise HTTPError(req.get_full_url(), code, msg, hdrs, fp) HTTPError: HTTP Error 400: Bad Request I can manually confirm this URL is incorrect: tool_shed_url=http://toolsheddev.bfx.brel.local:9009/&repository_ids=ee9b707789bf4714&changeset_revisions=71b062907e0d When I try to directly access it I get this error: Not Found The resource could not be found. No action for /&repository_ids=ee9b707789bf4714&changeset_revisions=71b062907e0d I don't think is related but maybe I should mention it. I have to use a http proxy to access the web, so I have http_proxy environment variable set. This was causing issues with the local toolshed as my institution proxy won't respond for requests to local hostnames. The tool files would get uploaded but resetting the metadata would fail with: galaxy.util.shed_util_common DEBUG 2013-02-04 13:02:38,221 Resetting all metadata on repository: annotab galaxy.util.shed_util_common DEBUG 2013-02-04 13:02:38,271 Cloning repository revision: 0 galaxy.util.shed_util_common DEBUG 2013-02-04 13:02:38,276 Error cloning repository: HTTP Error 400: Bad Request galaxy.util.shed_util_common DEBUG 2013-02-04 13:02:38,326 Cloning repository revision: 1 galaxy.util.shed_util_common DEBUG 2013-02-04 13:02:38,329 Error cloning repository: HTTP Error 400: Bad Request galaxy.util.shed_util_common DEBUG 2013-02-04 13:02:38,377 Cloning repository revision: 2 galaxy.util.shed_util_common DEBUG 2013-02-04 13:02:38,380 Error cloning repository: HTTP Error 400: Bad Request I was able to fix this issue by editing ~/.hgrc and adding: [http_proxy] no = toolshed.bfx.brel.local,toolsheddev.bfx.brel.local I mention it just in case for some reason my issue could be related, although as I said I don't think so. Any help would be most welcomed, Thanks, Carlos
On Mon, Feb 4, 2013 at 2:01 PM, Carlos Borroto <carlos.borroto@gmail.com> wrote:
I can manually confirm this URL is incorrect: tool_shed_url=http://toolsheddev.bfx.brel.local:9009/&repository_ids=ee9b707789bf4714&changeset_revisions=71b062907e0d
When I try to directly access it I get this error: Not Found
The resource could not be found. No action for /&repository_ids=ee9b707789bf4714&changeset_revisions=71b062907e0d
Well after some more testing it seems this is not correct. I checked what happens when I'm installing a tool from the Galaxy's main toolshed and I get a similar behavior. Galaxy's main toolshed: [04/Feb/2013:16:40:31 -0400] "GET /admin_toolshed/prepare_for_install?tool_shed_url=http://toolshed.g2.bx.psu.edu/&repository_ids=1d92ebdf7e8d466c&changeset_revisions=a23b0627623c HTTP/1.1" 200 - "http://toolshed.g2.bx.psu.edu/repository/preview_tools_in_changeset?repository_id=1d92ebdf7e8d466c&changeset_revision=a23b0627623c" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:18.0) Gecko/20100101 Firefox/18.0" This URL also cannot be accessed directly but that doesn't stops the tool from being correctly installed: tool_shed_url=http://toolshed.g2.bx.psu.edu/&repository_ids=1d92ebdf7e8d466c&changeset_revisions=a23b0627623c Local toolshed: [04/Feb/2013:16:41:53 -0400] "GET /admin_toolshed/prepare_for_install?tool_shed_url=http://toolsheddev.bfx.brel.local:9009/&repository_ids=ee9b707789bf4714&changeset_revisions=38d24f5c5bae HTTP/1.1" 500 - "http://toolsheddev.bfx.brel.local:9009/repository/preview_tools_in_changeset?repository_id=ee9b707789bf4714&changeset_revision=38d24f5c5bae" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:18.0) Gecko/20100101 Firefox/18.0" What I do see is "HTTP/1.1 200" response from Galaxy's main and "HTTP/1.1 500" from my local toolshed. I'll keep pocking around to see what I can find. --Carlos
Solved! It was related to my proxy configuration after all. Setting the no_proxy environment variable fixed this issue for me. I see this is a corner case but just in case someone else runs into it, this is a summary of what I did. If your network uses a http proxy who do not answer to local hostnames requests and you have setup the http_proxy environment variable. In order to get a local toolshed going, you will need to do two things. - Add to ~/.hgrc: [http_proxy] no = [comma separated list of hostnames for your local toolsheds. Note: domain regex won't work] - Set no_proxy environment variable. For bash in Redhat/CentOS I like adding to /etc/profile.d/custom.sh: export no_proxy=[comma separated list of local domains] Hope it helps, Carlos
Thanks for the information Carlos, I'll add this to the tool shed wiki. On Feb 4, 2013, at 5:19 PM, Carlos Borroto wrote:
Solved!
It was related to my proxy configuration after all. Setting the no_proxy environment variable fixed this issue for me. I see this is a corner case but just in case someone else runs into it, this is a summary of what I did.
If your network uses a http proxy who do not answer to local hostnames requests and you have setup the http_proxy environment variable. In order to get a local toolshed going, you will need to do two things.
- Add to ~/.hgrc: [http_proxy] no = [comma separated list of hostnames for your local toolsheds. Note: domain regex won't work]
- Set no_proxy environment variable. For bash in Redhat/CentOS I like adding to /etc/profile.d/custom.sh: export no_proxy=[comma separated list of local domains]
Hope it helps, Carlos ___________________________________________________________ Please keep all replies on the list by using "reply all" in your mail client. To manage your subscriptions to this and other Galaxy lists, please use the interface at:
participants (2)
-
Carlos Borroto
-
Greg Von Kuster