We're Hiring!

Error When Restarting OMERO Web

General and open developer discussion about using OMERO APIs from C++, Java, Python, Matlab and more! Please 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

If you are having trouble with custom code, please provide a link to a public repository, ideally GitHub.

Error When Restarting OMERO Web

Postby icaoberg » Thu Jun 23, 2011 6:39 am

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.
icaoberg
 
Posts: 145
Joined: Fri Sep 17, 2010 9:05 pm
Location: Pittsburgh, PA

Re: Error When Restarting OMERO Web

Postby jmoore » Thu Jun 23, 2011 8:57 am

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
User avatar
jmoore
Site Admin
 
Posts: 1591
Joined: Fri May 22, 2009 1:29 pm
Location: Germany

Re: Error When Restarting OMERO Web

Postby bhcho » Thu Jun 23, 2011 2:01 pm

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
bhcho
 
Posts: 236
Joined: Mon Apr 05, 2010 2:15 pm

Re: Error When Restarting OMERO Web

Postby jmoore » Thu Jun 23, 2011 2:15 pm

What's in restart_web.sh? Can you send us the OMEROweb*.log files?

Cheers,
~Josh
User avatar
jmoore
Site Admin
 
Posts: 1591
Joined: Fri May 22, 2009 1:29 pm
Location: Germany

Re: Error When Restarting OMERO Web

Postby bhcho » Thu Jun 23, 2011 2:43 pm

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
bhcho
 
Posts: 236
Joined: Mon Apr 05, 2010 2:15 pm

Re: Error When Restarting OMERO Web

Postby jmoore » Thu Jun 23, 2011 2:46 pm

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
User avatar
jmoore
Site Admin
 
Posts: 1591
Joined: Fri May 22, 2009 1:29 pm
Location: Germany

Re: Error When Restarting OMERO Web

Postby wmoore » Thu Jun 23, 2011 3:52 pm

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.
User avatar
wmoore
Team Member
 
Posts: 674
Joined: Mon May 18, 2009 12:46 pm

Re: Error When Restarting OMERO Web

Postby bhcho » Thu Jun 23, 2011 8:39 pm

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
bhcho
 
Posts: 236
Joined: Mon Apr 05, 2010 2:15 pm

Re: Error When Restarting OMERO Web

Postby cxallan » Fri Jun 24, 2011 8:28 am

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
...
cxallan
Site Admin
 
Posts: 509
Joined: Fri May 01, 2009 8:07 am

Re: Error When Restarting OMERO Web

Postby bhcho » Fri Jun 24, 2011 11:00 am

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?
bhcho
 
Posts: 236
Joined: Mon Apr 05, 2010 2:15 pm

Next

Return to Developer Discussion

Who is online

Users browsing this forum: No registered users and 0 guests