Join the community today
Become a Member

hostname doesn't bind

Discussion in 'System Administration' started by Sos, Nov 23, 2019.

  1. Sos

    Sos New Member

    15
    2
    3
    Dec 4, 2018
    Ratings:
    +3
    Local Time:
    12:50 AM
    1.15.7
    So I went through and followed examples from the site and the issue I am getting is the hostname I have is minecraft.printsos.com and its not binding to my ip addresses. Below is what I am getting from a nprestart. Not sure what files I need to change in order for this to be resolved.

    Code:
    Nov 22 20:20:09 minecraft.printsos.com systemd[1]: Starting SYSV: Nginx is an HTTP(S) server, HTTP(S) reverse proxy and IMAP/POP3 proxy server...
    Nov 22 20:20:09 minecraft.printsos.com nginx[21350]: Starting nginx: nginx: [emerg] listen() to 0.0.0.0:80, backlog 511 failed (98: Address already in use)
    Nov 22 20:20:09 minecraft.printsos.com nginx[21350]: nginx: [emerg] bind() to xxx.xxx.248.235:443 failed (99: Cannot assign requested address)
    Nov 22 20:20:09 minecraft.printsos.com nginx[21350]: [FAILED]
    Nov 22 20:20:09 minecraft.printsos.com systemd[1]: nginx.service: control process exited, code=exited status=1
    Nov 22 20:20:09 minecraft.printsos.com systemd[1]: Failed to start SYSV: Nginx is an HTTP(S) server, HTTP(S) reverse proxy and IMAP/POP3 proxy server.
    Nov 22 20:20:09 minecraft.printsos.com systemd[1]: Unit nginx.service entered failed state.
    Nov 22 20:20:09 minecraft.printsos.com systemd[1]: nginx.service failed.

     
  2. eva2000

    eva2000 Administrator Staff Member

    42,357
    9,562
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,736
    Local Time:
    5:50 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    you already have a service whether it's nginx or another server running on port 80 so nginx is complaining when it starts nginx server as it can't bind to port 80 as the other service/server is running on port 80

    what's running on port 80 right now, you can find out using command below
    Code (Text):
    netstat -plunt | grep ':80'

    example nginx running on port 80
    Code (Text):
    netstat -plunt | grep ':80'
    tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      25446/nginx: master
    

    and check nginx running processes
    Code (Text):
    ps aufxw | grep nginx | grep -v grep

    example
    Code (Text):
    ps aufxw | grep nginx | grep -v grep
    root     25446  0.0  0.0 196340 25644 ?        Ss   Nov19   0:00 nginx: master process /usr/local/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
    nginx    25447  0.0  0.2 245492 69440 ?        S<   Nov19   0:27  \_ nginx: worker process
    nginx    25448  0.0  0.2 245492 69428 ?        S<   Nov19   0:22  \_ nginx: worker process
    nginx    25449  0.0  0.2 245492 69604 ?        S<   Nov19   0:22  \_ nginx: worker process
    nginx    25451  0.0  0.2 245492 69444 ?        S<   Nov19   0:21  \_ nginx: worker process