Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

Port Conflicting Issues

$
0
0
I have been using nginx on Linux ubuntu and everything seems to work fine, I have recently migrated to Mac OSX Yosemite 10.10 and I followed this tutorial

http://blog.frd.mn/install-nginx-php-fpm-mysql-and-phpmyadmin-on-os-x-mavericks-using-homebrew/

to set up my machine, After a lots of hiccups I finally managed to reach a point where I find just a single issue happening due to nginx port issues.

If I do

sudo nginx

I get this


nginx: [emerg] bind() to 0.0.0.0:443 failed (48: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:306 failed (48: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:443 failed (48: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:306 failed (48: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:443 failed (48: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:306 failed (48: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:443 failed (48: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:306 failed (48: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:443 failed (48: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:306 failed (48: Address already in use)
nginx: [emerg] still could not bind()

which means 443 and 306 ports are being used somewhere else

and when I do

sudo lsof -i:443

I get this

COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
nginx 548 root 13u IPv4 0xce9cf564560ec22b 0t0 TCP *:https (LISTEN)
nginx 549 nobody 13u IPv4 0xce9cf564560ec22b 0t0 TCP *:https (LISTEN)

similarly for sudo lsof -i:306

I get

COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
nginx 548 root 14u IPv4 0xce9cf564560ed3cb 0t0 TCP *:306 (LISTEN)
nginx 549 nobody 14u IPv4 0xce9cf564560ed3cb 0t0 TCP *:306 (LISTEN)

Now if nginx is already using these ports, how come it is claiming that Address is already in use

and when I run my app in browser say abc.dev.com

I get no response from server, after sometime browser simply tells me

The connection has timed out


If i do curl http://abc.dev.com I get

curl: (7) Failed to connect to abc.dev.com port 80: Operation timed out




I have ran out of ideas and can't think of anything that could be causing this. Any Ideas are highly appreciated...

thanks for the help

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>