We have a web proxy running as a service. It's a straight-up EXE, within it is a packaged java application.
Sometimes, we get this in the log file the application generates, and the proxy stops working.
26-11-2013 09:42:48,661 [ServerThread] ERROR pe - Unable to start server java.net.SocketException: Unrecognized Windows Sockets error: 0: JVM_Bind at java.net.PlainSocketImpl.socketBind(Native Method) at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:365) at java.net.ServerSocket.bind(ServerSocket.java:319) at java.net.ServerSocket.(ServerSocket.java:185) at java.net.ServerSocket.(ServerSocket.java:141) at pe.a(Unknown Source) at oe.run(Unknown Source)
But the EXE happily keeps running. Is there any general way of making the EXE fail when this Java failure occurs, so that the Windows native ability to restart failed services kicks in? Obviously, if the software vendor has to build this in, there's no way you, gentle reader, would know the answer. I'm just wondering if there's a Java flag that I'm not aware of.
It looks like it was built with procrun, I think. I'm saying that based on running strings.exe on the connector.exe file.
I know that a more complete solution would be log-file monitoring, with alerting and possible automated remediation. That's not something that I can do today however.
This is one of those typical nasty errors we are faced with as sysadmins. The processes are up and running while the function/application is dead.
You can take two different approaches:
In both situations you need to avoid false positives.
A proper reaction would be a service restart - which you have to trigger - which hopefully works in your situation.