We're Hiring!

Problems with upgrading 5.1.2 to 5.2

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: Problems with upgrading 5.1.2 to 5.2

Postby phm » Mon Nov 09, 2015 1:15 pm

atarkowska wrote:Hi Phillipe, I think you responded to Simon's question from Thursday
Ola

Hi Ola,

you're right :?
phm
 
Posts: 185
Joined: Tue Mar 19, 2013 3:39 pm

Re: Problems with upgrading 5.1.2 to 5.2

Postby phm » Tue Nov 10, 2015 11:29 am

Hi,

I'm trying to go back to apache and when omero was configured with Apache I can't connect to the omero login page. The apache log say :
Code: Select all
tail /var/log/httpd/ssl_error_log
[Tue Nov 10 12:18:45 2015] [error] [client 192.168.111.149] Directory index forbidden by Options directive: /var/www/html/
[Tue Nov 10 12:19:15 2015] [error] [client 192.168.111.149] Directory index forbidden by Options directive: /var/www/html/
[Tue Nov 10 12:19:45 2015] [error] [client 192.168.111.149] Directory index forbidden by Options directive: /var/www/html/
[Tue Nov 10 12:20:15 2015] [error] [client 192.168.111.149] Directory index forbidden by Options directive: /var/www/html/
[Tue Nov 10 12:20:45 2015] [error] [client 192.168.111.149] Directory index forbidden by Options directive: /var/www/html/
[Tue Nov 10 12:21:08 2015] [error] [client 192.168.188.18] File does not exist: /var/www/html/omero
[Tue Nov 10 12:21:15 2015] [error] [client 192.168.111.149] Directory index forbidden by Options directive: /var/www/html/
[Tue Nov 10 12:21:45 2015] [error] [client 192.168.111.149] Directory index forbidden by Options directive: /var/www/html/
[Tue Nov 10 12:22:15 2015] [error] [client 192.168.111.149] Directory index forbidden by Options directive: /var/www/html/
[Tue Nov 10 12:22:45 2015] [error] [client 192.168.111.149] Directory index forbidden by Options directive: /var/www/html/

omero.conf :

Code: Select all
###
# apache config for omero
# this file should be loaded *after* ssl.conf
#
# -D options to control configurations
#  OmeroForceSSL - redirect all http requests to https

###
### Example SSL stanza for OMERO.web created 2015-11-10 12:19:45.861349
###

# Eliminate overlap warnings with the default ssl vhost
# Requires SNI (http://wiki.apache.org/httpd/NameBasedSSLVHostsWithSNI)
# support most later versions of mod_ssl and OSes will support it if you see
# "You should not use name-based virtual hosts in conjunction with SSL!!"
# or similar start apache with -D DISABLE_SNI and modify ssl.conf
#<IfDefine !DISABLE_SNI>
#  NameVirtualHost *:443
#</IfDefine>
#
## force https/ssl
#<IfDefine OmeroForceSSL>
#  RewriteEngine on
#  RewriteCond %{HTTPS} !on
#  RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L]
#</IfDefine>
#
#<VirtualHost _default_:443>
#
#  ErrorLog logs/ssl_error_log
#  TransferLog logs/ssl_access_log
#  LogLevel warn
#
#  SSLEngine on
#  SSLProtocol all -SSLv2
#  SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW
#  SSLCertificateFile /etc/pki/tls/certs/server.crt
#  SSLCertificateKeyFile /etc/pki/tls/private/server.key
#
#  # SSL Protocol Adjustments:
#  SetEnvIf User-Agent ".*MSIE.*" \
#    nokeepalive ssl-unclean-shutdown \
#    downgrade-1.0 force-response-1.0
#
#  # Per-Server Logging:
#  CustomLog logs/ssl_request_log \
#    "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
#
#</VirtualHost>

###
### Stanza for OMERO.web created 2015-11-10 12:19:45.861349
###

<VirtualHost _default_:80>

  DocumentRoot /opt/OMERO.server/lib/python/omeroweb

  WSGIDaemonProcess omeroweb_omero processes=5 threads=1 display-name=%{GROUP} user=omero python-path=/opt/Ice-3.5.1/python:/opt/OMERO.server/lib/python:/opt/OMERO.server/lib/fallback:/opt/OMERO.server/lib/python/omeroweb
 
  WSGIProcessGroup omeroweb_omero

  WSGIScriptAlias /omero /opt/OMERO.server/lib/python/omeroweb/wsgi.py

  <Directory "/opt/OMERO.server/lib/python/omeroweb">
    Order allow,deny
    Allow from all
  </Directory>

  Alias /omero/static /opt/OMERO.server/lib/python/omeroweb/static
  <Directory "/opt/OMERO.server/lib/python/omeroweb/static">
      Options -Indexes FollowSymLinks
      Order allow,deny
      Allow from all
  </Directory>

</VirtualHost>

# see https://code.google.com/p/modwsgi/wiki/ConfigurationIssues
WSGISocketPrefix run/wsgi
# WSGISocketPrefix /var/run/wsgi



Philippe
phm
 
Posts: 185
Joined: Tue Mar 19, 2013 3:39 pm

Re: Problems with upgrading 5.1.2 to 5.2

Postby atarkowska » Tue Nov 10, 2015 11:37 am

Hi Philippe,

As mentioned before, did you recompile mod_wsgi by hand? You cannot yum install it

What is an output of

Code: Select all
ldd /etc/httpd/modules/mod_wsgi.so


It should link to

Code: Select all
    ldd /etc/httpd/modules/mod_wsgi.so
       libpython2.7.so.1.0 => /opt/rh/python27/root/usr/lib64/libpython2.7.so.1.0 (0x00007ff8a9063000)


Ola
atarkowska
 
Posts: 327
Joined: Mon May 18, 2009 12:44 pm

Re: Problems with upgrading 5.1.2 to 5.2

Postby phm » Tue Nov 10, 2015 12:17 pm

atarkowska wrote:Hi Philippe,

As mentioned before, did you recompile mod_wsgi by hand? You cannot yum install it

What is an output of

Code: Select all
ldd /etc/httpd/modules/mod_wsgi.so


It should link to

Code: Select all
    ldd /etc/httpd/modules/mod_wsgi.so
       libpython2.7.so.1.0 => /opt/rh/python27/root/usr/lib64/libpython2.7.so.1.0 (0x00007ff8a9063000)

Ola


Hi Ola,

I recompiled mod_wsgi with python 2.7

Code: Select all
ldd /etc/httpd/modules/mod_wsgi.so
   linux-vdso.so.1 =>  (0x00007fffd6748000)
   libpython2.7.so.1.0 => /opt/rh/python27/root/usr/lib64/libpython2.7.so.1.0 (0x00007f144743d000)
   libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f1447206000)
   libdl.so.2 => /lib64/libdl.so.2 (0x00007f1447002000)
   libutil.so.1 => /lib64/libutil.so.1 (0x00007f1446dff000)
   libm.so.6 => /lib64/libm.so.6 (0x00007f1446b7a000)
   libc.so.6 => /lib64/libc.so.6 (0x00007f14467e6000)
   /lib64/ld-linux-x86-64.so.2 (0x0000003fe2800000)



Reloaded httpd, omero web and now I got a time out on the omero login page.
in the httpd omero.conf I notice some differences about the line:
python-path=/opt/Ice-3.5.1/python

In your example
python-path=/usr/lib64/python2.6/site-packages/Ice

And /var/log/httpd/error.log
Code: Select all
user_base = getuserbase() # this will also set USER_BASE
  File "/usr/local/lib/python2.7/site.py", line 231, in getuserbase
    USER_BASE = get_config_var('userbase')
  File "/usr/local/lib/python2.7/sysconfig.py", line 520, in get_config_var
    return get_config_vars().get(name)
  File "/usr/local/lib/python2.7/sysconfig.py", line 453, in get_config_vars
    import re
  File "/usr/local/lib/python2.7/re.py", line 108, in <module>
    import _locale
SystemError: dynamic module not initialized properly

Philippe
phm
 
Posts: 185
Joined: Tue Mar 19, 2013 3:39 pm

Re: Problems with upgrading 5.1.2 to 5.2

Postby atarkowska » Tue Nov 10, 2015 2:08 pm

Hi Philippe,

I am glade you managed to compile mod_wsgi with SCL python.

As you can see from the stacktrace it is trying to use python located in
Code: Select all
/usr/local/lib/python2.7/re.py
.
Did you create an alias
Code: Select all
/usr/local/bin/python2.7
? Where does it come from exactly?

For me works:

default 2.6:
Code: Select all
$ which python
/usr/bin/python


as opposite to SCL Python
Code: Select all
$ source /opt/rh/python27/enable
$ which python
/opt/rh/python27/root/usr/bin/python



Once you sort it out, you will still need to set LD_LIBRARY_PATH in your apache init /etc/sysconfig/httpd
Code: Select all
ICE_HOME=/opt/Ice-3.5.1
export LD_LIBRARY_PATH="${ICE_HOME}/lib64:${ICE_HOME}/lib:$LD_LIBRARY_PATH"


Ola
atarkowska
 
Posts: 327
Joined: Mon May 18, 2009 12:44 pm

Re: Problems with upgrading 5.1.2 to 5.2

Postby phm » Tue Nov 10, 2015 3:00 pm

atarkowska wrote:Hi Philippe,

I am glade you managed to compile mod_wsgi with SCL python.

As you can see from the stacktrace it is trying to use python located in
Code: Select all
/usr/local/lib/python2.7/re.py
.
Did you create an alias
Code: Select all
/usr/local/bin/python2.7
? Where does it come from exactly?

For me works:

default 2.6:
Code: Select all
$ which python
/usr/bin/python


as opposite to SCL Python
Code: Select all
$ source /opt/rh/python27/enable
$ which python
/opt/rh/python27/root/usr/bin/python



Once you sort it out, you will still need to set LD_LIBRARY_PATH in your apache init /etc/sysconfig/httpd
Code: Select all
ICE_HOME=/opt/Ice-3.5.1
export LD_LIBRARY_PATH="${ICE_HOME}/lib64:${ICE_HOME}/lib:$LD_LIBRARY_PATH"


Ola


Hi Ola,
This is what I have on my system:

Code: Select all
which python
/opt/rh/python27/root/usr/bin/python


Code: Select all
source /opt/rh/python27/enable
[omero@omero ~]$ which python
/opt/rh/python27/root/usr/bin/python


I don't know how to fix it.

python in /usr/local/bin comes from compilation of python 2.7 alternate to 2.6 in CentOs 6.5.
Code: Select all
ls -l /usr/local/bin/python
lrwxrwxrwx. 1 root root 24  4 nov.  11:43 /usr/local/bin/python -> /usr/local/bin/python2.7


Now the error.log httpd
Code: Select all
tail -50 /var/log/httpd/error_log
[Tue Nov 10 16:31:31 2015] [notice] SELinux policy enabled; httpd running as context unconfined_u:system_r:httpd_t:s0
[Tue Nov 10 16:31:31 2015] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Tue Nov 10 16:31:31 2015] [notice] Digest: generating secret for digest authentication ...
[Tue Nov 10 16:31:31 2015] [notice] Digest: done
[Tue Nov 10 16:31:31 2015] [notice] FastCGI: process manager initialized (pid 946)
[Tue Nov 10 16:31:31 2015] [notice] mod_python: Creating 4 session mutexes based on 256 max processes and 0 max threads.
[Tue Nov 10 16:31:31 2015] [notice] mod_python: using mutex_directory /tmp
[Tue Nov 10 16:31:31 2015] [notice] Apache/2.2.15 (Unix) DAV/2 mod_fastcgi/2.4.6 PHP/5.3.3 mod_python/3.3.1 Python/2.6.6 mod_ssl/2.2.15 OpenSSL/1.0.1e-fips mod_wsgi/3.4 Python/2.7.5 configured -- resuming normal operations


Somebody say that mod_python could not be use with mod_wsgi ???

Philippe
phm
 
Posts: 185
Joined: Tue Mar 19, 2013 3:39 pm

Re: Problems with upgrading 5.1.2 to 5.2

Postby atarkowska » Tue Nov 10, 2015 7:50 pm

Hi Philippe,

Mod_python is using a different Python version and is likely the cause of all the problems as you cannot use both mod_python and mod_wsgi together when they are using different Python versions.

You can check it via

Code: Select all
ldd /etc/httpd/modules/mod_wsgi.so

vs
Code: Select all
ldd /etc/httpd/modules/mod_python.so


Ola
atarkowska
 
Posts: 327
Joined: Mon May 18, 2009 12:44 pm

Re: Problems with upgrading 5.1.2 to 5.2

Postby atarkowska » Tue Nov 10, 2015 7:51 pm

Keep in mind that you can have nginx installed along side Apache. If you have spare IP address bind it to nginx only.

Ola
atarkowska
 
Posts: 327
Joined: Mon May 18, 2009 12:44 pm

Re: Problems with upgrading 5.1.2 to 5.2

Postby phm » Thu Nov 12, 2015 8:52 am

atarkowska wrote:Hi Philippe,

Mod_python is using a different Python version and is likely the cause of all the problems as you cannot use both mod_python and mod_wsgi together when they are using different Python versions.

You can check it via

Code: Select all
ldd /etc/httpd/modules/mod_wsgi.so

vs
Code: Select all
ldd /etc/httpd/modules/mod_python.so


Ola


Hi Ola,

I Effectively I have python_mod linked to python 2.6. I disabled python_mod in Apache
Code: Select all
mv /etc/httpd/conf.d/python.conf /etc/httpd/conf.d/python.bak
/etc/init.d/httpd restart
omero web start
Post-processed 'omeroweb.viewer.min.css' as 'omeroweb.viewer.min.css'
Post-processed 'omeroweb.viewer.min.js' as 'omeroweb.viewer.min.js'

0 static files copied to '/opt/OMERO.server/lib/python/omeroweb/static', 700 unmodified, 2 post-processed.
Clearing expired sessions. This may take some time...
[OK]
You are deploying OMERO.web using apache and mod_wsgi. Generate apache config using 'omero web config apache' and reload web server.


Why I have always this message when I start omero web ????
You are deploying OMERO.web using apache and mod_wsgi. Generate apache config using 'omero web config apache' and reload web server.


Philippe
phm
 
Posts: 185
Joined: Tue Mar 19, 2013 3:39 pm

Re: Problems with upgrading 5.1.2 to 5.2

Postby phm » Thu Nov 12, 2015 8:53 am

atarkowska wrote:Keep in mind that you can have nginx installed along side Apache. If you have spare IP address bind it to nginx only.

Ola


Nginx is not running
phm
 
Posts: 185
Joined: Tue Mar 19, 2013 3:39 pm

PreviousNext

Return to Installation and Deployment

Who is online

Users browsing this forum: No registered users and 2 guests

cron