Nginx fails to start

Revision as of 08:45, 31 May 2018 by Shanxt (talk | contribs)

Nginx fails to start due to 'nginx.conf is missing' error



Problem

Running zmproxyctl start giving the following error:

Starting nginx...failed.  /opt/zimbra/conf/nginx.conf is missing.

Running zmproxyconfgen gives a NullPointerException:

/opt/zimbra/libexec/zmproxyconfgen -s `zmhostname`

Exception in thread "main" java.lang.NullPointerException
        at com.zimbra.cs.util.ProxyConfVar.isValidUpstream(ProxyConfGen.java:308)
        at com.zimbra.cs.util.WebEwsSSLUpstreamServersVar.update(ProxyConfGen.java:989)
        at com.zimbra.cs.util.ProxyConfGen.updateDefaultVars(ProxyConfGen.java:2471)
        at com.zimbra.cs.util.ProxyConfGen.createConf(ProxyConfGen.java:2630)
        at com.zimbra.cs.util.ProxyConfGen.main(ProxyConfGen.java:2827)

Solution

The error comes up when the proxy configuration has non-existing servers or non-mailbox servers listed in the 'ReverseProxy' configuration. Check the value of the attributes in the server configuration as well as global configuration:

su - zimbra
zmprov -l gs `zmhostname` zimbraReverseProxyAvailableLookupTargets
zmprov -l gcf zimbraReverseProxyAvailableLookupTargets
zmprov -l gs `zmhostname` zimbraReverseProxyAvailableLookupTargets
zmprov -l gs `zmhostname` zimbraReverseProxyUpstreamEwsServers
zmprov -l gs `zmhostname` zimbraReverseProxyUpstreamLoginServers

zmprov -l gcf zimbraReverseProxyAvailableLookupTargets
zmprov -l gcf zimbraReverseProxyUpstreamEwsServers
zmprov -l gcf zimbraReverseProxyUpstreamLoginServers

Only place valid mailbox server names in these attributes. If there are non-existing mailbox servers (like an MTA, or a decommissioned server) change the value:

zmprov ms server_name zimbraReverseProxyUpstreamEwsServers <mailbox_server_name>
zmprov mcf zimbraReverseProxyUpstreamEwsServers <mailbox_server_name>

Then run zmproxyconfgen again:

/opt/zimbra/libexec/zmproxyconfgen -s `zmhostname`

Submitted by: Sourabh Bhushan

Verified Against: ZCS 8.8, 8.7, 8.6 Date Created: 2017-08-23
Article ID: https://wiki.zimbra.com/index.php?title=Nginx_fails_to_start Date Modified: 2018-05-31



Try Zimbra

Try Zimbra Collaboration with a 60-day free trial.
Get it now »

Want to get involved?

You can contribute in the Community, Wiki, Code, or development of Zimlets.
Find out more. »

Looking for a Video?

Visit our YouTube channel to get the latest webinars, technology news, product overviews, and so much more.
Go to the YouTube channel »


Jump to: navigation, search