Skip to main content

Problems launching deployed applications in GlassFish 3.1.1 on RHE Linux server

No replies
Joined: 2012-01-31


I have just installed GlassFish 3.1.1 (build 12) on a RHE 5 Linux server. I have been able to deploy two applications. But when these applicatioins are lauched, the browser gives a Error 101 (net::ERR_CONNECTION_RESET): Unknown error.

Using telnet, it shows that the ports are listening as they should.

> telnet localhost 8080


Connected to localhost.

Escape character is '^]'.

Connection closed by foreign host.

> telnet localhost 8181


Connected to localhost.

Escape character is '^]'.

Connection closed by foreign host.

Using strace, I watched what it was doing as connections were made and disconnected by telnet:

[root@xyz ~]# telnet 0 8181


Connected to 0.

Escape character is '^]'.


Connection closed by foreign host.

Here's what strace showed:

[pid 12893] futex(0x2aaab5146ae0, FUTEX_WAIT_PRIVATE, 2, NULL <unfinished ...>

[pid 12893] <... futex resumed> ) = -1 EAGAIN (Resource temporarily unavailable)

[pid 12893] futex(0x2aaab5146ae0, FUTEX_WAKE_PRIVATE, 1 <unfinished ...>

[pid 12893] <... futex resumed> ) = 0

[pid 12893] read(422, <unfinished ...>

[pid 12893] <... read resumed> "GET /\r\n", 20480) = 7

[pid 12893] read(422, <unfinished ...>

[pid 12893] <... read resumed> 0x622a690, 20473) = -1 EAGAIN (Resource temporarily unavailable)

[pid 12893] shutdown(422, 0 /* receive */) = 0

[pid 12893] shutdown(422, 1 /* send */) = 0

[pid 12893] dup2(19, 422) = 422

[pid 12893] futex(0x2aaab5146b0c, FUTEX_WAIT_PRIVATE, 5, NULL <unfinished ...>

Here's what the support department of our hosting service had to say about this results:

"We believe this shows pretty clearly that the issue is with the application itself. The code is simply shutting down the connection after the read."

Support had made an earlier comment, back when we were having difficulty starting GlassFish:


I think I have found the problem.

[root@xyz bin]# pwd


[root@xyz bin]# strace -f ./asadmin start-domain

From the strace output, I found:

[pid 5997] bind(52, {sa_family=AF_INET, sin_port=htons(4848), sin_addr=inet_addr("")}, 16) = 0

[pid 5997] bind(52, {sa_family=AF_INET, sin_port=htons(4848), sin_addr=inet_addr("")}

So it looks like it tried to bind to every IP it can find.

The IP is the incorrect IP to use.

This is because your server is in a firewall NAT environment, only the firewall will know that IP, and translate it to for the server to use.

To help you with this, I have updated /etc/hosts with the private IP against the hostname.

Please can you check your Glassfish application, and make sure you explicitly tell it to use, and start it up again.

The hosting company does not support GlassFish and as such, can't seem to help beyound this point.

I have tried to start GlassFish specifically with the ip address using the instructions here:

but the result is the same. The applications can't still be lauched.

I would appreciate any helpful input I get get here.


PS: I changed the actual IP address to since I was posting here on a public forum. I also changed an actul name to ABC.