Link to home
Start Free TrialLog in
Avatar of coder
coderFlag for Australia

asked on

regarding issue with Nginx exited with code 0

Hi experts,

when I run nginx, I get error,
nginx exited with code 0

nginx is started from npm run scripts

I had run $sudo npm run start-prod
scripts:
start-prod: has the following command

concurrently --no-color "uwsgi --emperor code/uwsgi.ini --uid www-data gid www-data" "nginx"  "npm run render-prod"

npm run render-prod value of script is
 "render-prod": "babel-node node/react-render.jsx"

[0] *** Starting uWSGI 2.0.15 (64bit) on [Thu Feb 15 06:06:34 2018] ***
[0] compiled with version: 5.4.0 20160609 on 09 February 2018 02:01:25
[0] os: Linux-4.4.0-1049-aws #58-Ubuntu SMP Fri Jan 12 23:17:09 UTC 2018
[0] nodename: ip-10-244-152-179
[0] machine: x86_64
[0] clock source: unix
[0] pcre jit disabled
[0] detected number of CPU cores: 8
[0] current working directory: /home/ubuntu/bharath/sourcecode/projects/NTDL/ntdl
[0] detected binary path: /usr/local/bin/uwsgi
[0] setgid() to 33
[0] setuid() to 33
[0] *** WARNING: you are running uWSGI without its master process manager ***
[0] your processes number limit is 60090
[0] your memory page size is 4096 bytes
[0] detected max file descriptor number: 1048576
[0] *** starting uWSGI Emperor ***
[1] nginx exited with code 0
[2]
[2] > ntdl@1.0.2 render-prod /home/ubuntu/bharath/sourcecode/projects/NTDL/ntdl
[2] > babel-node node/react-render.jsx
[2]
[0] *** has_emperor mode detected (fd: 5) ***
[0] [uWSGI] getting INI configuration from code/uwsgi.ini
[0] *** Starting uWSGI 2.0.15 (64bit) on [Thu Feb 15 06:06:34 2018] ***
[0] compiled with version: 5.4.0 20160609 on 09 February 2018 02:01:25
[0] os: Linux-4.4.0-1049-aws #58-Ubuntu SMP Fri Jan 12 23:17:09 UTC 2018
[0] nodename: ip-10-244-152-179
[0] machine: x86_64
[0] clock source: unix
[0] pcre jit disabled
[0] detected number of CPU cores: 8
[0] current working directory: /home/ubuntu/bharath/sourcecode/projects/NTDL/ntdl
[0] detected binary path: /usr/local/bin/uwsgi
[0] chdir() to /home/ubuntu/bharath/sourcecode/projects/NTDL/ntdl/
[0] your processes number limit is 60090
[0] your memory page size is 4096 bytes
[0] detected max file descriptor number: 1048576
[0] lock engine: pthread robust mutexes
[0] thunder lock: disabled (you can enable it with --thunder-lock)
[0] uwsgi socket 0 bound to UNIX address /tmp/ntdl.sock fd 3
[0] Python version: 3.5.2 (default, Nov 23 2017, 16:37:01)  [GCC 5.4.0 20160609]
[0] Python main interpreter initialized at 0x1147f80
[0] python threads support enabled
[0] your server socket listen backlog is limited to 100 connections
[0] your mercy for graceful operations on workers is 60 seconds
[0] mapped 537088 bytes (524 KB) for 20 cores
[0] *** Operational MODE: threaded ***
[0] WSGI app 0 (mountpoint='') ready in 1 seconds on interpreter 0x1147f80 pid: 14263 (default app)
[0] *** uWSGI is running in multiple interpreter mode ***
[0] spawned uWSGI master process (pid: 14263)
[0] Thu Feb 15 06:06:35 2018 - [emperor] vassal code/uwsgi.ini has been spawned
[0] spawned uWSGI worker 1 (pid: 14296, cores: 20)
[0] Thu Feb 15 06:06:35 2018 - [emperor] vassal code/uwsgi.ini is ready to accept requests
[2] React render server listening at http://0.0.0.0:9009

nginx exited with code 0

now it has created the sock for uwsgi server. and uwsgi server is running now.  my doubt is whether nginx is running or not?

secondly, I am running this under aws ubuntu.  

How will I  see it in the browser.  Do I had to provide proxy_set_header set to X-Forwarded-Host "54.206.154.95" something like this to see in browser and it value to an ip address in the nginx.conf file

 
Please help in fixing this error.

TIA.

With regards.

Bharath AK
ASKER CERTIFIED SOLUTION
Avatar of noci
noci

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of coder

ASKER

Hi Noci,

       Thanks for your reply.  I happy that nginx is running.    I stopped by ctrl-c to go command prompt and checked ps-as |grep nginx | grep -v grep.  I had seen two process master and worker process running.  my next step is to see it in browser.  I am running in ubuntu aws.  I am accessing this ubuntu from windows laptop machine through ssh using putty, by providing an Ip address.

How will i see this in browser?  Do I had to provide proxy_set_header set to X-Forwarded-Host "123.123.123.123" in nginx.conf something like this to see it in browser.  Please suggest me how can see it in browser.

With Many thanks,
Bharath AK