Skip to content

Exit code is 0 on wrapper error during service start #198

@mpana

Description

@mpana

In this scenario the service user is Network Service; when starting the service, a System.UnauthorizedAccessException is thrown when attempting to write to the wrapper log file, as this user has no write permissions on the current directory.

In the console the output is as follows:

2017-03-06 11:43:04,715 INFO - Starting ServiceWrapper in the CLI mode 2017-03-06 11:43:05,177 INFO - Completed. Exit code is 0

In the Event logs though we can see the error occurring:

An unhandled exception ('System.UnauthorizedAccessException') occurred in process #12528. Just-In-Time debugging this exception failed with the following error: The process ID is invalid.

In this case the service errors and stops, but the java process is left running, and the exit code is 0, the error only logged to the event registry.

Fixing the folder permissions gets rid of this specific problem, but I have seen similar behaviour on other occasions, and that makes it tricky to detect when something goes wrong.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions