[FAQ] Common Issue - Version 4.x

ERROR, ERServer - Failure Audit,ElixirReportServer,None,N/A,Exception on startup on Elixir Report Server on: user: 7000 …
Version : 4

Problem encountered:
When user start or restart the server they encounter the below error on Version 4:

Error Message in Server.log/Application.log:
ERROR, ERServer - Failure Audit,ElixirReportServer,None,N/A,Exception on startup on Elixir Report Server on: user: 7000
java.lang.RuntimeException: Illegal State Change from Error to Initialised
        at com.elixirtech.report.server.process.AbstractProcessController.badTransition(AbstractProcessController.java:79)
        at com.elixirtech.report.server.process.AbstractProcessController.verifyTransition(AbstractProcessController.java:75)
        at com.elixirtech.report.server.process.AbstractProcessController.transit(AbstractProcessController.java:88)
        at com.elixirtech.report.server.process.AbstractProcessController.transit(AbstractProcessController.java:83)
        at com.elixirtech.report.server.net.Reactor$ReactorHelper.init(Reactor.java:133)
        at com.elixirtech.report.server.net.Reactor.registerHandler(Reactor.java:93)
        at com.elixirtech.report.server.ServerConfigurator.startUp(ServerConfigurator.java:192)
        at com.elixirtech.report.server.ServerConfigurator.<init>(ServerConfigurator.java:56)
        at com.elixirtech.report.server.ElixirReportServer.<init>(ElixirReportServer.java:157)
        at com.elixirtech.report.server.ElixirReportServer.main(ElixirReportServer.java:111)

Caused:
1) This error indicate that this port 7000 is already used by another instance. (Can be other program)
2) You have set the same port for your processes in report.config.xmlor other processes is using the same port. 

Resolution:
1) Ensure that all port configure on 'report.config.xml' are completely killed before starting/restarting the server.
2) All the processes should be configured to be using unique port numbers. 
3) Ensure this port is free from other programs else you have to make changes to 'report.config.xml'

ERROR, ERS1.RenderEngineClient - Exception while destroying process(function:halt)com.elixirtech.util.Assert: Assertion failure: notNull
Version : 4

Problem encountered:
Server went down with the following error:

Error Message in Server.log/Application.log:

21 Jun 2012 15:04:29,364,DEBUG, ERS1.RenderEngineClient - Halt render process
21 Jun 2012 15:04:29,364,DEBUG, ERS1.RenderEngineClient - Halt render process
21 Jun 2012 15:04:29,364,ERROR, ERS1.RenderEngineClient - Exception while destroying process(function:halt)
com.elixirtech.util.Assert: Assertion failure: notNull
    at com.elixirtech.util.Assert.notNull(Assert.java:22)
    at com.elixirtech.report.server.renderengine.RenderEngineClient.halt(RenderEngineClient.java:165)
    at com.elixirtech.report.server.renderengine.RenderEngineService.halt(RenderEngineService.java:144)
    at com.elixirtech.report.server.ServerConfigurator.shutDown(ServerConfigurator.java:227)
    at com.elixirtech.report.server.ElixirReportServer$ShutDownChildProcess.run(ElixirReportServer.java:270)
    at java.lang.Thread.run(Thread.java:595)
21 Jun 2012 15:04:29,364,ERROR, ERS1.RenderEngineClient - Exception while destroying process(function:halt)
com.elixirtech.util.Assert: Assertion failure: notNull


Caused:
Java VM wad suddenly terminated. When the JVM was terminated, all processes will stop working since it is depending on the JVM.
This sequence of events is due to the shutdown of the report server module which sends a shutdown to each client, hence the message "Halt render process". It shows the halt was called from the ElixirReportServer as part of a Runtime shutdown hook - this is fired by the JVM when it is about to terminate.

The key to solving this is to know what happened when the server shutdown occurred. As the trace shows no indication of another cause (eg. OutOfMemory) it is possible that the server stopped because of some system user action - eg. kill the service, use Ctrl-C, logoff the account which is running the code etc. 
From within Java, all we know is that the shutdown hook was invoked, we can't tell why or by who/what the shutdown was requested.

It shouldn't be anything to do with the JVM version itself, though old versions do have errors that can cause them to quit, if they do then they quit immediately, not by using the shutdown hook, which is the graceful "proper" way to shut down. If it was a JVM error then it would just die instantly. So as far as the JVM is concerned, this is a normal shutdown request. 
For example on Windows, if you run a program and then logout it will usually quit your application.
Also, if you connect to a server via ssh and launch a program, when the ssh connection times out (eventually) it will stop the program.


Resolution:
There are ways to avoid this by running as a service, or launching as a background process etc. so it is important to know how and when the program was started. For example, if it fails after two hours, perhaps two hours is the session timeout for an ssh connection.