1

I'm trying to get Tika JAXRS running as a Windows Service using Apache Commons Daemon.

I've got tika-server-1.7.jar from http://tika.apache.org/download.html

I've downloaded v1.0.15 of the Windows binaries for Apache Commons Daemon from http://commons.apache.org/proper/commons-daemon/binaries.html

I can get Tika started as a service, but I can't determine what to use for a stop method.

prunsrv.exe //IS//tika-daemon
 --DisplayName "Tika Daemon" 
 --Classpath "C:\Tika Service\tika-server-1.7.jar"
 --StartClass "org.apache.tika.server.TikaServerCli"
 --StopClass "org.apache.tika.server.TikaServerCli"
 --StartMethod main
 --StopMethod main
 --Description "Tika Daemon Windows Service"
 --StartMode java
 --StopMode java

This starts, and works as I'd hope, but when trying to stop the service it doesn't respond. Obviously org.apache.tika.server.TikaServerCli.main(string[] args) isn't a suitable stop method, but I'm lost for alternatives.

I'd also welcome any alternative methods for getting Tika running as a Windows Service, or otherwise auto-starting outside of an interactive session.

4

3 に答える 3

0

これは Apache Commons Daemon 1.0.15 の既知の問題のようです。https://issues.apache.org/jira/browse/DAEMON-298

Apache アーカイブhttp://archive.apache.org/dist/commons/daemon/binaries/windows/からダウンロードしたバージョン 1.0.14 にスワップしたところ、サービスがシャットダウンされました。

元のjavaStartMode はシャットダウン時にエラーを生成しますが、シャットダウンます。ただし、exeStartMode は問題なく動作します。

于 2015-03-05T00:35:24.923 に答える