File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Other Java Products and Servers and the fly likes Help with Unexpected end of file from server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Java Products and Servers
Bookmark "Help with Unexpected end of file from server" Watch "Help with Unexpected end of file from server" New topic

Help with Unexpected end of file from server

Rafael Angarita
Ranch Hand

Joined: Jan 09, 2009
Posts: 67

I'm trying to secure web services using SSL and mutual authentication. Everything worked fine when I deployed both the service and the client in my local GlassFish instance.

Now, I deployed the web service in a Ubuntu VM. After configuring all the certificates, I get this error in the local GlassFish log: Unexpected end of file from server

In the remote GlassFish log does not appear anything.

I totally hit a wall here. I don't know what else to do.

I really hope you guys can help me to solve or debug this problem.

Thank you very much.

Rafael Angarita.
Travis Hein
Ranch Hand

Joined: Jun 06, 2006
Posts: 161
Some ideas :

- could the SSL certificate placed into the VM be for your local host, like if there is some internal dependency on the host name in the certificate.

- does the VM, and the external client DNS names resolve each other. for example, when inside the VM, can you ping 'the_client_host_name' and when outside on the client machine can you 'ping the_virtual_machine_name'.. where if you have a certificate for myhost.mydomain,, the certificate must appear to be coming from the myhost.mydomain server, and not localdomain.localhost

- does the virtual machine have more than one interface, like a virtual wireless and virtual wired. or just 2 lan segments. sometimes strange things can happen when there are 2 or more network interfaces into a (virtual) machine, such as if the client makes a request over interface1 into the vm, but the vm is for some reason thinking it's default route interface, or the interface the web server is actually listening on, is interface2, the message coud kind of start off but then end up going out into space because there is no single path to round trip the response with.

- does the virtual machine have a kind of NAT, or bridged IP address with the LAN of your host. for example, some virtualization platforms set up a NAT that makes it impossible to connect from the host into a virtual machine.

- would the VM be running any kind of firewalling , such as iptables. many linux distributions now by default (for a server configuration) only allow the virtual machine to access out to the network, but all ports for hosted services might be turned off; an iptables firewall set up to drop or reject incoming might appear to be a sudden end of communication to the client.

- is it possible to run the client inside the virtual machine with the server, like if it works on the same host that is. to get it working anywhere might be a good start and then work your way out from there.

Error: Keyboard not attached. Press F1 to continue.
I agree. Here's the link:
subject: Help with Unexpected end of file from server
It's not a secret anymore!