1 2 Previous Next 19 Replies Latest reply on Oct 23, 2007 3:09 PM by thormar

    jboss as a windows service cannot stop

    sagimann

      Hi,
      I'm using JBoss AS 4.0.1sp1 with JBoss Native 2.0 package to get it to work as a Windows Service. It works fine, however I cannot stop the service later from control panel. After a while, I get the usual "service timed out" message, and I can no longer start it: the log claims that the ports are already bound, and I see cmd.exe process that started a java.exe process that lock the ports. Only after I kill both of them, am I able to start the service again. This is 100% reproducible.

      Any ideas on how to properly stop the service?
      thanks.

        • 1. Re: jboss as a windows service cannot stop
          jaikiran

           

          Any ideas on how to properly stop the service?


          When you stop the service, are there any errors in the server.log file?

          • 2. Re: jboss as a windows service cannot stop
            sagimann

            The server log (and run.log) do not update after I click "stop" on the service. The last message is that of JBoss start up completion (from when the service was started). There are also no errors during startup.

            • 3. Re: jboss as a windows service cannot stop
              explorer

              Did you get any solution for this...

              • 4. Re: jboss as a windows service cannot stop
                explorer

                The issue i am facing is that... its trying to look for some thing on port 1099. And says that its not able to find, to kill the server...
                i changed the jboss-service.xml to run on 8180... does this cause an issue...

                • 5. Re: jboss as a windows service cannot stop
                  peterj

                  "its trying to look for some thing on port 1099" What is trying to look for something on port 1099?

                  "its not able to find," What is it not able to find? And what is attempting to do the finding?

                  Are you saying that there is a port binding conflict on port 1099 when you start the app server? If so, why not simply post the error message (and stack trace) you are getting. And if that is the problem, see http://wiki.jboss.org/wiki/Wiki.jsp?page=DebugBindException

                  Changing the port binding to 8180 does not cause any issues, other than people having to know to use that port when accessing app server.

                  • 6. Re: jboss as a windows service cannot stop
                    sagimann

                    In my case, as I said earlier, there was no error whatsoever during startup, and no messages at all after I clicked 'stop'

                    • 7. Re: jboss as a windows service cannot stop
                      sagimann

                      By the way (correct my if I'm wrong), but port 1099 is default for naming services or RMI, no? It is possible that stopping involves some RMI client (JMX-based maybe) that tells the server to stop. If your naming service/RMI is provided by some external application, it may be related...

                      • 8. Re: jboss as a windows service cannot stop
                        peterj

                        sagiman, I apologize. I didn't see that explorer had appended a question to your post or I would have asked explorer to start a new post. Anyway, my answers were to exlorer's questions, not to your posts.

                        Unfortunately, I have never used 4.0.1 (I skipped from 3.2.7 to 4.0.2), and have never used JBoss Native (though I have used both JavaService and Java Service Wrapper to run JBoss AS as a service).

                        • 9. Re: jboss as a windows service cannot stop
                          anvar

                          sagimann, could you able to solve the problem. As I am also experiencing the same issue, it would be great if I get some help.

                          Thanks

                          • 10. Re: jboss as a windows service cannot stop
                            peterj

                            JBoss Native uses the shutdown script to stop the service. Are you able to manually launch the app server using the run script and then stop it using the shutdown script? If you cannot do this manually, then JBoss Native will not be able to do it either.

                            Have you by any chance locked down the JMX Invoker?

                            Also, what are the last dozen or so entries in the log file?

                            • 11. Re: jboss as a windows service cannot stop
                              sagimann

                              Still experiencing the issue. Not sure how to use the alternative method (java wrapper service) and anyway, it's not an authorized method in my company. Any updates anyone?

                              • 12. Re: jboss as a windows service cannot stop
                                peterj

                                sagimann, not sure what to tell you beyond what I posted earlier. Did you try what I suggested? What happened, were you able to stop the app server using shutdown.bat? What about the log entries I asked for? Or the question about the invoker?

                                • 13. Re: jboss as a windows service cannot stop
                                  sagimann

                                  PeterJ,
                                  Sorry, I've just seen your post... I've found the problem: my app server was using a non default RMI port. If I change it back to the default port, the service is able to stop. Thanks for the info about shutdown.bat - it helped me with diagnostics.

                                  However, I still need a non-default port for my implementation. Do you know how to provide the correct RMI URL to jbosssvc.exe? I now know that I can shut it down manually using:
                                  shutdown.bat -s=localhost:my_rmi_port> -S
                                  But when I try to stop the service using Control Panel or "net stop", it still tries to use the default URL: localhost:1099.

                                  pls advise,
                                  thanks..

                                  • 14. Re: jboss as a windows service cannot stop
                                    sagimann

                                    correction: the manual cmdline should be:
                                    shutdown.bat -s=localhost:my_rmi_port -S

                                    1 2 Previous Next