karaf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Castor <ygorcas...@gmail.com>
Subject Child instances on Windows
Date Tue, 23 May 2017 14:47:21 GMT
Enviroment: Windows 8.1 , Karaf 4.0.9 ( Also tested with 4.0.8 and 4.1.1 ) ,
JDK8 131 64bits. 

Hello! I'm encountering some problems with Karaf instances under Windows,
which does not occurs on Linux. 

1) When i run a instance:list , it shows the root instance as Stopped, the
karaf.pid file has the correct process id so does the instance.properties,
but the instance.properties after i run a instance:list sets the item.0.pid
to 0. 

2 ) When i create or clone an instance, the files are cloned/created without
any problem, but when i run a instance:start i have the following exception: 

2017-05-22 15:45:38,266 | ERROR | nsole user karaf | ShellUtil                       
| 43 - org.apache.karaf.shell.core - 4.0.9 | Exception caught while
executing command
org.apache.karaf.shell.support.MultiException: Error starting instance(s)
        at
org.apache.karaf.instance.command.RestartCommand.doExecute(RestartCommand.java:50)[31:org.apache.karaf.instance.core:4.0.9]
        at
org.apache.karaf.instance.command.InstanceCommandSupport.execute(InstanceCommandSupport.java:90)[31:org.apache.karaf.instance.core:4.0.9]
        at
org.apache.karaf.shell.impl.action.command.ActionCommand.execute(ActionCommand.java:83)[43:org.apache.karaf.shell.core:4.0.9]
        at
org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:67)[43:org.apache.karaf.shell.core:4.0.9]
        at
org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:87)[43:org.apache.karaf.shell.core:4.0.9]
        at
org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:480)[43:org.apache.karaf.shell.core:4.0.9]
        at
org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:406)[43:org.apache.karaf.shell.core:4.0.9]
        at
org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[43:org.apache.karaf.shell.core:4.0.9]
        at
org.apache.felix.gogo.runtime.Closure.execute(Closure.java:182)[43:org.apache.karaf.shell.core:4.0.9]
        at
org.apache.felix.gogo.runtime.Closure.execute(Closure.java:119)[43:org.apache.karaf.shell.core:4.0.9]
        at
org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:94)[43:org.apache.karaf.shell.core:4.0.9]
        at
org.apache.karaf.shell.impl.console.ConsoleSessionImpl.run(ConsoleSessionImpl.java:274)[43:org.apache.karaf.shell.core:4.0.9]
        at java.lang.Thread.run(Thread.java:745)[:1.8.0_77]
Caused by: java.lang.RuntimeException: java.io.IOException: Unable to create
process (error code: 1)
        at
org.apache.karaf.instance.core.internal.InstanceServiceImpl.execute(InstanceServiceImpl.java:258)[31:org.apache.karaf.instance.core:4.0.9]
        at
org.apache.karaf.instance.core.internal.InstanceServiceImpl.restartInstance(InstanceServiceImpl.java:577)[31:org.apache.karaf.instance.core:4.0.9]
        at
org.apache.karaf.instance.core.internal.InstanceImpl.restart(InstanceImpl.java:96)[31:org.apache.karaf.instance.core:4.0.9]
        at
org.apache.karaf.instance.command.RestartCommand.doExecute(RestartCommand.java:64)[31:org.apache.karaf.instance.core:4.0.9]
        ... 12 more
Caused by: java.io.IOException: Unable to create process (error code: 1)
        at
org.apache.karaf.jpm.impl.ProcessImpl.create(ProcessImpl.java:129)[31:org.apache.karaf.instance.core:4.0.9]
        at
org.apache.karaf.jpm.impl.ProcessBuilderImpl.start(ProcessBuilderImpl.java:42)[31:org.apache.karaf.instance.core:4.0.9]
        at
org.apache.karaf.instance.core.internal.InstanceServiceImpl.doStart(InstanceServiceImpl.java:530)[31:org.apache.karaf.instance.core:4.0.9]
        at
org.apache.karaf.instance.core.internal.InstanceServiceImpl.access$1500(InstanceServiceImpl.java:64)[31:org.apache.karaf.instance.core:4.0.9]
        at
org.apache.karaf.instance.core.internal.InstanceServiceImpl$8.call(InstanceServiceImpl.java:612)[31:org.apache.karaf.instance.core:4.0.9]
        at
org.apache.karaf.instance.core.internal.InstanceServiceImpl$1.call(InstanceServiceImpl.java:250)[31:org.apache.karaf.instance.core:4.0.9]
        at
org.apache.karaf.util.locks.FileLockUtils$2.call(FileLockUtils.java:103)[31:org.apache.karaf.instance.core:4.0.9]
        at
org.apache.karaf.util.locks.FileLockUtils.execute(FileLockUtils.java:69)[31:org.apache.karaf.instance.core:4.0.9]
        at
org.apache.karaf.util.locks.FileLockUtils.execute(FileLockUtils.java:97)[31:org.apache.karaf.instance.core:4.0.9]
        at
org.apache.karaf.instance.core.internal.InstanceServiceImpl.execute(InstanceServiceImpl.java:247)[31:org.apache.karaf.instance.core:4.0.9]
        ... 15 more

Which has it's origin at the ScriptUtils.execute() with the following props: 

{${command}=""C:\Program Files\Java\jdk1.8.0_131\jre\bin\java.exe"" -server
-Xmx512M -Dcom.sun.management.jmxremote -XX:+UnlockDiagnosticVMOptions
-XX:+UnsyncloadClass 
-Djava.util.logging.config.file=""C:\Users\ygor.santana\Downloads\apache-karaf-4.0.9\instances\test\etc\java.util.logging.properties""
-Djava.endorsed.dirs=""C:\Program
Files\Java\jdk1.8.0_131\jre\jre\lib\endorsed;C:\Program
Files\Java\jdk1.8.0_131\jre\lib\endorsed;C:\Users\ygor.santana\Downloads\apache-karaf-4.0.9\lib\boot\endorsed""
-Djava.ext.dirs=""C:\Program
Files\Java\jdk1.8.0_131\jre\jre\lib\ext;C:\Program
Files\Java\jdk1.8.0_131\jre\lib\ext;C:\Users\ygor.santana\Downloads\apache-karaf-4.0.9\lib\boot\ext""
-Dkaraf.home=""C:\Users\ygor.santana\Downloads\apache-karaf-4.0.9""
-Dkaraf.base=""C:\Users\ygor.santana\Downloads\apache-karaf-4.0.9\instances\test""
-Dkaraf.data=""C:\Users\ygor.santana\Downloads\apache-karaf-4.0.9\instances\test\data""
-Dkaraf.etc=""C:\Users\ygor.santana\Downloads\apache-karaf-4.0.9\instances\test\etc""
-Djava.io.tmpdir=""C:\Users\ygor.santana\Downloads\apache-karaf-4.0.9\instances\test\data\tmp""
-Dkaraf.startLocalConsole=false -Dkaraf.startRemoteShell=true -classpath
""C:\Users\ygor.santana\Downloads\apache-karaf-4.0.9\lib\boot\org.apache.karaf.diagnostic.boot-4.0.9.jar;C:\Users\ygor.santana\Downloads\apache-karaf-4.0.9\lib\boot\org.apache.karaf.jaas.boot-4.0.9.jar;C:\Users\ygor.santana\Downloads\apache-karaf-4.0.9\lib\boot\org.apache.karaf.main-4.0.9.jar;C:\Users\ygor.santana\Downloads\apache-karaf-4.0.9\lib\boot\org.osgi.core-6.0.0.jar""
org.apache.karaf.main.Main server,
${dir}=C:\Users\ygor.santana\Downloads\apache-karaf-4.0.9\instances\test,
${pid.file}=C:\Users\ygor.santana\Downloads\apache-karaf-4.0.9\data\tmp\jpm.5025693745620226432.pid}

and runs the builder with: 

[cscript, /NOLOGO, //E:vbs,
C:\Users\ygor.santana\Downloads\apache-karaf-4.0.9\data\tmp\jpm.8845663376941377652.script]
parameters. 

The same problem occurs when i run via the instance.bat command, i've also
tested under Linux ( 
 CentOS7 and Debian ), where the behavior is ok and it's working as
intended, so it's a problem with windows only. 

It looks like a bug to me, should i open a JIRA request?



--
View this message in context: http://karaf.922171.n3.nabble.com/Child-instances-on-Windows-tp4050423.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Mime
View raw message