5 Replies Latest reply: May 3, 2012 8:52 AM by New Gatein RSS

GateIn Management CLI  - scp

New Gatein Newbie

The GateIn Management CLI imports and exports fine using a SSH (putty) session but results in following error while trying to export or import using SCP as suggested in "https://docs.jboss.org/author/display/GTNPORTAL/GateIn+Management"

 

For e.g, executing command scp -P 2000 'root@localhost:portal:/mop' mop.zip throws:

 

16:50:19,203 INFO  [ChannelSession] Received channel request: exec

16:50:19,203 INFO  [ChannelSession] Executing command: scp -f portal:/mop

16:50:19,203 WARN  [ServerSession] Exception caught

java.lang.IllegalStateException: No match found

        at java.util.regex.Matcher.group(Matcher.java:468)

        at org.gatein.management.cli.crash.commands.scp.SCPCommand.parseSCPAction(SCPCommand.java:229)

        at org.gatein.management.cli.crash.commands.scp.SCPCommand.<init>(SCPCommand.java:63)

        at org.gatein.management.cli.crash.commands.scp.SourceCommand.<init>(SourceCommand.java:47)

        at org.gatein.management.cli.crash.commands.scp.SCPCommandPlugin.createCommand(SCPCommandPlugin.java:51)

        at org.crsh.ssh.term.scp.SCPCommandFactory.createCommand(SCPCommandFactory.java:53)

        at org.apache.sshd.server.channel.ChannelSession.handleExec(ChannelSession.java:391)

        at org.apache.sshd.server.channel.ChannelSession.handleRequest(ChannelSession.java:237)

        at org.apache.sshd.server.channel.ChannelSession.handleRequest(ChannelSession.java:199)

        at org.apache.sshd.common.session.AbstractSession.channelRequest(AbstractSession.java:999)

        at org.apache.sshd.server.session.ServerSession.handleMessage(ServerSession.java:210)

        at org.apache.sshd.common.session.AbstractSession.decode(AbstractSession.java:522)

        at org.apache.sshd.common.session.AbstractSession.messageReceived(AbstractSession.java:225)

        at org.apache.sshd.common.AbstractSessionIoHandler.messageReceived(AbstractSessionIoHandler.java:58)

        at org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.messageReceived(DefaultIoFilterChain.java:71

3)

        at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)

        at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46)

        at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:7

93)

        at org.apache.mina.core.filterchain.IoFilterAdapter.messageReceived(IoFilterAdapter.java:119)

        at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)

        at org.apache.mina.core.filterchain.DefaultIoFilterChain.fireMessageReceived(DefaultIoFilterChain.java:426)

        at org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPollingIoProcessor.java:638)

        at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:598)

        at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:587)

        at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$400(AbstractPollingIoProcessor.java:61)

        at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:969)

        at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64)

        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

        at java.lang.Thread.run(Thread.java:662)

16:50:19,203 INFO  [ServerSession] Closing session

16:50:19,203 INFO  [ChannelSession] Closing channel 0 immediately

 

 

 

Not sure what is it trying to match? Trying to remove the "portal" as scp -P 2000 'root@localhost:/mop' mop.zip results in


 

10:08:02,500 INFO  [ChannelSession] Send SSH_MSG_CHANNEL_EOF on channel 0

10:08:02,500 INFO  [ChannelSession] Send SSH_MSG_CHANNEL_REQUEST exit-status on channel 0

10:08:02,500 INFO  [ChannelSession] Send SSH_MSG_CHANNEL_CLOSE on channel 0

10:08:02,500 INFO  [ServerSession] Received SSH_MSG_IGNORE

10:08:02,500 INFO  [ChannelSession] Received SSH_MSG_CHANNEL_CLOSE on channel 0

10:08:02,515 INFO  [ServerSession] Closing session

10:09:08,703 INFO  [ServerSession] Session created...

10:09:08,781 INFO  [ServerSession] Client version string: SSH-2.0-PuTTY_Release_0.62

10:09:08,781 INFO  [ServerSession] Received SSH_MSG_KEXINIT

10:09:08,859 INFO  [DHG14] Received SSH_MSG_KEXDH_INIT

10:09:08,937 INFO  [DHG14] Send SSH_MSG_KEXDH_REPLY

10:09:08,937 INFO  [ServerSession] Send SSH_MSG_NEWKEYS

10:09:08,968 INFO  [ServerSession] Received SSH_MSG_NEWKEYS

10:09:08,968 INFO  [ServerSession] Received SSH_MSG_IGNORE

10:09:08,968 INFO  [ServerSession] Received SSH_MSG_SERVICE_REQUEST 'ssh-userauth'

10:09:08,968 INFO  [ServerSession] Accepting user authentication request

10:09:08,968 INFO  [ServerSession] Authorized authentication methods: password

10:09:08,984 INFO  [ServerSession] Received SSH_MSG_IGNORE

10:09:08,984 INFO  [ServerSession] Received SSH_MSG_USERAUTH_REQUEST

10:09:08,984 INFO  [ServerSession] Authenticating user 'root' with method 'none'

10:09:08,984 INFO  [ServerSession] Unsupported authentication method 'none'

10:09:08,984 INFO  [ServerSession] Received SSH_MSG_IGNORE

10:09:08,984 INFO  [ServerSession] Received SSH_MSG_USERAUTH_REQUEST

10:09:08,984 INFO  [ServerSession] Authenticating user 'root' with method 'password'

10:09:09,000 INFO  [ServerSession] Authentication succeeded

10:09:09,000 INFO  [ServerSession] Received SSH_MSG_IGNORE

10:09:09,000 INFO  [ServerSession] Received SSH_MSG_IGNORE

10:09:09,000 INFO  [ServerSession] Received SSH_MSG_CHANNEL_OPEN session

10:09:09,000 INFO  [ServerSession] Received SSH_MSG_IGNORE

10:09:09,000 INFO  [ChannelSession] Received SSH_MSG_CHANNEL_REQUEST on channel 0

10:09:09,015 INFO  [ChannelSession] Received channel request: simple@putty.projects.tartarus.org

10:09:09,015 INFO  [ServerSession] Received SSH_MSG_IGNORE

10:09:09,015 INFO  [ChannelSession] Received SSH_MSG_CHANNEL_REQUEST on channel 0

10:09:09,015 INFO  [ChannelSession] Received channel request: exec

10:09:09,015 INFO  [ChannelSession] Executing command: scp -f /mop

10:09:09,015 INFO  [ServerSession] Received SSH_MSG_IGNORE

10:09:09,015 INFO  [MembershipDAOImpl] Identity operation error:

java.lang.IllegalArgumentException: Group id or User name cannot be null

        at org.picketlink.idm.impl.api.session.managers.AbstractManager.checkNotNullArgument(AbstractManager.java:271)

        at org.picketlink.idm.impl.api.session.managers.RoleManagerImpl.findRoles(RoleManagerImpl.java:994)

        at org.picketlink.idm.impl.api.session.managers.RoleManagerImpl.findRoles(RoleManagerImpl.java:1002)

        at org.exoplatform.services.organization.idm.MembershipDAOImpl.findMembershipsByUser(MembershipDAOImpl.java:699)

 

        at org.exoplatform.services.organization.auth.OrganizationAuthenticatorImpl.createIdentity(OrganizationAuthentic

atorImpl.java:99)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

        at java.lang.reflect.Method.invoke(Method.java:597)

        at org.gatein.management.cli.crash.commands.GateInCommand.login(GateInCommand.java:77)

        at org.gatein.management.cli.crash.commands.scp.SCPCommand$SCPManagementCommand.login(SCPCommand.java:251)

        at org.gatein.management.cli.crash.commands.scp.SCPCommand.execute(SCPCommand.java:117)

        at org.gatein.management.cli.crash.commands.scp.SCPCommand.run(SCPCommand.java:95)

        at java.lang.Thread.run(Thread.java:662)

10:09:09,015 INFO  [MembershipDAOImpl] Identity operation error:

java.lang.IllegalArgumentException: User name cannot be null

        at org.picketlink.idm.impl.api.session.managers.AbstractManager.checkNotNullArgument(AbstractManager.java:271)

        at org.picketlink.idm.impl.api.session.managers.RelationshipManagerImpl.findAssociatedGroups(RelationshipManager

Impl.java:1163)

        at org.exoplatform.services.organization.idm.MembershipDAOImpl.findMembershipsByUser(MembershipDAOImpl.java:740)

 

        at org.exoplatform.services.organization.auth.OrganizationAuthenticatorImpl.createIdentity(OrganizationAuthentic

atorImpl.java:99)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

        at java.lang.reflect.Method.invoke(Method.java:597)

        at org.gatein.management.cli.crash.commands.GateInCommand.login(GateInCommand.java:77)

        at org.gatein.management.cli.crash.commands.scp.SCPCommand$SCPManagementCommand.login(SCPCommand.java:251)

        at org.gatein.management.cli.crash.commands.scp.SCPCommand.execute(SCPCommand.java:117)

        at org.gatein.management.cli.crash.commands.scp.SCPCommand.run(SCPCommand.java:95)

        at java.lang.Thread.run(Thread.java:662)

10:09:09,015 ERROR [SCPCommand] Exception during command execution.

org.crsh.command.ScriptException: Could not authenticate for user 'null'

        at org.gatein.management.cli.crash.commands.GateInCommand.login(GateInCommand.java:110)

        at org.gatein.management.cli.crash.commands.scp.SCPCommand$SCPManagementCommand.login(SCPCommand.java:251)

        at org.gatein.management.cli.crash.commands.scp.SCPCommand.execute(SCPCommand.java:117)

        at org.gatein.management.cli.crash.commands.scp.SCPCommand.run(SCPCommand.java:95)

        at java.lang.Thread.run(Thread.java:662)

Caused by: java.lang.reflect.InvocationTargetException

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

        at java.lang.reflect.Method.invoke(Method.java:597)

        at org.gatein.management.cli.crash.commands.GateInCommand.login(GateInCommand.java:82)

        ... 4 more

Caused by: java.lang.NullPointerException

        at java.util.concurrent.ConcurrentHashMap.put(ConcurrentHashMap.java:882)

        at org.exoplatform.services.security.IdentityRegistry.register(IdentityRegistry.java:117)

        ... 9 more

10:09:09,015 INFO  [ChannelSession] Send SSH_MSG_CHANNEL_EOF on channel 0

10:09:09,031 INFO  [ChannelSession] Send SSH_MSG_CHANNEL_REQUEST exit-status on channel 0

10:09:09,031 INFO  [ChannelSession] Send SSH_MSG_CHANNEL_CLOSE on channel 0

10:09:09,031 INFO  [ServerSession] Received SSH_MSG_IGNORE

10:09:09,031 INFO  [ChannelSession] Received SSH_MSG_CHANNEL_CLOSE on channel 0

10:09:09,031 INFO  [ServerSession] Closing session

 

Using GateIn-3.2.0.Final-jbossas5

 

Any suggestions?