ECONNREFUSED connecting to a socket in a lofs-mounted directory chrooted
807567Oct 25 2007 — edited Mar 7 2008A shell script sets up a chrooted environment and works on Solaris 9. When running in the global zone/container on Solaris 10, the same script does not work. A truss (snippet below) of the application shows ECONNREFUSED when attempting to connect to a domain socket. The primary application is a DNS server and the domain socket is for a SNMP master agent. This fails running as root.
/3: time() = 1193320837
/3: sigaction(SIGPIPE, 0xFF0CFBF8, 0xFF0CFC98) = 0
/3: sigaction(SIGTERM, 0xFF0CFB98, 0xFF0CFC38) = 0
/3: sigaction(SIGINT, 0xFF0CFB98, 0xFF0CFC38) = 0
/3: so_socket(PF_UNIX, SOCK_STREAM, 0, "", SOV_DEFAULT) = 5
/3: connect(5, 0xFF0CFC08, 22, SOV_DEFAULT) Err#146 ECONNREFUSED
/3: close(5) = 0
/3: time() = 1193320837
Why does connect() return ECONNREFUSED? An echo out to the same domain socket displays no error while echo to same socket non-chrooted returns "Operation not supported on transport endpoint".
Edited by: belzey on Oct 25, 2007 8:41 AM
Edited by: belzey on Oct 25, 2007 9:17 AM