Page 1 of 2

Error When Restarting OMERO Web

PostPosted: Thu Jun 23, 2011 6:39 am
by icaoberg
Yesterday we restarted omeroweb and got this error

Code: Select all
bash-3.2$ ./restart_omeroweb.sh
Stopping OMERO.web... Traceback (most recent call last):
  File "/usr0/local/omero.server/OMERO.server-Beta-4.2.1/bin/omero", line 123, in <module>
    rv = omero.cli.argv()
  File "/usr0/local/omero.server/OMERO.server-Beta-4.2.1/lib/python/omero/cli.py", line 1151, in argv
    cli.invoke(args[1:])
  File "/usr0/local/omero.server/OMERO.server-Beta-4.2.1/lib/python/omero/cli.py", line 704, in invoke
    stop = self.onecmd(line, previous_args)
  File "/usr0/local/omero.server/OMERO.server-Beta-4.2.1/lib/python/omero/cli.py", line 773, in onecmd
    self.execute(line, previous_args)
  File "/usr0/local/omero.server/OMERO.server-Beta-4.2.1/lib/python/omero/cli.py", line 853, in execute
    args.func(args)
  File "/usr0/local/omero.server/OMERO.server-Beta-4.2.1/lib/python/omero/plugins/web.py", line 368, in stop
    pid_text = pid_path.text().strip()
  File "/usr0/local/omero.server/OMERO.server-Beta-4.2.1/lib/python/path.py", line 602, in text
    f = self.open(_textmode)
  File "/usr0/local/omero.server/OMERO.server-Beta-4.2.1/lib/python/path.py", line 559, in open
    return file(self, mode)
IOError: [Errno 2] No such file or directory: path('/usr0/local/omero.server/OMERO.server-Beta-4.2.1/var/django.pid')
Starting OMERO.web... [OK]
bash-3.2$




I reverted the changes I made and I am still getting this error.

Re: Error When Restarting OMERO Web

PostPosted: Thu Jun 23, 2011 8:57 am
by jmoore
Hi Ivan,

had Django died? The error message is ugly and possibly confusing, but not fatal in any way. Further, that code changed substantially for 4.2.2 as well as for 4.3, so if web started up cleanly for you, I wouldn't worry about the message, but thanks for reporting it.

Cheers,
~Josh

Re: Error When Restarting OMERO Web

PostPosted: Thu Jun 23, 2011 2:01 pm
by bhcho
Hi Josh,

the problem is our omero.web is not working (although it said starting omeroweb is done).
it's showing just "Internal Server Error".

it looks like we don't have /var/django.pid file on our server. could you tell me any clue to resolve this problem?

bk

Re: Error When Restarting OMERO Web

PostPosted: Thu Jun 23, 2011 2:15 pm
by jmoore
What's in restart_web.sh? Can you send us the OMEROweb*.log files?

Cheers,
~Josh

Re: Error When Restarting OMERO Web

PostPosted: Thu Jun 23, 2011 2:43 pm
by bhcho
we made the script for an easy restarting for us.
it looks like the following. (note that we made a environment path that you can globally access to /OMERO_HOME/bin/)

#!/bin/sh

omero web stop
omero web start
sudo chown wwwsrv /usr0/local/omero.server/OMERO.server-Beta-4.2.1/var/django_fcgi.sock


and I sent you the log file via email.

BK

Re: Error When Restarting OMERO Web

PostPosted: Thu Jun 23, 2011 2:46 pm
by jmoore
The last several lines of your log are:
Code: Select all
Tue, 21 Jun 2011 13:44:16 root         INFO     Application Starting...
Tue, 21 Jun 2011 14:01:06 root         INFO     Application Starting...
Tue, 21 Jun 2011 14:17:29 root         INFO     Application Starting...
Tue, 21 Jun 2011 14:21:29 root         INFO     Application Starting...
Tue, 21 Jun 2011 14:30:28 root         INFO     Application Starting...
Tue, 21 Jun 2011 14:54:23 root         INFO     Application Starting...
Thu, 23 Jun 2011 02:39:03 root         INFO     Application Starting...


which means that nothing is happening. Do you possibly have an old process hanging around that you need to kill? It might be blocking the port so that nothing else can get it.

~Josh

Re: Error When Restarting OMERO Web

PostPosted: Thu Jun 23, 2011 3:52 pm
by wmoore
You might need to do something like this (this is for Django development server - you might need a different query?)

Code: Select all
$ ps aux | grep manage.py
will     17601   0.0  1.9   120332  39844 s000  S+   11:16am   0:05.20 /System/Library/Frameworks/Python.framework/Versions/2.5/Resources/Python.app/Contents/MacOS/Python manage.py runserver 0.0.0.0:4080 --noreload

$ kill 17601


Will.

Re: Error When Restarting OMERO Web

PostPosted: Thu Jun 23, 2011 8:39 pm
by bhcho
Josh,
we killed suspicious processes and restared the node, but the problem is still there.

when i did the diagnostics, after I restarted the node, omero, and omero.web,
OMERO.Web status is [NOT STARTED]

Will,
I don't see any process named manage.py

I guess problem is with the "django.pid" file, which our omero server trying to find and cannot do it.
could you tell me what this file does and how it looks like?

maybe we need to talk to the department help people.

Best,
BK

Re: Error When Restarting OMERO Web

PostPosted: Fri Jun 24, 2011 8:28 am
by cxallan
The django.pid file is simply a file containing the process ID of the root Django worker. It is only required for bin/omero web stop and for correct display of process status in bin/omero admin diagnostics.

Just run your two start commands:

Code: Select all
omero web start
sudo chown wwwsrv /usr0/local/omero.server/OMERO.server-Beta-4.2.1/var/django_fcgi.sock


And then ensure that you have Django workers running:

Code: Select all
ps auxww | grep manage.py
...

Re: Error When Restarting OMERO Web

PostPosted: Fri Jun 24, 2011 11:00 am
by bhcho
I just did what you told me, but it's still not working.

It seems like our django has a problem.
-bash-3.2$ ps auxww | grep manage.py
bhcho 9929 0.0 0.0 84996 780 pts/0 S+ 06:58 0:00 grep manage.py


what do you think?