Wednesday, 30 July 2014

Resolving localhost on clustered environment

After a clustered SOA Suite installation we were setting the deployment script to point to localhost when referencing another composites. Although, we were unable to resolve localhost connection in run time trowing the following exception every time that a composite tried to reference another composite:

Tried all: '2' addresses, but could not connect over HTTP to server: 'localhost', port: '8101'

Turns out that the reason was related with the fact that the port 8101 was not listening on the localhost address. This was reveled executing the following command:

:~$ netstat -na | grep 8101  65840      0 129100      0 TIME_WAIT  65840      0 129100      0 TIME_WAIT

The list reveled that only one ip was related with port 8101 so by this we could conclude that localhost was not listening to this port.

Therefore, in order to solve it, we needed to change the IP address range that the servers are listening for incoming connections.
Going to weblogic console and checking the server configuration we could observe that the listen address was set with the machine IP, so in this way limiting the incoming connection to the ones referencing only this IP:

The solution was to remove the IP from the Listen Address field leaving this undefined so clients can reach this server using localhost string.

Saving the changes, applying the modifications and restarting the server made available the composites on the servers to be invoked by clients using localhost in the reference.

No comments:

Post a Comment