karaf 2 ssh连接karaf

1 client不能工作
karaf 2 ssh连接karaf_第1张图片

执行client脚本报错:Failed to get the session.
再执行shel脚本即可看到一场信息:

    Exception in thread "main" java.lang.NoClassDefFoundError: org/osgi/util/tracker/ServiceTracker
            at org.apache.karaf.shell.console.impl.jline.ConsoleImpl.createSecuredCommandProcessor(ConsoleImpl.java:227)
            at org.apache.karaf.shell.console.impl.jline.ConsoleImpl.run(ConsoleImpl.java:181)
            at org.apache.karaf.shell.console.impl.Main.run(Main.java:214)
            at org.apache.karaf.shell.console.impl.Main.run(Main.java:158)
            at org.apache.karaf.shell.console.impl.Main.run(Main.java:73)
            at org.apache.karaf.shell.console.impl.Main.main(Main.java:54)
    Caused by: java.lang.ClassNotFoundException: org.osgi.util.tracker.ServiceTracker
            at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
            at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
            at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
            ... 6 more

官方说法是3.0.1版本解决。!!!!

2 ssh链接karaf
通过xshell工具连接karaf
karaf 2 ssh连接karaf_第2张图片

账户和密码:karaf/karaf .端口是${KARAF_HOME}/etc/org.apache.karaf.shell.cfg文件中定义
sshPort属性对应的值就是ssh链接端口
成功之后 即可像在local console中一样管理karaf ,部署app了.

你可能感兴趣的:(karaf 2 ssh连接karaf)