
8.2a) Important note regarding ".sh" and ".bat" command files:
Commands ending with ".sh" or ".bat" MUST be executed from the OpenGTS installation directory.
Attempting to execute these commands from another directory may result in a "ClassNotFoundException" or
"NoClassDefFoundError" error, or similar. (This means that you must cd to $GTS_HOME, then execute the
command as "bin/<command>")
Or, the Perl version of this command can be used without needing to be in the OpenGTS installation directory:
/zzz> $GTS_HOME/bin/runserver.pl -s server
On Windows, the command can omit the "-s" and can be entered as follows:
C:\> cd \OpenGTS_1.2.3
C:\OpenGTS_1.2.3\> \bin\runserver.bat server
The server will initialize and start listening on the port(s) specified by the "ListenPorts" tag in the "dcservers.xml"
file for the specific named DCServer. To change the listen port on the command line, you can add a "-port" argument
as follows:
/zzz> $GTS_HOME/bin/runserver.pl -s server -port 31123
Or on Windows:
C:\OpenGTS_1.2.3\> \bin\runserver.bat server -port:31123
To set listening on port "31123".
You can also add the command-line option "-debugMode" to enable debug-level logging.
While running in "background" mode, the output logs are stored in the file "$GTS_HOME/logs/server.log". (The file
"server.out" is also created by "runserver.pl" to capture output to stdout/stderr, but will typically remain empty).
When testing/debugging, you may also start a server "interactively". That is, the server is run in the foreground (ie. not
'backgrounded'), and all logging output is sent to the console instead of the log file. To start a server "interactively", add
the option "-i" to the command line, as follows:
/zzz> $GTS_HOME/bin/runserver.pl -s server -i
(To stop the server in this mode, simply press 'Control-C')
8.3) Stopping the Device Communication Server
When started in "background" mode (ie. Without the "-i" option), a "Process ID" (PID) file is created at
"$GTS_HOME/logs/server.pid", which contains the process-id of the backgrounded task. This file is used to stop the
server with the command:
/zzz> $GTS_HOME/bin/runserver.pl -s server -kill
Where "server" should be replaced with the specific name of the server to start (ie. "gtsdmtp", "tk10x", or
"aspicore").
OpenGTS Configuration and Installation Manual Page 29 of 60
Kommentare zu diesen Handbüchern