通过prunsrv安装的windows服务抛出错误代码1

vs3odd8k  于 2021-07-09  发布在  Java
关注(0)|答案(0)|浏览(266)

我正在尝试使用prunsrv启动seleniumhub&node,将它们作为windows服务启动。从hub开始,在cmd中执行的以下命令成功创建服务:

prunsrv //IS//SeleniumHub ^
--DisplayName="SeleniumHub" ^
--Description="Selenium Hub" ^
--Install=prunsrv.exe ^
--LogLevel=Debug ^
--StdOutput=auto ^
--StdError=auto ^
--LogPath=C:\Selenium\Logs ^
--LogJniMessages=1 ^
--Jvm=C:\Program Files (x86)\Java\jre1.8.0_261\bin\client\jvm.dll ^
--ClassPath=C:\Selenium\selenium-server-standalone-3.141.59.jar ^
--StartUp=auto ^
--StartMode=jvm ^
--StartClass=org.openqa.grid.selenium.GridLauncherV3 ^
--StartMethod=main ^
--StartParams=-role#hub ^
--StopMode=jvm ^
--StopTimeout=15 ^
--JvmMs=256 ^
--JvmMx=1024 ^
--JvmSs=4000 ^
--JvmOptions=-Dprunsrv.port=8080 ^
++JvmOptions=-Dprunsrv.server=localhost

最初,这抛出了错误代码2,但在编辑imagepath的注册表项之后 Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SeleniumHub ,指向 prunsrv.exe 我能克服第一个错误。
但是,当我尝试启动服务时,会显示以下消息:

有没有地方可以查找错误日志以了解更多详细信息?我有什么特别遗漏的吗?
我做了以下工作:
确保prunsrv.exe是amd64版本(即使用64位而不是32位)。
已在中验证 LogPath 已成功创建服务的目录和windows服务。
更改 jvm.dll 到64位位置

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题