Results 1 to 2 of 2

Thread: How to ReStart The Server after shutdown

  1. #1

    Default How to ReStart The Server after shutdown

    Hello, I'm trying to prevent the server from shut down by creating server listener and tried this code
    public void onServerShutdownComplete(IServer server) {
    		WMSLoggerFactory.getLogger(null).info("onServerShutdownComplete");
    		Server s = new Server();	
    		s.startServer();
    		
    	}
    but nothing happened and I tried this code
    public void onServerShutdownComplete(IServer server) {
    		WMSLoggerFactory.getLogger(null).info("onServerShutdownComplete");
    		Server.start();		
    	}
    here the server tries to start but i got this error at the last
    INFO vhost comment _defaultVHost_ Bind attempt ([any]:1935:4)
    INFO vhost comment _defaultVHost_ Bind successful ([any]:1935)
    INFO vhost comment _defaultVHost_ Bind attempt ([any]:8086:1)
    INFO vhost comment _defaultVHost_ Bind successful ([any]:8086)
    INFO server comment - Server.startShutdownHook: Start server shutdown hook
    WARN server comment - CommandInterfaceCommandShutdownServer.invoke: java.lang.Il
    legalThreadStateException
    so can you tell me what am I doing wrong

  2. #2
    Join Date
    Sep 2011
    Posts
    1,933

    Default

    Hi,
    By the time Wowza gets to this point, it is too late to restart as it's shutting down.
    To be honest, I don't think it's possible to start Wowza when the "onServerShutdownComplete" or "onServerShutdownStart" are called.

    Jason

Similar Threads

  1. Replies: 1
    Last Post: 09-29-2014, 06:24 AM
  2. cannot shutdown server
    By Amer.K in forum Server Administration Discussion
    Replies: 1
    Last Post: 12-26-2013, 09:15 AM
  3. graceful server shutdown
    By shay@mintmark.co.il in forum General Forum
    Replies: 3
    Last Post: 07-02-2013, 07:25 AM
  4. Frequent Server Shutdown
    By babadjedi in forum General Forum
    Replies: 4
    Last Post: 08-06-2012, 11:34 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •