[galaxy-dev] tmp file under database/tmp get regenerated after restarting Galaxy

2016-11-16 Thread Mark Xiao
Dear Galaxy Developers,

I am using Galaxy version 15.10 on my server, load-balancing is enabled. I
found a problem when running the jobs. When there are running jobs and if I
restart the Galaxy process at this time, the job will fail at the end of
the job with the error message such as:

IOError: [Errno 2] No such file or directory:
'/galaxy/database/tmp/tmpleXN4b'

That tmp file doesn't exist, I guess it is because when Galaxy process get
restarted, the tmp file get regenerated, so the job cannot find the correct
tmp file, then it was failed. Do you think this is a known issue, and is
there a fix for this?

Thank you in advance!
Mark
___
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:
  https://lists.galaxyproject.org/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/

Re: [galaxy-dev] Restart Galaxy without interruption

2016-11-16 Thread Rémy Dernat
Hi,

Thanks Laure and Martin.

This is very interesting. However, can it handle the load balancing part as
Gildas asked ? Anyway, thanks for the tip.

Can it be possible to share /etc/supervisor/conf.d/galaxy.conf without
having to use ansible ? I downloaded the tarball, however, I did not find
this file; is it (seems to be) galaxy.j2 in the template directory ?

Best regards,
Remy

2016-11-16 16:36 GMT+01:00 Martin Čech :

> Hi Gildas,
>
> the approach which Main Galaxy takes is as described by Nate in the
> exercise document linked by Laure. Exerpt here:
>
> "In addition, you can gracefully restart the uWSGI Galaxy process with
> sudo supervisorctl signal HUP gx:galaxy. uWSGI is configured to start
> Galaxy in a "master" process and then fork the configured number of worker
> processes. Because of this, if sent a SIGHUP signal, it will kill the
> workers but the master process will hold its socket open, blocking client
> (browser) connections until new workers are forked. This prevents users
> from seeing a proxy error page during restarts."
>
> Using this, you can restart both the uWSGI server and Galaxy handlers with:
>
> $ sudo supervisorctl signal HUP gx:galaxy && sudo supervisorctl restart
> gx:handler0 gx:handler1
>
> without supervisor it would be something like $ pkill -HUP -o -u 
> uwsgi
>
> Thanks for using Galaxy,
>
> Martin
>
> On Wed, Nov 16, 2016 at 5:19 AM Laure QUINTRIC 
> wrote:
>
>> Hi Gildas,
>>
>> Have a look here : https://github.com/martenson/
>> dagobah-training/tree/master/advanced/002a-systemd-supervisor
>>
>> See ya.
>>
>>
>> Laure
>>
>> Le 14/11/2016 à 21:35, Gildas Le Corguillé a écrit :
>>
>> Hi,
>>
>> Since Galaxy need to be restarted sometime (load datatype, add ressources
>> in .loc, apply changes in the galaxy.ini), is anybody of you have solutions
>> to restart it without interrupt the service?
>>
>> We are now using nginx, uwsgi and supervisord.
>>
>> My hope is to split the Galaxy process in two group (1 uwsgi and 2 job
>> handlers per group). That way, we will be able to restart the group1 and
>> then the group2.
>>
>>
>> I was planning to set the 2 uwsgi servers and delegate the load balancing
>> to ngnix (https://www.nginx.com/resources/admin-guide/load-balancer/)
>> But maybe, some of you already implemented that and can provide me some
>> advices or warnings.
>>
>> The job handler part seems easier to deal with
>> --server-name=handler1_%(process_num)s
>> --server-name=handler2_%(process_num)s
>>
>> Thanks by advance
>>
>> Gildas
>>
>> -
>> Gildas Le Corguillé - Bioinformatician/Bioanalyste
>>
>> Plateform ABiMS (Analyses and Bioinformatics for Marine Science)
>> http://abims.sb-roscoff.fr
>>
>> Member of the Workflow4Metabolomics project
>> http://workflow4metabolomics.org
>>
>> Station Biologique de Roscoff - UPMC/CNRS - FR2424
>> Place Georges Teissier 29680 Roscoff FRANCE
>> tel: +33 2 98 29 23 81 <+33%202%2098%2029%2023%2081>
>> --
>>
>>
>>
>>
>>
>> ___
>> 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:
>>   https://lists.galaxyproject.org/
>>
>> To search Galaxy mailing lists use the unified search at:
>>   http://galaxyproject.org/search/mailinglists/
>>
>>
>> ___
>> 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:
>>   https://lists.galaxyproject.org/
>>
>> To search Galaxy mailing lists use the unified search at:
>>   http://galaxyproject.org/search/mailinglists/
>
>
> ___
> 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:
>   https://lists.galaxyproject.org/
>
> To search Galaxy mailing lists use the unified search at:
>   http://galaxyproject.org/search/mailinglists/
>
___
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:
  https://lists.galaxyproject.org/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/

Re: [galaxy-dev] Restart Galaxy without interruption

2016-11-16 Thread Martin Čech
Hi Gildas,

the approach which Main Galaxy takes is as described by Nate in the
exercise document linked by Laure. Exerpt here:

"In addition, you can gracefully restart the uWSGI Galaxy process with sudo
supervisorctl signal HUP gx:galaxy. uWSGI is configured to start Galaxy in
a "master" process and then fork the configured number of worker processes.
Because of this, if sent a SIGHUP signal, it will kill the workers but the
master process will hold its socket open, blocking client (browser)
connections until new workers are forked. This prevents users from seeing a
proxy error page during restarts."

Using this, you can restart both the uWSGI server and Galaxy handlers with:

$ sudo supervisorctl signal HUP gx:galaxy && sudo supervisorctl restart
gx:handler0 gx:handler1

without supervisor it would be something like $ pkill -HUP -o -u 
uwsgi

Thanks for using Galaxy,

Martin

On Wed, Nov 16, 2016 at 5:19 AM Laure QUINTRIC 
wrote:

> Hi Gildas,
>
> Have a look here :
> https://github.com/martenson/dagobah-training/tree/master/advanced/002a-systemd-supervisor
>
> See ya.
>
>
> Laure
>
> Le 14/11/2016 à 21:35, Gildas Le Corguillé a écrit :
>
> Hi,
>
> Since Galaxy need to be restarted sometime (load datatype, add ressources
> in .loc, apply changes in the galaxy.ini), is anybody of you have solutions
> to restart it without interrupt the service?
>
> We are now using nginx, uwsgi and supervisord.
>
> My hope is to split the Galaxy process in two group (1 uwsgi and 2 job
> handlers per group). That way, we will be able to restart the group1 and
> then the group2.
>
>
> I was planning to set the 2 uwsgi servers and delegate the load balancing
> to ngnix (https://www.nginx.com/resources/admin-guide/load-balancer/)
> But maybe, some of you already implemented that and can provide me some
> advices or warnings.
>
> The job handler part seems easier to deal with
> --server-name=handler1_%(process_num)s
> --server-name=handler2_%(process_num)s
>
> Thanks by advance
>
> Gildas
>
> -
> Gildas Le Corguillé - Bioinformatician/Bioanalyste
>
> Plateform ABiMS (Analyses and Bioinformatics for Marine Science)
> http://abims.sb-roscoff.fr
>
> Member of the Workflow4Metabolomics project
> http://workflow4metabolomics.org
>
> Station Biologique de Roscoff - UPMC/CNRS - FR2424
> Place Georges Teissier 29680 Roscoff FRANCE
> tel: +33 2 98 29 23 81 <+33%202%2098%2029%2023%2081>
> --
>
>
>
>
>
> ___
> 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:
>   https://lists.galaxyproject.org/
>
> To search Galaxy mailing lists use the unified search at:
>   http://galaxyproject.org/search/mailinglists/
>
>
> ___
> 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:
>   https://lists.galaxyproject.org/
>
> To search Galaxy mailing lists use the unified search at:
>   http://galaxyproject.org/search/mailinglists/
___
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:
  https://lists.galaxyproject.org/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/

Re: [galaxy-dev] More problems installing Galaxy

2016-11-16 Thread Dannon Baker
Hernan,

Sorry for the slow response here, have you made any progress?  I'd be glad
to help sort this out.

Instead of creating an alias to a particular python in your .bashrc, I'd
recommend that if you're having problems you should manually create the
virtualenv with the specific python version you want.  Once you've done
that, on galaxy's first start, it'll populate the requirements correctly.

An example command would be:

virtualenv -p /usr/local/bin/python2.7 .venv

Execute this command from the galaxy directory, and it'll create a
virtualenv named .venv, which is what Galaxy expects to use.  After that,
just start Galaxy and the requirements should be installed to .venv
automatically.

-Dannon

On Wed, Nov 9, 2016 at 2:39 PM, Hernán Piqueras  wrote:

> I have a Linux with both Python 2.6 and Python 2.7. Apparently Python is
> so bad designed that you cannot simply upgrade from 2.6 to 2.7 without
> breaking your system. As latest Galaxy works with Python 2.7, I put an
> alias in my .bashrc to /usr/local/bin/python2.7 and the same with
> virtualenv. I also enabled bash debugging and enabled expanded alias into
> .sh scripts.
>
>
> Then I ran :
>
>
> $ sh galaxy/run.sh
>
>
> ... lots of output ---
>
> Requirement already satisfied: pysam==0.8.4+gx1 in
> ./.venv/lib/python2.7/site-packages (from -r requirements.txt (line 70))
> Requirement already satisfied: PasteScript in 
> ./.venv/lib/python2.7/site-packages
> (from pulsar-galaxy-lib==0.7.0.dev5->-r requirements.txt (line 51))
> ++ PYTHONPATH=lib
> ++ /usr/local/bin/python2.7 -c 'import galaxy.dependencies; print
> '\''\n'\''.join(galaxy.dependencies.optional('\''config/galaxy.ini'\''))'
> Traceback (most recent call last):
>   File "", line 1, in 
>   File "/home/galaxy/galaxy/lib/galaxy/dependencies/__init__.py", line 9,
> in 
> from galaxy.util import asbool
>   File "/home/galaxy/galaxy/lib/galaxy/util/__init__.py", line 31, in
> 
> from six import binary_type, iteritems, PY3, string_types, text_type
> ImportError: No module named six
> + GALAXY_CONDITIONAL_DEPENDENCIES=
> + exit 1
>
>
> If I check with root user, six package is installed. My guess was I
> am missing an alias to pip2.7, then I added such alias in my .bashrc and
> again:
>
>
> $ sh galaxy/run.sh
>
>
> ... lots of output ---
>
> ++ '[' -n /bin/bash -o -n '' ']'
> ++ hash -r
> + unset PYTHONPATH
> + '[' -z /home/galaxy/galaxy/.venv ']'
> + : https://wheels.galaxyproject.org/simple
> + '[' 1 -eq 1 ']'
> + /usr/local/bin/pip2.7 install 'pip>=8.1'
> Traceback (most recent call last):
>   File "/usr/local/bin/pip2.7", line 5, in 
> from pkg_resources import load_entry_point
>   File "/usr/local/lib/python2.7/site-packages/distribute-0.6.
> 44-py2.7.egg/pkg_resources.py", line 2850, in 
> working_set.require(__requires__)
>   File "/usr/local/lib/python2.7/site-packages/distribute-0.6.
> 44-py2.7.egg/pkg_resources.py", line 696, in require
> needed = self.resolve(parse_requirements(requirements))
>   File "/usr/local/lib/python2.7/site-packages/distribute-0.6.
> 44-py2.7.egg/pkg_resources.py", line 594, in resolve
> raise DistributionNotFound(req)
> pkg_resources.DistributionNotFound: pip==9.0.1
>
> # pip --version
> pip 9.0.1 from /usr/local/lib/python2.7/site-packages/pip-9.0.1-py2.7.egg
> (python 2.7)
> I have installed Python 2.7 and its tools (virtualenv, pip, etc) following
> official guidelines.
>
>
> How can install the missing dependecies?
>
>
>
>
> ___
> 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:
>   https://lists.galaxyproject.org/
>
> To search Galaxy mailing lists use the unified search at:
>   http://galaxyproject.org/search/mailinglists/
>
___
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:
  https://lists.galaxyproject.org/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/

Re: [galaxy-dev] Restart Galaxy without interruption

2016-11-16 Thread Laure QUINTRIC

Hi Gildas,

Have a look here : 
https://github.com/martenson/dagobah-training/tree/master/advanced/002a-systemd-supervisor


See ya.
Laure


Le 14/11/2016 à 21:35, Gildas Le Corguillé a écrit :

Hi,

Since Galaxy need to be restarted sometime (load datatype, add 
ressources in .loc, apply changes in the galaxy.ini), is anybody of 
you have solutions to restart it without interrupt the service?


We are now using nginx, uwsgi and supervisord.

My hope is to split the Galaxy process in two group (1 uwsgi and 2 job 
handlers per group). That way, we will be able to restart the group1 
and then the group2.



I was planning to set the 2 uwsgi servers and delegate the load 
balancing to ngnix 
(https://www.nginx.com/resources/admin-guide/load-balancer/)
But maybe, some of you already implemented that and can provide me 
some advices or warnings.


The job handler part seems easier to deal with
--server-name=handler1_%(process_num)s
--server-name=handler2_%(process_num)s

Thanks by advance

Gildas

-
Gildas Le Corguillé - Bioinformatician/Bioanalyste

Plateform ABiMS (Analyses and Bioinformatics for Marine Science)
http://abims.sb-roscoff.fr

Member of the Workflow4Metabolomics project
http://workflow4metabolomics.org 

Station Biologique de Roscoff - UPMC/CNRS - FR2424
Place Georges Teissier 29680 Roscoff FRANCE
tel: +33 2 98 29 23 81
--





___
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:
   https://lists.galaxyproject.org/

To search Galaxy mailing lists use the unified search at:
   http://galaxyproject.org/search/mailinglists/


___
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:
  https://lists.galaxyproject.org/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/