Posts

Showing posts with the label ip

Nginx "Connection refused" error when setting upstream as localhost

For some reason, I checked out the nginx error log last night and got this error: 2014/10/28 06:53:54 [error] 5437#0: *28 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.1.3, server: my.domain.com, request: "GET /staff/acts/report-by-acts/ HTTP/1.1", upstream: " http://[::1]:8080 /staff/acts/report-by-acts/", host: "my.domain.com", referrer: "http://my.domain.com/staff/families/all/" But my web application is still working properly. What happened? Where was the problem? I looked into the nginx configuration and found that I set upstream server of that app as localhost: upstream asa {     server localhost :8080 fail_timeout=0; } So, I changed the server directive to 127.0.0.1, restart nginx, and the error gone away: upstream asa {     server 127.0.0.1 :8080 fail_timeout=0; }

Using nmap to find network devices (IP, MAC) in your LAN

Image
If someday you plug a device which does not have a display (something like a monitor) into your LAN network and don't know where it is on the network (IP address), E.g my Beaglebone Black, you can use nmap. Nmap is a free network scanner utility. $ sudo nmap -sn 172.18.0.0/16 (scan the 172.18.0.0 network, my LAN network, to find the device) The results are something like: I can see one Texas Instruments device which is my Beaglebone Black's network chip manufacturer. So, that is my board.