Skip to content

Troubleshooting

If you for some reason need to troubleshoot your instance of EPR this is the right place to start.

All logging from the application is done to the logs directory located at [InstallRoot]/[EPRInstanceName]/tomcat. If there is a problem while running a script, you need to handle that logging yourself either by using Write-CustomLog that is included in the PowerShell module Easit.ProcessRunner.GlobalFunctions or with some other logging mechanism.

You can always test if the service is "up and running" by running this command in PowerShell on the server where EPR is installed.

1
  C:\Users\administrator> Invoke-RestMethod -Method Get -Uri 'http://localhost:port/api/ping'

Diagnose the issue

Narrow down the issue to more than "something is wrong". This could be "EPR receives the request but does not start the script" or "EPR does not start correctly".

Finding the problem

As long as you know that EPR receives the request you can look in the logs for EPR. If EPR does NOT receive the request, please troubleshoot network connectivity and / or firewall problems.

If the service do not start, please advise Unable to start the service.

First place to look

A good place to start looking when troubleshooting EPR is in EasitProcessRunner.log. This is an abstraction log to which the application writes its messages and some various Tomcat standard output streams ends up.

The layout of the file is this: DATE - TIME - Message Level - Message - thread - class

Open the file and look for any row with a message level of WARN or ERROR. The message is not always written as "Cannot find script x.ps1" and Easit personal can always help you interpret the message for you. You can find some examples for how errors can show up in the log below and we will try to guide you to interpret them.

Example 1

In this example we have a long running script that exceeds the timeout set for the PowerShell process. Either our script is doing something wrong or we need to increase the timeout.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
DATE - TIME - ERROR - Error occurred during camel integration routing.
Exception caught: IntegrationException
Message: Exit value was not 0 (exit value=1).
Error: The process timed out. Check the script or increase the 'powershell.runtimeout' property in properties file
Failing exchange body was: {"importHandlerIdentifier":"testService.ps1","itemToImport":null}
Failing camel endpoint was: direct://startscript
Properties: identifier: testService.ps1
inExceptionHandling: true

scriptError: 
    The process timed out.
    Check the script or increase the 'powershell.runtimeout' property in properties file

exitCode: 1
http-nio-8089-exec-8 - com.easit.integration.processor.CreateErrorMessage

Example 2

This is an example of a truncated stacktrace from a java application, which EPR is. To find what the actual error message is we need to find the line starting with Caused by and read it.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
DATE - TIME - ERROR - Application run failed - main - org.springframework.boot.SpringApplication
java.lang.reflect.UndeclaredThrowableException: Failed to invoke event listener method
HandlerMethod details: 
Bean [com.easit.integration.configuration.IntegrationConfiguration\$\$EnhancerBySpringCGLIB\$\$146f7b28]
Method [public void com.easit.integration.configuration.IntegrationConfiguration.startUpCheck() throws com.easit.integration.exception.IntegrationException]
Resolved arguments: 
at org.springframework.context.event.ApplicationListenerMethodAdapter.doInvoke(ApplicationListenerMethodAdapter.java:361)
at org.springframework.context.event.ApplicationListenerMethodAdapter.processEvent(ApplicationListenerMethodAdapter.java:229)
at org.springframework.context.event.ApplicationListenerMethodAdapter.onApplicationEvent(ApplicationListenerMethodAdapter.java:166)
at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:176)
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:169)
.....

Caused by: com.easit.integration.exception.IntegrationException: 
    Service is running as user WIN-8TPRHD4QLPS$.
    This is not allowed in application.properties or the property is missing

at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.context.event.ApplicationListenerMethodAdapter.doInvoke(ApplicationListenerMethodAdapter.java:344)
... 58 common frames omitted

When we read the line starting with Caused by we can see that we are trying to run EPR with a user account the is not allowed according to our configuration.

Second place to look

If you are having an issue with EPR but EasitProcessRunner.log does not show anything, start by looking in instanceName-stderr.date.log or catalina.date.log for any errors there that might tell you what the problem is.

If you have any issue with Easit Process Runner, please include logs and a detailed description of your issue when contacting Easit support.

Resolving the issue