Re: [galaxy-dev] Problem installing repositories from local tool shed: JSONDecodeError: No JSON object could be decoded: line 1 column 0 (char 0)

2012-07-20 Thread Greg Von Kuster
Hi Jon,

It looks like your tool shed is not returning the information necessary for 
installing your tool shed repository into your local Galaxy instance.  Try 
putting the following print statement just before line 978 in 
~/lib/galaxy/web/controllers/admin_toolshed.py.  This will tell you why the 
information is not json decodable.

print raw_text: , raw_text

It will be difficult for me to tell you what caused this since I do not have 
access to either your tool shed or your local Galaxy instance, so hopefully 
this will provide enough information for you to determine the cause.

Thanks!

Greg Von Kuster


On Jul 20, 2012, at 8:51 AM, Jon Manning wrote:

 Hi all,
 
 I'm new to Galaxy- so hello, and excuse me while I get to grips with all the 
 conventions!
 
 I've successfully got my local Galaxy (galaxy-central) install set up and 
 working correctly, as well as a local toolshed. I've also linked the two with 
 a line in tool_sheds_conf.xml. But I'm getting the following problem when I 
 try to install tools from the local toolshed (either ones I tried to make 
 myself, or ones I downloaded from the Galaxy public toolshed).
 
 The following appears when I click 'install to local Galaxy':
 
 URL: 
 http://www.my.domain/galaxy/admin_toolshed/prepare_for_install?tool_shed_url=http://www.my.domain/toolshed/repository_ids=adb5f5c93f827949changeset_revisions=f5ee1108336b
 File 
 '/var/www/galaxy_home/galaxy-central/eggs/Paste-1.6-py2.6.egg/paste/exceptions/errormiddleware.py',
  line 143 in __call__
 app_iter = self.application(environ, start_response)
 File 
 '/var/www/galaxy_home/galaxy-central/eggs/Paste-1.6-py2.6.egg/paste/debug/prints.py',
  line 98 in __call__
 environ, self.app)
 File 
 '/var/www/galaxy_home/galaxy-central/eggs/Paste-1.6-py2.6.egg/paste/wsgilib.py',
  line 539 in intercept_output
 app_iter = application(environ, replacement_start_response)
 File 
 '/var/www/galaxy_home/galaxy-central/eggs/Paste-1.6-py2.6.egg/paste/recursive.py',
  line 80 in __call__
 return self.application(environ, start_response)
 File 
 '/var/www/galaxy_home/galaxy-central/lib/galaxy/web/framework/middleware/remoteuser.py',
  line 91 in __call__
 return self.app( environ, start_response )
 File 
 '/var/www/galaxy_home/galaxy-central/eggs/Paste-1.6-py2.6.egg/paste/httpexceptions.py',
  line 632 in __call__
 return self.application(environ, start_response)
 File '/var/www/galaxy_home/galaxy-central/lib/galaxy/web/framework/base.py', 
 line 160 in __call__
 body = method( trans, **kwargs )
 File 
 '/var/www/galaxy_home/galaxy-central/lib/galaxy/web/framework/__init__.py', 
 line 184 in decorator
 return func( self, trans, *args, **kwargs )
 File 
 '/var/www/galaxy_home/galaxy-central/lib/galaxy/web/controllers/admin_toolshed.py',
  line 978 in prepare_for_install
 repo_information_dict = from_json_string( raw_text )
 File 
 '/var/www/galaxy_home/galaxy-central/eggs/simplejson-2.1.1-py2.6-linux-x86_64-ucs4.egg/simplejson/__init__.py',
  line 384 in loads
 File 
 '/var/www/galaxy_home/galaxy-central/eggs/simplejson-2.1.1-py2.6-linux-x86_64-ucs4.egg/simplejson/decoder.py',
  line 402 in decode
 File 
 '/var/www/galaxy_home/galaxy-central/eggs/simplejson-2.1.1-py2.6-linux-x86_64-ucs4.egg/simplejson/decoder.py',
  line 420 in raw_decode
 JSONDecodeError: No JSON object could be decoded: line 1 column 0 (char 0)
 
 The following error sometimes (not always, but that may be due to my use of 
 Varnish) pops up in my apache logs when the above appears, could this be 
 linked?
 
 File does not exist: 
 /var/www/galaxy_home/galaxy-central/static/scripts/packed/modernizr.js, 
 referer: http://www.my.domain/galaxy/admin
 
 Pertinent configuration details:
 
  * Galaxy and the toolshed proxied from Apache on another machine.
  * A Cosign-based authentication system is in place, so 'use_remote_user = 
 True' in both Galaxy and the toolshed.
  * Galaxy's home dir is at /var/www/galaxy_home for consistency with other 
 things I run.
 
 All input appreciated.
 
 Thanks,
 
 Jon
 
 -- 
 Dr Jonathan Manning
 Bioinformatics Team
 Centre for Cardiovascular Science
 University of Edinburgh
 Queens Medical Research Institute
 47 Little France Crescent
 Edinburgh  EH16 4TJ
 United Kingdom
 T: +44 131 242 6700
 F: +44 131 242 6782
 E: jmann...@staffmail.ed.ac.uk
 
 
 The University of Edinburgh is a charitable body, registered in
 Scotland, with registration number SC005336.
 
 ___
 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:
 
 http://lists.bx.psu.edu/


___
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:

  http://lists.bx.psu.edu/


Re: [galaxy-dev] Problem installing repositories from local tool shed: JSONDecodeError: No JSON object could be decoded: line 1 column 0 (char 0)

2012-07-20 Thread Jon Manning

Hi Greg,

Thanks very much for the reply. I've actually just now worked around 
this- it was due somehow to our varnish/apache configs.


I'll explain our setup and how I fixed this in case anyone else gets the 
same error. For context our setup is a number of virtual machines:


 * Varnish caching HTTP reverse proxy on one VM handles and caches
   requests, pointing them at one of a few apache instances running on
   a handful of other VMs.
 * A single mysql server itself running on a dedicated VM.
 * A high-memory multi-core VM we use for analysis purposes- which now
   also runs Galaxy. This machine also runs apache for various
   specialist reasons.

I was sending things through varnish in order to use the cosign 
authentication we have set up there. I'm still doing that for toolshed 
administration purposes, but for the link from Galaxy itself for 
installing tools I've changed the line in tool_sheds_conf.xml to point 
directly at the apache on the Galaxy-running machine instead (which I 
configured appropriately to pass requests to the toolshed). That seems 
to have fixed things.


Obviously this upsets the toolshed because it's not getting the user 
from Cosign, but I don't need galaxy to authenticate with the toolshed 
anyway, so I just set a dummy REMOTE_USER on the proxy request from the 
galaxy-local apache to keep the 'remote_user' setting in the toolshed 
config happy.


Thanks again,

Jon

On 20/07/2012 15:57, Greg Von Kuster wrote:

Hi Jon,

It looks like your tool shed is not returning the information necessary for installing 
your tool shed repository into your local Galaxy instance.  Try putting the following 
print statement just before line 978 in ~/lib/galaxy/web/controllers/admin_toolshed.py.  
This will tell you why the information is not json decodable.

print raw_text: , raw_text

It will be difficult for me to tell you what caused this since I do not have 
access to either your tool shed or your local Galaxy instance, so hopefully 
this will provide enough information for you to determine the cause.

Thanks!

Greg Von Kuster


On Jul 20, 2012, at 8:51 AM, Jon Manning wrote:


Hi all,

I'm new to Galaxy- so hello, and excuse me while I get to grips with all the 
conventions!

I've successfully got my local Galaxy (galaxy-central) install set up and 
working correctly, as well as a local toolshed. I've also linked the two with a 
line in tool_sheds_conf.xml. But I'm getting the following problem when I try 
to install tools from the local toolshed (either ones I tried to make myself, 
or ones I downloaded from the Galaxy public toolshed).

The following appears when I click 'install to local Galaxy':

URL: 
http://www.my.domain/galaxy/admin_toolshed/prepare_for_install?tool_shed_url=http://www.my.domain/toolshed/repository_ids=adb5f5c93f827949changeset_revisions=f5ee1108336b
File 
'/var/www/galaxy_home/galaxy-central/eggs/Paste-1.6-py2.6.egg/paste/exceptions/errormiddleware.py',
 line 143 in __call__
app_iter = self.application(environ, start_response)
File 
'/var/www/galaxy_home/galaxy-central/eggs/Paste-1.6-py2.6.egg/paste/debug/prints.py',
 line 98 in __call__
environ, self.app)
File 
'/var/www/galaxy_home/galaxy-central/eggs/Paste-1.6-py2.6.egg/paste/wsgilib.py',
 line 539 in intercept_output
app_iter = application(environ, replacement_start_response)
File 
'/var/www/galaxy_home/galaxy-central/eggs/Paste-1.6-py2.6.egg/paste/recursive.py',
 line 80 in __call__
return self.application(environ, start_response)
File 
'/var/www/galaxy_home/galaxy-central/lib/galaxy/web/framework/middleware/remoteuser.py',
 line 91 in __call__
return self.app( environ, start_response )
File 
'/var/www/galaxy_home/galaxy-central/eggs/Paste-1.6-py2.6.egg/paste/httpexceptions.py',
 line 632 in __call__
return self.application(environ, start_response)
File '/var/www/galaxy_home/galaxy-central/lib/galaxy/web/framework/base.py', 
line 160 in __call__
body = method( trans, **kwargs )
File 
'/var/www/galaxy_home/galaxy-central/lib/galaxy/web/framework/__init__.py', 
line 184 in decorator
return func( self, trans, *args, **kwargs )
File 
'/var/www/galaxy_home/galaxy-central/lib/galaxy/web/controllers/admin_toolshed.py',
 line 978 in prepare_for_install
repo_information_dict = from_json_string( raw_text )
File 
'/var/www/galaxy_home/galaxy-central/eggs/simplejson-2.1.1-py2.6-linux-x86_64-ucs4.egg/simplejson/__init__.py',
 line 384 in loads
File 
'/var/www/galaxy_home/galaxy-central/eggs/simplejson-2.1.1-py2.6-linux-x86_64-ucs4.egg/simplejson/decoder.py',
 line 402 in decode
File 
'/var/www/galaxy_home/galaxy-central/eggs/simplejson-2.1.1-py2.6-linux-x86_64-ucs4.egg/simplejson/decoder.py',
 line 420 in raw_decode
JSONDecodeError: No JSON object could be decoded: line 1 column 0 (char 0)

The following error sometimes (not always, but that may be due to my use of 
Varnish) pops up in my apache logs when the above appears, could this be linked?

File does not exist: