[ome-users] Nginx 502 Bad Gateway

C Neves carlos at glencoesoftware.com
Tue Mar 20 15:06:22 GMT 2012


Hello Harri,

Taking a closer look at this thread it seems that the nginx.conf you are
using has:

fastcgi_pass 0.0.0.0:4080

Which looks wrong to me. Listening on 0.0.0.0 is fine (all interfaces)
but this is where the nginx fastcgi handler will be connecting to. Can
you change that to 127.0.0.1 and retry?

Regards,
Carlos

On 2012/3/20 3:02 , Harri Jäälinoja wrote:
> Hi Chris,
>
>> How did you start nginx?  As the omero user or as root?
>> If you are going to run nginx on port 80 it will need to be started
>> as root in order to bind to lower port numbers.
>>
> I started it as root, via "service nginx start".
>
>
>>> OMERO.web status... [NOT STARTED]
>>>
>>>
>>> So OMERO.web is not starting, even though there is no error:
>>>
>>> [omero at lmu-omero2 ~]$ omero web start
>>> Starting OMERO.web... Removed stale
>>> /opt/OMERO/OMERO.server-Beta-4.3.3/var/django.pid
>>> [OK]
>>
>> is anything listening to port 4080?
>>
>> # netstat -ntlp |grep 4080
>>
>
> Yes:
> [omero at lmu-omero2 ~]$ netstat -ntlp |grep 4080
> (Not all processes could be identified, non-owned process info
>  will not be shown, you would have to be root to see it all.)
> tcp        0      0 0.0.0.0:4080                0.0.0.0:*    
> LISTEN      31592/python
>
>
>
>>
>> I'm assuming nothing of interest in $OMERO_HOME/var/log/OMEROweb*?
>>
>
> No, just "Application Starting...".
>
>> Are you running under selinux by chance?
>>
>> # sestatus
>>
>
> No.
> [root at lmu-omero2 nginx]# sestatus
> SELinux status:                 disabled
>
>
>>>>
>>>> [omero at lmu-omero2 ~]$ omero web config nginx
>>
>> This generated config is more designed around running a separate
>> nginx instance as a non-priviledged user on a different port.
>>
>> That config would need to be tweaked a little to run as a root instance.
>>
>
> Ok. I noticed now also the example in "omero web -h", that looks like
> a separate instance.
>
>> As far as avoiding compiling fastcgi, if you add the rpmforge
>> repositories
>> (http://wiki.centos.org/AdditionalResources/Repositories/RPMForge
>> those are centos instructions but are true for RHEL as well) it has
>> fastcgi packages.
>>
>
> Ok, I can try this as well, see which one the other admins like better.
>
>
>> But nginx's configuration is secondary to why omero web doesn't seem
>> to be starting correctly.
>>
>
> But the process that is listening at port 4080 should be omero web,
> right? What does "omero web status" check, maybe it's just the check
> that is going wrong?
>
> Thanks,
> Harri
>




More information about the ome-users mailing list