We're Hiring!

unable to set omero.data.dir

Having a problem deploying OMERO? Please ask new questions at https://forum.image.sc/tags/omero
Please note:
Historical discussions about OMERO. Please look for and ask new questions at https://forum.image.sc/tags/omero

The OMERO.server installation documentation begins here and you can find OMERO.web deployment documentation here.

Re: unable to set omero.data.dir

Postby kennethgillen » Thu Oct 19, 2017 3:49 pm

Hi Max,

That's the one bug in the docs I mentioned earlier in the thread - which we missed, and we'll be fixing. It was pointed out just a couple of days ago on another thread, which I linked a few posts back.

That `pip install` step _does_ need to be run as root - the rest of the following steps should be as we've said in the docs, as the omero operating system user.

Totally understand why it's nicer to automate the install - we've been doing that within OME, as I mentioned, using Ansible scripts - see https://github.com/ome/ansible-examples-omero - this gives you an OMERO server with Web installed in one-step, but not deployed in Docker.

So all that switching users even caught us out!

All the best,

Kenny
kennethgillen
 
Posts: 254
Joined: Mon Nov 05, 2012 3:39 pm

Re: unable to set omero.data.dir

Postby maxgitt » Thu Oct 19, 2017 4:02 pm

Thanks for the link to ansible! I have never worked with it but will definitely give it a try once I've completed this install.

I managed to get through the short installation with the Omero.server, and on the last step same as before:
Code: Select all
omero@mgpc:~$ OMERO.server/bin/omero web start
Traceback (most recent call last):
  File "manage.py", line 51, in <module>
    import django.core.servers.basehttp
  File "/usr/local/lib/python2.7/dist-packages/django/core/servers/basehttp.py", line 14, in <module>
    from wsgiref import simple_server
ImportError: No module named wsgiref
omero@mgpc:~$ pip freeze | grep wsg
omero@mgpc:~$


I checked pip as well and nothing.
maxgitt
 
Posts: 32
Joined: Mon Oct 02, 2017 1:56 pm

Re: unable to set omero.data.dir

Postby kennethgillen » Thu Oct 19, 2017 4:11 pm

This should be what you need:

i.e. running the pip install as root, installing system-wide:

Code: Select all
mgitt@mgpc:~$ sudo pip install -r OMERO.server/share/web/requirements-py27.txt


This should run the system-wide install of the prerequisites. Then you can check if your omero user can see the globally installed packages via:

Code: Select all
omero@mgpc:~$ pip freeze | grep wsg


If that's not the trick, then hopefully someone else can chime in.

Best,

Kenny
kennethgillen
 
Posts: 254
Joined: Mon Nov 05, 2012 3:39 pm

Re: unable to set omero.data.dir

Postby maxgitt » Thu Oct 19, 2017 4:25 pm

Unfortunately I already made the correction to `sudo pip install`. As a last ditch effort I can confirm everything has been downloaded,

Code: Select all
mgitt@mgpc:/home/omero$ sudo pip install -r OMERO.server/share/web/requirements-py27.txt
The directory '/home/mgitt/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/mgitt/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Requirement already satisfied: zeroc-ice<3.7,>3.5 in /usr/local/lib/python2.7/dist-packages (from -r OMERO.server/share/web/requirements-py27.txt (line 7))
Requirement already satisfied: Django<1.9,>=1.8 in /usr/local/lib/python2.7/dist-packages (from -r OMERO.server/share/web/requirements-py27.txt (line 8))
Requirement already satisfied: django-pipeline==1.3.20 in /usr/local/lib/python2.7/dist-packages (from -r OMERO.server/share/web/requirements-py27.txt (line 9))
Requirement already satisfied: gunicorn>=19.3 in /usr/local/lib/python2.7/dist-packages (from -r OMERO.server/share/web/requirements-py27.txt (line 10))
Requirement already satisfied: omero-marshal==0.5.1 in /usr/local/lib/python2.7/dist-packages (from -r OMERO.server/share/web/requirements-py27.txt (line 12))
Requirement already satisfied: django-redis>=4.4 in /usr/local/lib/python2.7/dist-packages (from -r OMERO.server/share/web/requirements-py27.txt (line 13))
Requirement already satisfied: futures>=2.1.3 in /usr/local/lib/python2.7/dist-packages (from django-pipeline==1.3.20->-r OMERO.server/share/web/requirements-py27.txt (line 9))
Requirement already satisfied: importlib>=1.0.1 in /usr/local/lib/python2.7/dist-packages (from omero-marshal==0.5.1->-r OMERO.server/share/web/requirements-py27.txt (line 12))
Requirement already satisfied: redis>=2.10.0 in /usr/local/lib/python2.7/dist-packages (from django-redis>=4.4->-r OMERO.server/share/web/requirements-py27.txt (line 13))
mgitt@mgpc:/home/omero$ su omero
Password:
omero@mgpc:~$ pip freeze | grep wsg
omero@mgpc:~$


Thanks for your help so far. I'll probably look into ansible if this doesn't work out
maxgitt
 
Posts: 32
Joined: Mon Oct 02, 2017 1:56 pm

Re: unable to set omero.data.dir

Postby kennethgillen » Thu Oct 19, 2017 4:42 pm

Hi Max,

The error messages are suggesting:

sudo -H


Might be worth trying?

Cheers,

Kenny
kennethgillen
 
Posts: 254
Joined: Mon Nov 05, 2012 3:39 pm

Re: unable to set omero.data.dir

Postby rgozim » Fri Oct 20, 2017 2:55 pm

Hi Max,

How are you getting on?

I would recommend you don't install pip packages with sudo.

If you want to get this running easily uninstall the pip packages with:
Code: Select all
sudo pip freeze | sudo xargs pip uninstall -y

Our docs recommend you use a Virtualenv environment. This will essentially create a folder to house your pip packages in your user workspace folder (no sudo required).

To create a Virtualenv environment run:
Code: Select all
virtualenv virtual/vm_omeroweb

This will create a folder in /home/omero/virtual/vm_omeroweb

You can then activate this Virtualenv folder from your shell and then safely install (or uninstall) pip packages (just remember to activate the Virtualenv when you want to use OMERO Web).

To activate the Virtualenv run:
Code: Select all
source virtual/vm_omeroweb/bin/activate

You will see in brackets in your shell (vm_omeroweb). This indicates that your Virtualenv environment is active for the current shell session (if you close the shell, it'll no longer be active). With your open shell you can now pip install the requirements.txt of OMERO Web:
Code: Select all
pip install OMERO.server/share/web/requirements-py27.txt

Once this completes, you can run:
Code: Select all
omero web start

or any other OMERO Web commands.
User avatar
rgozim
Team Member
 
Posts: 25
Joined: Thu Jul 20, 2017 9:09 am

Previous

Return to Installation and Deployment

Who is online

Users browsing this forum: No registered users and 1 guest

cron