Nginx fails to start: Difference between revisions
No edit summary |
mNo edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 8: | Line 8: | ||
====Problem==== | ====Problem==== | ||
Running zmproxyctl start | Running 'zmproxyctl start' gives the following error: | ||
Starting nginx...failed. /opt/zimbra/conf/nginx.conf is missing. | Starting nginx...failed. /opt/zimbra/conf/nginx.conf is missing. | ||
Line 23: | Line 23: | ||
====Solution==== | ====Solution==== | ||
The error comes up when the proxy configuration has non-existing servers or non-mailbox servers listed in the 'ReverseProxy' configuration. | 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 | Check the value of the attributes in the server configuration as well as global configuration: | ||
su - zimbra | su - zimbra |
Latest revision as of 08:55, 31 May 2018
Nginx fails to start due to 'nginx.conf is missing' error
Problem
Running 'zmproxyctl start' gives 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