hello i have some problem with Job for nginx.service failed. See 'systemctl status nginx.service' and 'journalc tl -xn' for details.

October 30, 2016 2.3k views
Nginx Debian
udikmamat
By:
udikmamat

nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled)
Active: failed (Result: exit-code) since Sun 2016-10-30 04:28:58 EDT; 13min a go
Process: 26460 ExecStop=/sbin/start-stop-daemon --quiet --stop --retry QUIT/5 --pidfile /run/nginx.pid (code=exited, status=1/FAILURE)
Process: 26395 ExecReload=/usr/sbin/nginx -g daemon on; masterprocess on; -s reload (code=exited, status=1/FAILURE)
Process: 26092 ExecStart=/usr/sbin/nginx -g daemon on; master
process on; (cod e=exited, status=0/SUCCESS)
Process: 26486 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)
Main PID: 26095 (code=killed, signal=KILL)

Oct 30 04:28:58 bestdealstodays nginx[26486]: nginx: [emerg] could not build...4
Oct 30 04:28:58 bestdealstodays nginx[26486]: nginx: configuration file /etc...d
Oct 30 04:28:58 bestdealstodays systemd[1]: nginx.service: control process e...1
Oct 30 04:28:58 bestdealstodays systemd[1]: Failed to start A high performan....
Oct 30 04:28:58 bestdealstodays systemd[1]: Unit nginx.service entered faile....
Oct 30 04:42:05 bestdealstodays systemd[1]: Unit nginx.service cannot be rel....
Oct 30 04:42:31 bestdealstodays systemd[1]: Unit nginx.service cannot be rel....
Hint: Some lines were ellipsized, use -l to show in full.

-- Logs begin at Mon 2016-10-03 17:54:02 EDT, end at Sun 2016-10-30 04:42:31 EDT. --
Oct 30 04:42:31 bestdealstodays php5-fpm[26603]: Cannot adopt OID in NET-SNMP-AGENT-MIB: nsNotifyShutdown ::= { netSnmpNotifi
Oct 30 04:42:31 bestdealstodays php5-fpm[26603]: Cannot adopt OID in NET-SNMP-AGENT-MIB: nsNotifyRestart ::= { netSnmpNotific
Oct 30 04:42:31 bestdealstodays php5-fpm[26603]: Cannot adopt OID in UCD-SNMP-MIB: laErrMessage ::= { laEntry 101 }
Oct 30 04:42:31 bestdealstodays php5-fpm[26603]: Cannot adopt OID in UCD-SNMP-MIB: laErrorFlag ::= { laEntry 100 }
Oct 30 04:42:31 bestdealstodays php5-fpm[26603]: Cannot adopt OID in UCD-SNMP-MIB: laLoadFloat ::= { laEntry 6 }
Oct 30 04:42:31 bestdealstodays php5-fpm[26603]: Cannot adopt OID in UCD-SNMP-MIB: laLoadInt ::= { laEntry 5 }
Oct 30 04:42:31 bestdealstodays php5-fpm[26603]: Cannot adopt OID in UCD-SNMP-MIB: laConfig ::= { laEntry 4 }
Oct 30 04:42:31 bestdealstodays php5-fpm[26603]: Cannot adopt OID in UCD-SNMP-MIB: laLoad ::= { laEntry 3 }
Oct 30 04:42:31 bestdealstodays php5-fpm[26603]: Cannot adopt OID in UCD-SNMP-MIB: laNames ::= { laEntry 2 }
Oct 30 04:42:31 bestdealstodays php5-fpm[26603]: Cannot adopt OID in UCD-SNMP-MIB: laIndex ::= { laEntry 1 }

what should i do? thx for your help

3 Answers

There are probably configuration errors somewhere.
With nginx, finding these errors are easy, because it has utility that will test every configuration file.

Execute

  • sudo nginx -t

It will test nginx config and return is there error anywhere. Fix errors, test it again and try to start it:

  • sudo nginx -t
  • sudo systemctl start nginx
  • sudo systemctl status nginx # to verify is it started

If you need help fixing errors, post part of configuration with it and we will try to help you. :)

  • Hello. I have the same problem:

    Setting up nginx-core (1.10.3-0ubuntu0.16.04.2) ...
    Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details.
    invoke-rc.d: initscript nginx, action "start" failed.
    ● nginx.service - A high performance web server and a reverse proxy server
       Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
       Active: failed (Result: exit-code) since Thu 2018-05-03 18:32:27 UTC; 21ms ago
      Process: 19969 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)
    
    May 03 18:32:27 sajtovi systemd[1]: Starting A high performance web server and a reverse proxy server...
    May 03 18:32:27 sajtovi nginx[19969]: [107B blob data]
    May 03 18:32:27 sajtovi nginx[19969]: nginx: configuration file /etc/nginx/nginx.conf test failed
    May 03 18:32:27 sajtovi systemd[1]: nginx.service: Control process exited, code=exited status=1
    May 03 18:32:27 sajtovi systemd[1]: Failed to start A high performance web server and a reverse proxy server.
    May 03 18:32:27 sajtovi systemd[1]: nginx.service: Unit entered failed state.
    May 03 18:32:27 sajtovi systemd[1]: nginx.service: Failed with result 'exit-code'.
    dpkg: error processing package nginx-core (--configure):
     subprocess installed post-installation script returned error exit status 1
    

i was destroy my droplet, btw thx for your answer dude.. :)

[emerg] getpwnam("ckserver") failed in /etc/nginx/nginx.conf:1 #i am getting this error can some help me

Have another answer? Share your knowledge.