Our application uses several socket connections (to localhost) implemented in c, with one connection using a jni/c socket connection. All of them call the same include to open the socket, and all are successful when we run the application on Solaris 10. Migrating to Solaris 11, we are finding that only the socket connections built in c are working, the one jni/c connection will not. I've added output to see what exactly is being sent to the connect call and it looks like the call is getting everything it needs:
"sock_connect: socket status: 0, sock_d: 27, serv_addr: ***.***.***.***, sizeof: 16"
So for the call below, sock_d = 27
serv_addr = (it returns a good IP, but my PM said he'd kill me if I put the actual IP)
sizeof(serv_addr) = 16
which should be all the parameters connect() needs in the code snippet below.
.
.
.
.
status = connect(sock_d, (struct sockaddr *)&serv_addr, sizeof(serv_addr));
if (status < 0){
fprintf(stderr, "sock_connect 4: after connect errno: %i, error %sn", errno, strerror(errno));
if (errno == EINPROGRESS){
fprintf(stderr, "sock_connect, errno == EINPROGRESS\n");
.
.
.
Truss output for the failed connection seems to indicate an EINPROGRESS
error. Our code is supposed to validate for this possibility, but it does not trigger an if statement that checks to see if the error == EINPROGRESS
. It never reaches the second fprintf
statement. We have disabled IPv6 on the server, as we thought perhaps java was trying to force this protocol, but this didn't make a difference either.
The exact same libraries and executables will work on both servers, right up until the jni socket call is made. From that point on Solaris 10 keeps going but Solaris 11 will not.
Has anyone seen this before? Please let me know what else you need to see and I'll post it. Thanks in advance!