Skywalking version: 5.0.0-alpha
OS version: win10
JRE: 1.8.0_151
I'm the .NET Core Community members, our project will using Skywalking.
When I ran the skywalking startup.bat script on Windows, there's an error occurred, my environment variable has configured Java_Home correctly.
I run the startup.bat using the Cmder app like:
G:\apache-skywalking-apm-incubating\bin
位 startup.bat
I got the following error:
閿欒: 鎵句笉鍒版垨鏃犳硶鍔犺浇涓荤被 C:\Program Files\Java\jdk1.8.0_151\bin\java
Current directory:
G:\apache-skywalking-apm-incubating\bin
Command to be executed:
"C:\Program Files\Java\jdk1.8.0_151\bin\java.exe" "C:\Program Files\Java\jdk1.8.0_151"\bin\java ""-Xms256M -Xmx512M -Dcollector.logDir=G:\apache-skywalking-apm-incubating\bin\.\..\logs"" -cp "G:\apache-skywalking-apm-incubating\bin\.\..\collector-libs\*;G:\apache-skywalking-apm-incubating\bin\.\..\config;.;" org.apache.skywalking.apm.collector.boot.CollectorBootStartUp
ConEmuC: Root process was alive less than 10 sec, ExitCode=1.
Press Enter or Esc to close console...
and
閿欒: 鎵句笉鍒版垨鏃犳硶鍔犺浇涓荤被 C:\Program Files\Java\jdk1.8.0_151\bin\java
Current directory:
G:\apache-skywalking-apm-incubating\bin
Command to be executed:
"C:\Program Files\Java\jdk1.8.0_151\bin\java.exe" "C:\Program Files\Java\jdk1.8.0_151"\bin\java -jar G:\apache-skywalking-apm-incubating\bin\.\..\webapp/skywalking-webapp.jar --server.port=8080 --collector.ribbon.listOfServers=127.0.0.1:10800
ConEmuC: Root process was alive less than 10 sec, ExitCode=1.
Press Enter or Esc to close console...
I tried to use the Windows CMD command, which still doesn't work properly.
I think I found the reason which cause the problem, I submitted a PR attempt to fix the problem.
@yuleyule66 I had tested the script(mine and yours) in windows 10 last night and both of them are work fine. The JAVA_HOME env variable also under C:\Program Files folder in my test environment.
Also I found some strange thing about the error log that you posted.
Command to be executed:
"C:\Program FilesJava\jdk1.8.0_151\binjava.exe" "C:\Program FilesJava\jdk1.8.0_151"\binjava -jar > G:\apache-skywalking-apm-incubating\bin...\webapp/skywalking-webapp.jar --server.port=8080 --> collector.ribbon.listOfServers=127.0.0.1:10800
In general, the java command cannot be execute twice. So could you post the console log that you execute the following command in your test environment
> echo %JAVA_HOME%
> _EXECJAVA="%JAVA_HOME:"=%"\bin\java
> echo % _EXECJAVA%
Maybe you can try the following command and it seems works:
> set _EXECJAVA="%JAVA_HOME:"=%"\bin\java
> %_EXECJAVA% -version
But this is not important. The strange thing is the java command executed twice. maybe you turn echo on and post the execute step information to help me to find the reason why the java command executed twice.
I think i found the reason , my JAVA_HOME env is C:\Program Files\Java\jdk1.8.0_151\ , The end of the path has a \ symbol, This caused the error. You can try it.
Most helpful comment
I think i found the reason , my
JAVA_HOMEenv isC:\Program Files\Java\jdk1.8.0_151\, The end of the path has a\symbol, This caused the error. You can try it.