This guide explains how to install and run TNT4J-Streams as a service on Linux/UNIX and Windows—including automated and manual setup steps, boot-time startup configuration, and Windows Registry locations for troubleshooting.
Supported Operating Systems
*nix family operating systems: Linux distributions, UNIX
MS Windows
*nix Systems
Automated Install
Run the installService.sh provided script and follow instructions to fill in service name, root path of tnt4j-streams, running user, and parser configuration path.
Manual Install
-
Edit it the script
./nix/tnt4j-streams-service.shand replace the following tokens:<NAME>= service's name<DESCRIPTION>= Describe your service here (be concise)
Feel free to modify the LSB header; I've made default choices you may not agree with.<FILE_PATH>= Path to the TNT4J-Streams installation<USER>= Login of the system user the script should be run as (for examplemyuser)<PARSER_CONFIG>= Location of the parser configuration<TNT4J_PROPERTIES>= TNT4J event sink configuration<LOG4J_PROPERTIES>= Logger configuration
-
Copy to
/etc/init.d:cp "./nix/tnt4j-streams-service.sh" "/etc/init.d/tnt4j-streams`" chmod +x /etc/init.d/tnt4j-streams
-
Start and test your service:
service tnt4j-streams start service tnt4j-streams stop
-
Install service to be run at boot-time:
update-rc.d tnt4j-streams defaults
MS Windows System
Manual Install
-
Edit the script
installService.batand replace the following tokens:-
<NAME>= service's name -
<DESCRIPTION>= Describe your service here (be concise) -
<FILE_PATH>= Path to the TNT4J-Streams installation -
<JVM_PATH>= Path to the JMV root -
<PARSER_CONFIG>= Location of the parser configuration -
<TNT4J_PROPERTIES>= TNT4J event sink configuration -
<LOG4J_PROPERTIES>= Logger configuration
-
Run the modified script file. Now you should be able to see your service as ordinary MS Windows services. You can start/stop/restart and modify it over the MS Windows Services administration tool.
Registry Usage
In order to troubleshoot your TNT4J-Streams service installation, it's worth checking the registry. The basic Service definitions are maintained under the registry key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\<ServiceName>
Additional parameters are stored in the registry at:
HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\ProcRun 2.0\<ServiceName>\Parameters
procrun always uses the 32-bit registry view for storing the configuration. This means that parameters will be stored under:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Apache Software Foundation\ProcRun 2.0\<ServiceName>