Nginx fails to start: Difference between revisions

(Created page with "===<h1>Nginx fails to start</h1>=== <hr> <br> <h2>Problem:</h2> Nginx fails to start. Running zmproxyctl start giving the following error : "Starting nginx...failed. /...")
 
mNo edit summary
 
(5 intermediate revisions by 4 users not shown)
Line 1: Line 1:
===<h1>Nginx fails to start</h1>===
{{BC|Certified}}
__FORCETOC__
<div class="col-md-12 ibox-content">
==Nginx fails to start due to 'nginx.conf is missing' error==
<hr>
<hr>
<br>
{{WIP}} 


<h2>Problem:</h2>
====Problem====


Nginx fails to start.
Running 'zmproxyctl start' gives the following error:
 
Starting nginx...failed.  /opt/zimbra/conf/nginx.conf is missing.
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)


Configuring proxy by command -
====Solution====
 
The error comes up when the proxy configuration has non-existing servers or non-mailbox servers listed in the 'ReverseProxy' configuration.
/opt/zimbra/libexec/zmproxyconfgen
Check the value of the attributes in the server configuration as well as global configuration:
prompting the following error :
<pre>
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)
</pre>
 
<h2>Solution:</h2>
 
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
  su - zimbra
  zmprov -l gs `zmhostname` zimbraReverseProxyAvailableLookupTargets
  zmprov -l gs `zmhostname` zimbraReverseProxyAvailableLookupTargets
  zmprov -l gcf zimbraReverseProxyAvailableLookupTargets
  zmprov -l gcf zimbraReverseProxyAvailableLookupTargets
Also below attributes -
  zmprov -l gs `zmhostname` zimbraReverseProxyAvailableLookupTargets
  zmprov -l gs `zmhostname` zimbraReverseProxyAvailableLookupTargets
  zmprov -l gs `zmhostname` zimbraReverseProxyUpstreamEwsServers
  zmprov -l gs `zmhostname` zimbraReverseProxyUpstreamEwsServers
  zmprov -l gs `zmhostname` zimbraReverseProxyUpstreamLoginServers
  zmprov -l gs `zmhostname` zimbraReverseProxyUpstreamLoginServers
 
  zmprov -l gcf zimbraReverseProxyAvailableLookupTargets
  zmprov -l gcf zimbraReverseProxyAvailableLookupTargets
  zmprov -l gcf zimbraReverseProxyUpstreamEwsServers
  zmprov -l gcf zimbraReverseProxyUpstreamEwsServers
  zmprov -l gcf zimbraReverseProxyUpstreamLoginServers
  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 -
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 ms server_name zimbraReverseProxyUpstreamEwsServers <mailbox_server_name>
  zmprov mcf zimbraReverseProxyUpstreamEwsServers <mailbox_server_name>
  zmprov mcf zimbraReverseProxyUpstreamEwsServers <mailbox_server_name>


Then try again to configure zimbra-proxy
Then run zmproxyconfgen again:
 
zmproxyconfgen -s `zmhostname` -w /tmp/
/opt/zimbra/libexec/zmproxyconfig -m -w -e -x redirect -H `zmhostname`
 
 
 
"Sourabh Bhushan"


<sbhushan@zimbra.com>
/opt/zimbra/libexec/zmproxyconfgen -s `zmhostname`


ZCS Version - Collaboration 8.6.0_GA_1194 Patch 6
Submitted by:  Sourabh Bhushan
{{Article Footer|ZCS 8.8, 8.7, 8.6|2017-08-23}}

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

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