Page 2 of 3

Re: cannot log in to omero root account

PostPosted: Thu Apr 14, 2016 10:04 pm
by dpbrown
Just wanted to follow-up on my last post: I've tested the connection with the OMERO Insight client and I've been able to log in as root and create new user accounts & groups so it looks like this will be the way to go (rather than bother with the Pillow issue in OMERO.web)

Not sure if there is other functionality that might be impacted if OMERO fails to recognize the installed PIL module.

Anyway, thanks for all your help so far.

Re: cannot log in to omero root account

PostPosted: Thu Apr 14, 2016 10:59 pm
by atarkowska
Hi,

I think this are 2 separate issues.

Could you show me the output of
Code: Select all
source /home/omero/omeroenv/bin/activate
pip freeze | grep Pillow


Code: Select all
bin/omero config get --hide-password


In you webbrowser could you turn development tools and send me the response

Ola

Re: cannot log in to omero root account

PostPosted: Thu Apr 14, 2016 11:15 pm
by atarkowska
would you like to look at our travis docker test https://travis-ci.org/ome/omero-install/jobs/122252367 to make sure you followed exactly the same steps?

Ola

Re: cannot log in to omero root account

PostPosted: Fri Apr 15, 2016 4:46 pm
by dpbrown
Here's the output from pip and config:

Code: Select all
[omero@omero ~]$ source omeroenv/bin/activate
(omeroenv) [omero@omero ~]$
(omeroenv) [omero@omero ~]$ pip freeze | grep Pillow
Pillow==2.9.0
(omeroenv) [omero@omero ~]$
(omeroenv) [omero@omero ~]$
(omeroenv) [omero@omero ~]$ omero config get --hide-password
omero.data.dir=/OMERO
omero.db.name=omdbprim
omero.db.pass=********
omero.db.user=omdbusr1
omero.web.application_server=wsgi
(omeroenv) [omero@omero ~]$


And I was not aware of your "travis docker test". For my installation on CentOS 6.5 I followed your "OMERO.server installation on CentOS 6 with Python 2.7 and Ice 3.5" in conjunction with "OMERO.server installation instructions":

(https://www.openmicroscopy.org/site/sup ... ntos6.html and
https://www.openmicroscopy.org/site/sup ... ation.html, respectively.)

The OMERO.web connections are behaving differently than I'd experienced and reported yesterday. Now I can log in via the web interface to any of the user accounts (including root) and the connection seems stable. I've been able to upload a simple JPEG test image, view it and conduct some simple manipulations. What a difference a day makes....

However, inspection of the OMEROweb.log still reveals numerous errors of ""No Pillow installed", "No Pillow installed, line plots and split channel will fail!", "You need to install the Python Imaging Library....", etc.

I imagine this problem will also prevent implementation of OMERO.figure as well.

dpb

Re: cannot log in to omero root account

PostPosted: Fri Apr 15, 2016 6:08 pm
by dpbrown
I believe I've implemented a workaround to the PIL (Pillow) problem. Not a solution, per se, but I'm no longer generating any Pillow or PIL related errors in OMEORweb.log (and so far no other errors in OMEROweb.log).

I edited webclient_gateway.py as follows:

Added lines (after original line 34):

Code: Select all
import sys

sys.path.append('/home/omero/omeroenv/lib/python2.7/site-packages/PIL')

from PIL import Image


Comment-out lines as follows (original lines 67-76):

Code: Select all
#try:
#    from PIL import Image  # see ticket:2597
#except ImportError:
#    try:
#        import Image  # see ticket:2597
#   except:
#        logger.error(
#            "You need to install the Python Imaging Library. Get it at"
#            " http://www.pythonware.com/products/pil/")
#        logger.error(traceback.format_exc())


Going to push my luck and see if I can implement OMERO.figure.

Re: cannot log in to omero root account

PostPosted: Tue Apr 19, 2016 3:54 am
by jburel
Do you have the path to the virtual environment in in your
Code: Select all
PATH
e.g.
Code: Select all
/home/omero/omeroenv/
?

Cheers
Jmarie

Re: cannot log in to omero root account

PostPosted: Thu Apr 28, 2016 5:04 pm
by dpbrown
Yes, I have the path to omeroenv in my PATH.
Still, with the unmodified webclient_gateway.py, I cannot log in to any of the accounts via the OMERO.web. Still getting "No Pillow installed,...." errors in OMEROweb.log.

Am able to log in to all accounts via OMERO.Insight client as well as from the command line.

And still am able to confirm at the command line that PIL is installed and available:

Code: Select all
(omeroenv) [omero@omero ~]$ pip freeze | grep Pillow
Pillow==2.9.0

Re: cannot log in to omero root account

PostPosted: Fri Apr 29, 2016 10:28 am
by jmoore
Hi dpb,

Sorry, I'm coming to this a bit late and want to get us on the same page. Are you in a situation where we could backup and start again? If so, here's what I'd suggest:

  • Shutdown your servers
  • Freeze the state of your virtualenv: omeroenv/bin/pip freeze > requirements.bak
  • Move the virtualenv to a new location: mv omeroenv omeroenv.bak
  • Re-create the virtualenv: virtualenv omeroenv (add --system-site-packages if you did previously)
  • Reload the requirements: omeroenv/bin/pip install -r requirements.bak
  • Activate the virtualenv: source omeroenv/bin/activate
  • Restart your servers (in the same console)

As a script for the virtualenv steps:
Code: Select all
omeroenv/bin/pip freeze > requirements.bak
mv omeroenv omeroenv.bak
virtualenv omeroenv # --system-site-packages
omeroenv/bin/pip install -r requirements.bak
source omeroenv/bin/activate


If you could try that (possibly the version with and without system-site-packages) and let us know if it works, it'd be useful. In each case, it would be good to have the logs zipped under var/log.

Sorry for all the troubles!
~Josh.

Re: cannot log in to omero root account

PostPosted: Fri Apr 29, 2016 1:07 pm
by atarkowska
Could you explicitly say which webserver you use. In one of your first attachments I realized you use Apache, is that true?

I think all of us thought you use nginx as is simpler. Did you generate apache config when virtualenv was active? is path to virtualenv in config?

Code: Select all
WSGIDaemonProcess omeroweb processes=5 threads=1 maximum-requests=0 display-name=%{GROUP} user=omero python-path=/home/omero/omeroenv/lib64/python2.7/site-packages:/home/omero/omeroenv/lib/python2.7/site-packages:/home/omero/OMERO.server/lib/python:/home/omero/OMERO.server/lib/fallback:/home/omero/OMERO.server/lib/python/omeroweb


let us know

Ola

Re: cannot log in to omero root account

PostPosted: Mon Oct 02, 2017 7:54 pm
by maxgitt
I have followed the instructions to install OMERO.server and OMERO.web on Ubuntu. I have the same issue as above. I can't seem to login to the server. I'm not sure how to add an account, my issue seems trivial but I can't figure out where I'm going wrong.

When I try to login to the server, with password "omero_root_password":
Code: Select all
omero@maxgitt-pc:~/OMERO.server$ bin/omero login
Server: [localhost:4064]
Username: [omero]
Password:
Password check failed for 'omero': []


As a test, I kept all of the environmental variables at their default values so that settings.env looks like this:
Code: Select all
OMERO_DB_USER=db_user
OMERO_DB_PASS=db_password
OMERO_DB_NAME=omero_database
OMERO_ROOT_PASS=omero_root_password
OMERO_DATA_DIR=/OMERO

OMERO_WEB_PORT=80

export OMERO_DB_USER OMERO_DB_PASS OMERO_DB_NAME OMERO_ROOT_PASS OMERO_DATA_DIR OMERO_WEB_PORT


I tried the exact same sanity check that @dpbrown used above.
1. Change password of database user (my password was "omero_root_password", should it be "db_password"?)
2. Set database password to same hash value
3. Check hash from database

1. change password to omero_root_password
Code: Select all
omero@maxgitt-pc:~/OMERO.server$ bin/omero db password
Please enter password for OMERO root user:
Please re-enter password for OMERO root user:
UPDATE password SET hash = 'clNK6+smrt4hO8SeLCuv0Q==' WHERE experimenter_id  = 0;


2. set db password to hash(omero_root_password)
Code: Select all
omero@maxgitt-pc:~/OMERO.server$ psql -h localhost omero_database -U db_user -c "UPDATE password SET hash = 'clNK6+smrt4hO8SeLCuv0Q==' WHERE experimenter_id  = 0;"
UPDATE 1


3. sanity check
Code: Select all
omero@maxgitt-pc:~/OMERO.server$ psql -h localhost omero_database -U db_user -c " select * from password"
experimenter_id |           hash           | changed
-----------------+--------------------------+---------
               1 |                          |
               0 | clNK6+smrt4hO8SeLCuv0Q== |
(2 rows)


Lastly, when I tried to login I fail. Same as the top. Any hints would be much appreciated, thank you!