Hi Chamara, Try like below ssh [email protected] 'export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/ubuntu/java/jdk1.8.0_121/bin;echo $PATH;./esb/wso2esb-5.0.0/bin/wso2server.sh'
Thanks Thusitha On Tue, Apr 18, 2017 at 5:18 PM, Chamara Ariyarathne <[email protected]> wrote: > I am afraid if this is the correct explanation. What I meant to say above > is; > Consider it is machine1 and machine2 and I'm trying to ssh from 2 to 1. > > PATH in machine1: > $ echo $PATH > /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/ > bin:/usr/games:/usr/local/games:/home/ubuntu/java/jdk1.8.0_121/bin > > PATH in machine2: (I didn't set java there) > $ echo $PATH > /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/ > bin:/usr/games:/usr/local/games:/snap/bin > > and If I read the PATH variable of machine1 from machine2 via ssh: > $ ssh -i chamaraa.pem [email protected] 'echo $PATH' > $PATH:$JAVA_HOME/bin > > So that's the difference with ssh I'm seeing. > > On Tue, Apr 18, 2017 at 4:51 PM, Bhathiya Jayasekara <[email protected]> > wrote: > >> Yes, that's the problem. When java was installed, $PATH variable has been >> replaced. >> >> In remote machine set it correctly. >> >> *export >> PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:$JAVA_HOME/bin* >> >> Thanks, >> Bhathiya >> >> >> >> >> >> On Tue, Apr 18, 2017 at 4:46 PM, Chamara Ariyarathne <[email protected]> >> wrote: >> >>> Well, it's like this. In the same machine: >>> >>> $ echo $PATH >>> /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin >>> :/usr/games:/usr/local/games:/home/ubuntu/java/jdk1.8.0_121/bin >>> >>> In the remote machine: >>> >>> $ ssh -i chamaraa.pem [email protected] 'echo $PATH' >>> $PATH:$JAVA_HOME/bin >>> >>> On Tue, Apr 18, 2017 at 3:47 PM, Bhathiya Jayasekara <[email protected]> >>> wrote: >>> >>>> Maybe the $PATH variable is not set properly. >>>> >>>> @Chamara: What's the output of echo $PATH? >>>> >>>> Thanks, >>>> Bhathiya >>>> >>>> On Tue, Apr 18, 2017 at 2:49 PM, Thusitha Thilina Dayaratne < >>>> [email protected]> wrote: >>>> >>>>> Hi Chamara, >>>>> >>>>> ubuntu@esbperf-prototype-2:~$ ssh -i chamaraa.pem [email protected] >>>>>> .168 './esb/wso2esb-5.0.0/bin/wso2server.sh' >>>>>> >>>>>> >>>>>> *./esb/wso2esb-5.0.0/bin/wso2server.sh: 1: >>>>>> ./esb/wso2esb-5.0.0/bin/wso2server.sh: uname: not >>>>>> found./esb/wso2esb-5.0.0/bin/wso2server.sh: 1: >>>>>> ./esb/wso2esb-5.0.0/bin/wso2server.sh: dirname: not >>>>>> found./esb/wso2esb-5.0.0/bin/wso2server.sh: 1: >>>>>> ./esb/wso2esb-5.0.0/bin/wso2server.sh: grep: not found* >>>>>> Starting WSO2 Carbon (in unsupported JDK) >>>>>> [ERROR] CARBON is supported only on JDK 1.7 and 1.8 >>>>>> JAVA_HOME environment variable is set to >>>>>> /home/ubuntu/java/jdk1.8.0_121 >>>>>> *CARBON_HOME environment variable is set to /* >>>>>> >>>>>> *./esb/wso2esb-5.0.0/bin/wso2server.sh: 264: >>>>>> ./esb/wso2esb-5.0.0/bin/wso2server.sh: rm: not >>>>>> found./esb/wso2esb-5.0.0/bin/wso2server.sh: 271: >>>>>> ./esb/wso2esb-5.0.0/bin/wso2server.sh: awk: not found* >>>>>> Using Java memory options: -Xms256m -Xmx1024m -XX:MaxPermSize=256m >>>>>> Java HotSpot(TM) 64-Bit Server VM warning: ignoring option >>>>>> MaxPermSize=256m; support was removed in 8.0 >>>>>> Could not load Logmanager "org.apache.juli.ClassLoaderLogManager" >>>>>> java.lang.ClassNotFoundException: org.apache.juli.ClassLoaderLog >>>>>> Manager >>>>>> at java.net.URLClassLoader.findClass(URLClassLoader.java:381) >>>>>> at java.lang.ClassLoader.loadClass(ClassLoader.java:424) >>>>>> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) >>>>>> at java.lang.ClassLoader.loadClass(ClassLoader.java:357) >>>>>> at java.util.logging.LogManager$1.run(LogManager.java:195) >>>>>> at java.util.logging.LogManager$1.run(LogManager.java:181) >>>>>> at java.security.AccessController.doPrivileged(Native Method) >>>>>> at java.util.logging.LogManager.<clinit>(LogManager.java:181) >>>>>> at java.util.logging.Logger.demandLogger(Logger.java:448) >>>>>> at java.util.logging.Logger.getLogger(Logger.java:502) >>>>>> at com.sun.jmx.remote.util.ClassLogger.<init>(ClassLogger.java:55) >>>>>> at sun.management.jmxremote.ConnectorBootstrap.<clinit>(Connect >>>>>> orBootstrap.java:846) >>>>>> at sun.management.Agent.startLocalManagementAgent(Agent.java:138) >>>>>> at sun.management.Agent.startAgent(Agent.java:260) >>>>>> at sun.management.Agent.startAgent(Agent.java:447) >>>>>> Error: Could not find or load main class >>>>>> org.wso2.carbon.bootstrap.Bootstrap >>>>> >>>>> According to the trace, it seems some of the Linux commands are not >>>>> available on the host. Therefore IMHO this is cause due to the CLASS_PATH >>>>> is not properly getting set. >>>>> >>>>> Thanks >>>>> Thusitha >>>>> >>>>> On Tue, Apr 18, 2017 at 2:43 PM, Chamara Ariyarathne < >>>>> [email protected]> wrote: >>>>> >>>>>> I'm trying to run ESB via an ssh session. The issue is like >>>>>> following. Any idea how to make it work? >>>>>> >>>>>> ubuntu@esbperf-prototype-2:~$ ssh -i chamaraa.pem >>>>>> [email protected] './esb/wso2esb-5.0.0/bin/wso2server.sh' >>>>>> ./esb/wso2esb-5.0.0/bin/wso2server.sh: 1: >>>>>> ./esb/wso2esb-5.0.0/bin/wso2server.sh: uname: not found >>>>>> ./esb/wso2esb-5.0.0/bin/wso2server.sh: 1: >>>>>> ./esb/wso2esb-5.0.0/bin/wso2server.sh: dirname: not found >>>>>> ./esb/wso2esb-5.0.0/bin/wso2server.sh: 1: >>>>>> ./esb/wso2esb-5.0.0/bin/wso2server.sh: grep: not found >>>>>> Starting WSO2 Carbon (in unsupported JDK) >>>>>> [ERROR] CARBON is supported only on JDK 1.7 and 1.8 >>>>>> JAVA_HOME environment variable is set to >>>>>> /home/ubuntu/java/jdk1.8.0_121 >>>>>> CARBON_HOME environment variable is set to / >>>>>> ./esb/wso2esb-5.0.0/bin/wso2server.sh: 264: >>>>>> ./esb/wso2esb-5.0.0/bin/wso2server.sh: rm: not found >>>>>> ./esb/wso2esb-5.0.0/bin/wso2server.sh: 271: >>>>>> ./esb/wso2esb-5.0.0/bin/wso2server.sh: awk: not found >>>>>> Using Java memory options: -Xms256m -Xmx1024m -XX:MaxPermSize=256m >>>>>> Java HotSpot(TM) 64-Bit Server VM warning: ignoring option >>>>>> MaxPermSize=256m; support was removed in 8.0 >>>>>> Could not load Logmanager "org.apache.juli.ClassLoaderLogManager" >>>>>> java.lang.ClassNotFoundException: org.apache.juli.ClassLoaderLog >>>>>> Manager >>>>>> at java.net.URLClassLoader.findClass(URLClassLoader.java:381) >>>>>> at java.lang.ClassLoader.loadClass(ClassLoader.java:424) >>>>>> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) >>>>>> at java.lang.ClassLoader.loadClass(ClassLoader.java:357) >>>>>> at java.util.logging.LogManager$1.run(LogManager.java:195) >>>>>> at java.util.logging.LogManager$1.run(LogManager.java:181) >>>>>> at java.security.AccessController.doPrivileged(Native Method) >>>>>> at java.util.logging.LogManager.<clinit>(LogManager.java:181) >>>>>> at java.util.logging.Logger.demandLogger(Logger.java:448) >>>>>> at java.util.logging.Logger.getLogger(Logger.java:502) >>>>>> at com.sun.jmx.remote.util.ClassLogger.<init>(ClassLogger.java:55) >>>>>> at sun.management.jmxremote.ConnectorBootstrap.<clinit>(Connect >>>>>> orBootstrap.java:846) >>>>>> at sun.management.Agent.startLocalManagementAgent(Agent.java:138) >>>>>> at sun.management.Agent.startAgent(Agent.java:260) >>>>>> at sun.management.Agent.startAgent(Agent.java:447) >>>>>> Error: Could not find or load main class >>>>>> org.wso2.carbon.bootstrap.Bootstrap >>>>>> >>>>>> >>>>>> -- >>>>>> *Chamara Ariyarathne* >>>>>> WSO2 Inc; http://www.wso2.com/ >>>>>> Mobile; *+94772786766 <077%20278%206766>* >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> Thusitha Dayaratne >>>>> WSO2 Inc. - lean . enterprise . middleware | wso2.com >>>>> >>>>> Mobile +94712756809 <071%20275%206809> >>>>> Blog alokayasoya.blogspot.com >>>>> About http://about.me/thusithathilina >>>>> <http://wso2.com/signature> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Dev mailing list >>>>> [email protected] >>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>>>> >>>>> >>>> >>>> >>>> -- >>>> *Bhathiya Jayasekara* >>>> *Associate Technical Lead,* >>>> *WSO2 inc., http://wso2.com <http://wso2.com>* >>>> >>>> *Phone: +94715478185 <071%20547%208185>* >>>> *LinkedIn: http://www.linkedin.com/in/bhathiyaj >>>> <http://www.linkedin.com/in/bhathiyaj>* >>>> *Twitter: https://twitter.com/bhathiyax <https://twitter.com/bhathiyax>* >>>> *Blog: http://movingaheadblog.blogspot.com >>>> <http://movingaheadblog.blogspot.com/>* >>>> >>> >>> >>> >>> -- >>> *Chamara Ariyarathne* >>> WSO2 Inc; http://www.wso2.com/ >>> Mobile; *+94772786766 <077%20278%206766>* >>> >> >> >> >> -- >> *Bhathiya Jayasekara* >> *Associate Technical Lead,* >> *WSO2 inc., http://wso2.com <http://wso2.com>* >> >> *Phone: +94715478185 <071%20547%208185>* >> *LinkedIn: http://www.linkedin.com/in/bhathiyaj >> <http://www.linkedin.com/in/bhathiyaj>* >> *Twitter: https://twitter.com/bhathiyax <https://twitter.com/bhathiyax>* >> *Blog: http://movingaheadblog.blogspot.com >> <http://movingaheadblog.blogspot.com/>* >> > > > > -- > *Chamara Ariyarathne* > WSO2 Inc; http://www.wso2.com/ > Mobile; *+94772786766 <+94%2077%20278%206766>* > -- Thusitha Dayaratne WSO2 Inc. - lean . enterprise . middleware | wso2.com Mobile +94712756809 Blog alokayasoya.blogspot.com About http://about.me/thusithathilina <http://wso2.com/signature>
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
