nginx bind failed

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
0
down vote

favorite












when I run nginx, I get error,



nginx is started from npm run scripts



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



 concurrently --no-color "uwsgi --ini build/docker/uwsgi.ini" "nginx" "npm run render-prod"


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



ntdl@1.0.2 start-prod /home/ubuntu/bharath/sourcecode/projects/NTDL/ntdl
> concurrently --no-color "uwsgi --ini build/docker/uwsgi.ini" "nginx" "npm run render-prod"
[0] [uWSGI] getting INI configuration from build/docker/uwsgi.ini
[0] *** Starting uWSGI 2.0.15 (64bit) on [Wed Feb 14 01:10:08 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-254-3-58
[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] writing pidfile to
/home/ubuntu/bharath/sourcecode/projects/NTDL/ntdl/build/docker/ntdl.pid
[0] detected binary path: /usr/local/bin/uwsgi
[0] setgid() to 33
[0] setuid() to 33
[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] bind(): Permission denied [core/socket.c line 230]
[1] nginx: [warn] conflicting server name "" on 0.0.0.0:80, ignored
[1] nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
[0] uwsgi --ini build/docker/uwsgi.ini exited with code 1
[2]
[2] > ntdl@1.0.2 render-prod /home/ubuntu/bharath/sourcecode/projects/NTDL/ntdl
[2] > babel-node node/react-render.jsx
[2]
[1] nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
[1] nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
[1] nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
[2] React render server listening at http://0.0.0.0:9009
[1] nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
[1] nginx: [emerg] still could not bind()
[1] nginx exited with code 1


Please help me in fixing this nginx bind error.



TIA,



Kind Regards,
Bharath AK










share|improve this question



























    up vote
    0
    down vote

    favorite












    when I run nginx, I get error,



    nginx is started from npm run scripts



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



     concurrently --no-color "uwsgi --ini build/docker/uwsgi.ini" "nginx" "npm run render-prod"


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



    ntdl@1.0.2 start-prod /home/ubuntu/bharath/sourcecode/projects/NTDL/ntdl
    > concurrently --no-color "uwsgi --ini build/docker/uwsgi.ini" "nginx" "npm run render-prod"
    [0] [uWSGI] getting INI configuration from build/docker/uwsgi.ini
    [0] *** Starting uWSGI 2.0.15 (64bit) on [Wed Feb 14 01:10:08 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-254-3-58
    [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] writing pidfile to
    /home/ubuntu/bharath/sourcecode/projects/NTDL/ntdl/build/docker/ntdl.pid
    [0] detected binary path: /usr/local/bin/uwsgi
    [0] setgid() to 33
    [0] setuid() to 33
    [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] bind(): Permission denied [core/socket.c line 230]
    [1] nginx: [warn] conflicting server name "" on 0.0.0.0:80, ignored
    [1] nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
    [0] uwsgi --ini build/docker/uwsgi.ini exited with code 1
    [2]
    [2] > ntdl@1.0.2 render-prod /home/ubuntu/bharath/sourcecode/projects/NTDL/ntdl
    [2] > babel-node node/react-render.jsx
    [2]
    [1] nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
    [1] nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
    [1] nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
    [2] React render server listening at http://0.0.0.0:9009
    [1] nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
    [1] nginx: [emerg] still could not bind()
    [1] nginx exited with code 1


    Please help me in fixing this nginx bind error.



    TIA,



    Kind Regards,
    Bharath AK










    share|improve this question

























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      when I run nginx, I get error,



      nginx is started from npm run scripts



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



       concurrently --no-color "uwsgi --ini build/docker/uwsgi.ini" "nginx" "npm run render-prod"


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



      ntdl@1.0.2 start-prod /home/ubuntu/bharath/sourcecode/projects/NTDL/ntdl
      > concurrently --no-color "uwsgi --ini build/docker/uwsgi.ini" "nginx" "npm run render-prod"
      [0] [uWSGI] getting INI configuration from build/docker/uwsgi.ini
      [0] *** Starting uWSGI 2.0.15 (64bit) on [Wed Feb 14 01:10:08 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-254-3-58
      [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] writing pidfile to
      /home/ubuntu/bharath/sourcecode/projects/NTDL/ntdl/build/docker/ntdl.pid
      [0] detected binary path: /usr/local/bin/uwsgi
      [0] setgid() to 33
      [0] setuid() to 33
      [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] bind(): Permission denied [core/socket.c line 230]
      [1] nginx: [warn] conflicting server name "" on 0.0.0.0:80, ignored
      [1] nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
      [0] uwsgi --ini build/docker/uwsgi.ini exited with code 1
      [2]
      [2] > ntdl@1.0.2 render-prod /home/ubuntu/bharath/sourcecode/projects/NTDL/ntdl
      [2] > babel-node node/react-render.jsx
      [2]
      [1] nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
      [1] nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
      [1] nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
      [2] React render server listening at http://0.0.0.0:9009
      [1] nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
      [1] nginx: [emerg] still could not bind()
      [1] nginx exited with code 1


      Please help me in fixing this nginx bind error.



      TIA,



      Kind Regards,
      Bharath AK










      share|improve this question















      when I run nginx, I get error,



      nginx is started from npm run scripts



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



       concurrently --no-color "uwsgi --ini build/docker/uwsgi.ini" "nginx" "npm run render-prod"


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



      ntdl@1.0.2 start-prod /home/ubuntu/bharath/sourcecode/projects/NTDL/ntdl
      > concurrently --no-color "uwsgi --ini build/docker/uwsgi.ini" "nginx" "npm run render-prod"
      [0] [uWSGI] getting INI configuration from build/docker/uwsgi.ini
      [0] *** Starting uWSGI 2.0.15 (64bit) on [Wed Feb 14 01:10:08 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-254-3-58
      [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] writing pidfile to
      /home/ubuntu/bharath/sourcecode/projects/NTDL/ntdl/build/docker/ntdl.pid
      [0] detected binary path: /usr/local/bin/uwsgi
      [0] setgid() to 33
      [0] setuid() to 33
      [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] bind(): Permission denied [core/socket.c line 230]
      [1] nginx: [warn] conflicting server name "" on 0.0.0.0:80, ignored
      [1] nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
      [0] uwsgi --ini build/docker/uwsgi.ini exited with code 1
      [2]
      [2] > ntdl@1.0.2 render-prod /home/ubuntu/bharath/sourcecode/projects/NTDL/ntdl
      [2] > babel-node node/react-render.jsx
      [2]
      [1] nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
      [1] nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
      [1] nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
      [2] React render server listening at http://0.0.0.0:9009
      [1] nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
      [1] nginx: [emerg] still could not bind()
      [1] nginx exited with code 1


      Please help me in fixing this nginx bind error.



      TIA,



      Kind Regards,
      Bharath AK







      13.04 nginx aws






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Feb 14 at 2:01

























      asked Feb 14 at 1:27









      A K Bharath

      53




      53




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote



          accepted










          Some other process is already listening on port 80. This may mean, for example, that you have an Apache process running already.



          You can use this suggested command to find out what may be listening on that port:



          sudo lsof -i :80 | grep LISTEN


          Note: In rare cases it could be that a separate nginx is already listening on the port, for example if you manually started an nginx daemon (not recommended) or if you've modified which user nginx runs under (not recommended). More than likely, however, it'll be some other application listening on that port.



          Ubuntu lets you install two web servers at once, since it's possible to configure them to listen on different ports. If you don't do this, you'll have problems with one or the other starting.






          share|improve this answer




















          • Hi thomasrutter, thanks for your reply. I am able to progress with your idea. now I am able to run the npm and sock file is created by uwsgi for nginx to intereact with it. But still I get nginx exited with code 0, I am not able to find why. secondly I am using aws ubuntu, how will i see it in the browser, do I have to any settings in nginx.conf. Do I have provide proxy_set_header X-Forwarded-Host "54.206.154.95" like this to see in browser. I am not able to see in browser i dont know what is blocking please help me with many thanks Bharath AK
            – A K Bharath
            Feb 15 at 6:29











          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "89"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1005974%2fnginx-bind-failed%23new-answer', 'question_page');

          );

          Post as a guest






























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          0
          down vote



          accepted










          Some other process is already listening on port 80. This may mean, for example, that you have an Apache process running already.



          You can use this suggested command to find out what may be listening on that port:



          sudo lsof -i :80 | grep LISTEN


          Note: In rare cases it could be that a separate nginx is already listening on the port, for example if you manually started an nginx daemon (not recommended) or if you've modified which user nginx runs under (not recommended). More than likely, however, it'll be some other application listening on that port.



          Ubuntu lets you install two web servers at once, since it's possible to configure them to listen on different ports. If you don't do this, you'll have problems with one or the other starting.






          share|improve this answer




















          • Hi thomasrutter, thanks for your reply. I am able to progress with your idea. now I am able to run the npm and sock file is created by uwsgi for nginx to intereact with it. But still I get nginx exited with code 0, I am not able to find why. secondly I am using aws ubuntu, how will i see it in the browser, do I have to any settings in nginx.conf. Do I have provide proxy_set_header X-Forwarded-Host "54.206.154.95" like this to see in browser. I am not able to see in browser i dont know what is blocking please help me with many thanks Bharath AK
            – A K Bharath
            Feb 15 at 6:29















          up vote
          0
          down vote



          accepted










          Some other process is already listening on port 80. This may mean, for example, that you have an Apache process running already.



          You can use this suggested command to find out what may be listening on that port:



          sudo lsof -i :80 | grep LISTEN


          Note: In rare cases it could be that a separate nginx is already listening on the port, for example if you manually started an nginx daemon (not recommended) or if you've modified which user nginx runs under (not recommended). More than likely, however, it'll be some other application listening on that port.



          Ubuntu lets you install two web servers at once, since it's possible to configure them to listen on different ports. If you don't do this, you'll have problems with one or the other starting.






          share|improve this answer




















          • Hi thomasrutter, thanks for your reply. I am able to progress with your idea. now I am able to run the npm and sock file is created by uwsgi for nginx to intereact with it. But still I get nginx exited with code 0, I am not able to find why. secondly I am using aws ubuntu, how will i see it in the browser, do I have to any settings in nginx.conf. Do I have provide proxy_set_header X-Forwarded-Host "54.206.154.95" like this to see in browser. I am not able to see in browser i dont know what is blocking please help me with many thanks Bharath AK
            – A K Bharath
            Feb 15 at 6:29













          up vote
          0
          down vote



          accepted







          up vote
          0
          down vote



          accepted






          Some other process is already listening on port 80. This may mean, for example, that you have an Apache process running already.



          You can use this suggested command to find out what may be listening on that port:



          sudo lsof -i :80 | grep LISTEN


          Note: In rare cases it could be that a separate nginx is already listening on the port, for example if you manually started an nginx daemon (not recommended) or if you've modified which user nginx runs under (not recommended). More than likely, however, it'll be some other application listening on that port.



          Ubuntu lets you install two web servers at once, since it's possible to configure them to listen on different ports. If you don't do this, you'll have problems with one or the other starting.






          share|improve this answer












          Some other process is already listening on port 80. This may mean, for example, that you have an Apache process running already.



          You can use this suggested command to find out what may be listening on that port:



          sudo lsof -i :80 | grep LISTEN


          Note: In rare cases it could be that a separate nginx is already listening on the port, for example if you manually started an nginx daemon (not recommended) or if you've modified which user nginx runs under (not recommended). More than likely, however, it'll be some other application listening on that port.



          Ubuntu lets you install two web servers at once, since it's possible to configure them to listen on different ports. If you don't do this, you'll have problems with one or the other starting.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Feb 14 at 2:24









          thomasrutter

          25.4k46086




          25.4k46086











          • Hi thomasrutter, thanks for your reply. I am able to progress with your idea. now I am able to run the npm and sock file is created by uwsgi for nginx to intereact with it. But still I get nginx exited with code 0, I am not able to find why. secondly I am using aws ubuntu, how will i see it in the browser, do I have to any settings in nginx.conf. Do I have provide proxy_set_header X-Forwarded-Host "54.206.154.95" like this to see in browser. I am not able to see in browser i dont know what is blocking please help me with many thanks Bharath AK
            – A K Bharath
            Feb 15 at 6:29

















          • Hi thomasrutter, thanks for your reply. I am able to progress with your idea. now I am able to run the npm and sock file is created by uwsgi for nginx to intereact with it. But still I get nginx exited with code 0, I am not able to find why. secondly I am using aws ubuntu, how will i see it in the browser, do I have to any settings in nginx.conf. Do I have provide proxy_set_header X-Forwarded-Host "54.206.154.95" like this to see in browser. I am not able to see in browser i dont know what is blocking please help me with many thanks Bharath AK
            – A K Bharath
            Feb 15 at 6:29
















          Hi thomasrutter, thanks for your reply. I am able to progress with your idea. now I am able to run the npm and sock file is created by uwsgi for nginx to intereact with it. But still I get nginx exited with code 0, I am not able to find why. secondly I am using aws ubuntu, how will i see it in the browser, do I have to any settings in nginx.conf. Do I have provide proxy_set_header X-Forwarded-Host "54.206.154.95" like this to see in browser. I am not able to see in browser i dont know what is blocking please help me with many thanks Bharath AK
          – A K Bharath
          Feb 15 at 6:29





          Hi thomasrutter, thanks for your reply. I am able to progress with your idea. now I am able to run the npm and sock file is created by uwsgi for nginx to intereact with it. But still I get nginx exited with code 0, I am not able to find why. secondly I am using aws ubuntu, how will i see it in the browser, do I have to any settings in nginx.conf. Do I have provide proxy_set_header X-Forwarded-Host "54.206.154.95" like this to see in browser. I am not able to see in browser i dont know what is blocking please help me with many thanks Bharath AK
          – A K Bharath
          Feb 15 at 6:29


















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1005974%2fnginx-bind-failed%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          pylint3 and pip3 broken

          Missing snmpget and snmpwalk

          How to enroll fingerprints to Ubuntu 17.10 with VFS491