Difference between revisions of "Nginx fails to start"

(Nginx fails to start)
Line 15: Line 15:
 
  /opt/zimbra/libexec/zmproxyconfgen
 
  /opt/zimbra/libexec/zmproxyconfgen
 
prompting the following error :
 
prompting the following error :
<pre>
+
 
Exception in thread "main" java.lang.NullPointerException
+
Exception in thread "main" java.lang.NullPointerException
        at com.zimbra.cs.util.ProxyConfVar.isValidUpstream(ProxyConfGen.java:308)
+
        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.WebEwsSSLUpstreamServersVar.update(ProxyConfGen.java:989)
        at com.zimbra.cs.util.ProxyConfGen.updateDefaultVars(ProxyConfGen.java:2471)
+
        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.createConf(ProxyConfGen.java:2630)
        at com.zimbra.cs.util.ProxyConfGen.main(ProxyConfGen.java:2827)
+
        at com.zimbra.cs.util.ProxyConfGen.main(ProxyConfGen.java:2827)
</pre>
 
  
 
<h2>Solution:</h2>
 
<h2>Solution:</h2>
Line 56: Line 55:
  
  
"Sourabh Bhushan"
 
  
<sbhushan@zimbra.com>
+
Submitted by:  Sourabh Bhushan

Revision as of 19:07, 27 September 2017

Nginx fails to start



Problem:

Nginx fails to start.

Running zmproxyctl start giving the following error :

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

Configuring proxy by command -

/opt/zimbra/libexec/zmproxyconfgen

prompting the following error :

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 prompt when the proxy configuration having non-existing server's or non-mailbox servers listed with the following attributes -

Please check the value of zimbraReverseProxyAvailableLookupTargets at the server level as well as global level configuration :

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

Also below attributes -

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

Check the above attributes and put only valid server name with these attributes. If there are non-existing mailbox server then we can change the attribute value by using below commands -

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

Then try again to configure zimbra-proxy

zmproxyconfgen -s `zmhostname` -w /tmp/
/opt/zimbra/libexec/zmproxyconfig -m -w -e -x redirect -H `zmhostname`



Submitted by: Sourabh Bhushan

Jump to: navigation, search