Skip to main content

"Service not found" error after server restart in production

3 replies [Last post]
suneelgv
Offline
Joined: 2008-07-07
Points: 0

This issue happens 40% of the time after a server restart in production. We just use the annotation @Webservice on the class, do a javac, and put the class in a WAR file. Glassfish takes care of converting it into a webservice. I could never reproduce this issue in local. Right now, we resolve this issue by restarting the server again. If we are lucky, the webservice comes back up. Otherwise, we keep restarting it till comes back up. Usually it doesn't need more than 3 restarts. The server in production is part of a cluster.

Here is the stacktrace.

[#|2010-09-03T10:13:18.148-0500|SEVERE|sun-appserver2.1|javax.enterprise.system.container.web|_ThreadID=50;_ThreadName=httpSSLWorkerThread-50001-12;_RequestID=64874bfc-4895-4a95-af5f-337b6312986b;|StandardWrapperValve[ExternalBankingServiceImpl]: PWC1406: Servlet.service() for servlet ExternalBankingServiceImpl threw exception
javax.servlet.ServletException
at com.sun.enterprise.webservice.JAXWSServlet.doPost(JAXWSServlet.java:182)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
at sun.reflect.GeneratedMethodAccessor79.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:292)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
.......
.......
Caused by: javax.servlet.ServletException: Service not found
at com.sun.enterprise.webservice.JAXWSServlet.doPost(JAXWSServlet.java:179)
... 110 more

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
ramapulavarthi
Offline
Joined: 2004-06-01
Points: 0

Which version of Glassfish are you using? Is it an EJB web service? Does the web service has wsdl package? A sample testcase would really help.

suneelgv
Offline
Joined: 2008-07-07
Points: 0

Rama,

We are using this version: Sun GlassFish Enterprise Server v2.1.1 Patch04 ((v2.1 Patch10)(9.1_02 Patch16)) (build b02-p04).

It is not an EJB web service.There isn't a wsdl package, don't know what that is. If you are talking about "wsdl" directory under WEB-INF, then we don't have such directory.

This is how we deploy webservices. We create a public class with public methods and have the annotation @Webservice on the class. This class is compiled using javac ant task and is put in a WAR file along with the other web application files.During deploy time, GF takes care of generating a webservice from this class.

As I said, this doesn't happen always. It only happens from time to time during server restarts in production.

I would appreciate any help on resolving this issue.

Thanks
Suneel

thuebner
Offline
Joined: 2010-09-27
Points: 0

I'm using Glasfish v2.1.1 ((v2.1 Patch06)(9.1_02 Patch12)) (build b31g-fcs) and have the same issue.
First somtimes the webapplication in our production hangs (maybe it is the garbage collector), after a restart of the server process, the WebService could not be found. Only a redoploy the whole application helps.

Now I have the same issue with my development server on localhost. If I restart the server (switch from normal in debug mode) the WebService could not be found anymore. My web application has several webserves build with maven and it worked till now. I don't know why, but suddenly I have this problem.

When I start the admin page I got this exception:
[code]
NotifyUtil::java.net.SocketException: Software caused connection abort: recv failed
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:258)
at java.io.BufferedInputStream.read(BufferedInputStream.java:317)
at java.io.FilterInputStream.read(FilterInputStream.java:116)
at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java:2504)
at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:264)
at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:306)
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:158)
at java.io.InputStreamReader.read(InputStreamReader.java:167)
at java.io.BufferedReader.fill(BufferedReader.java:136)
at java.io.BufferedReader.readLine(BufferedReader.java:299)
at java.io.BufferedReader.readLine(BufferedReader.java:362)
at org.netbeans.modules.web.monitor.server.NotifyUtil$RecordSender.run(NotifyUtil.java:296)
[/code]

I thought maybe some ports or sockets are still open even if I stopped the server, but a restart of the whole PC didn't solve this problem. Only a redoploy will do it.

Do someone know, why the service is not accessable after a restart and how can I solve it?