[arquillian-issues] [JBoss JIRA] (ARQ-911) Report better error if ssh key is not registered with OpenShift account

Dan Allen (JIRA) jira-events at lists.jboss.org
Thu May 3 10:08:17 EDT 2012


Dan Allen created ARQ-911:
-----------------------------

             Summary: Report better error if ssh key is not registered with OpenShift account
                 Key: ARQ-911
                 URL: https://issues.jboss.org/browse/ARQ-911
             Project: Arquillian
          Issue Type: Enhancement
      Security Level: Public (Everyone can see)
          Components: OpenShift Containers
    Affects Versions: openshift_1.0.0.Beta1
            Reporter: Dan Allen
            Assignee: Karel Piwko
            Priority: Critical


The OpenShift container clones the remote git repository configured in arquillian.xml into a temporary directory to exchange files with the test application. The clone is performed over an SSH connection that's negotiated using a public/private RSA key pair. If the public key is not registered with the account, the test fails with the following exception:

{quote}
Exception caught during execution of fetch command
TransportException session is down
{quote}

This sends the developer on a wild goose chase because this error is reported for just about any kind of SSH connection failure.

The problem is revealed if you attempt to ssh into the account:

{quote}
Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
{quote}

It would be nice if we could find a way to get this message to be passed through. However, it might be even more useful if we recognize that the connection failure is mostly likely the result of the key not being registered and we can advice the developer

a) how to register it (the client tool command)
b) how to check it

{code}
rhc sshkey add -k ~/.ssh/libra_id_rsa.pub -i libra
ssh -i ~/.ssh/libra_id_rsa 123456789123456789 at TEST_APP-USER_DOMAIN.rhcloud.com
{code}

The full stack trace of the exception is below:

{code}
org.eclipse.jgit.api.errors.JGitInternalException: Exception caught during execution of fetch command
	at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:138)
	at org.eclipse.jgit.api.CloneCommand.fetch(CloneCommand.java:175)
	at org.eclipse.jgit.api.CloneCommand.call(CloneCommand.java:121)
	at org.jboss.arquillian.container.openshift.express.OpenShiftRepository.initialize(OpenShiftRepository.java:235)
	at org.jboss.arquillian.container.openshift.express.OpenShiftRepository.<init>(OpenShiftRepository.java:75)
	at org.jboss.arquillian.container.openshift.express.OpenShiftExpressContainer.start(OpenShiftExpressContainer.java:102)
	at org.jboss.arquillian.container.impl.ContainerImpl.start(ContainerImpl.java:198)
	at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController$8.perform(ContainerLifecycleController.java:163)
	at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController$8.perform(ContainerLifecycleController.java:157)
	at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController.forContainer(ContainerLifecycleController.java:255)
	at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController.startContainer(ContainerLifecycleController.java:156)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
	at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
	at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
	at org.jboss.arquillian.container.impl.client.ContainerDeploymentContextHandler.createContainerContext(ContainerDeploymentContextHandler.java:57)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
	at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
	at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)
	at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)
	at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)
	at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController$2.perform(ContainerLifecycleController.java:77)
	at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController$2.perform(ContainerLifecycleController.java:70)
	at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController.forEachSuiteContainer(ContainerLifecycleController.java:221)
	at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController.startSuiteContainers(ContainerLifecycleController.java:69)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
	at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
	at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
	at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)
	at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)
	at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)
	at org.jboss.arquillian.container.test.impl.client.ContainerEventController.execute(ContainerEventController.java:86)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
	at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
	at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
	at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:60)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
	at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
	at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)
	at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)
	at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.beforeSuite(EventTestRunnerAdaptor.java:68)
	at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:97)
	at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:236)
	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:134)
	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:113)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
	at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
	at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:103)
	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:74)
Caused by: org.eclipse.jgit.errors.TransportException: ssh://123456789123456789@TEST_APP-USER_DOMAIN.rhcloud.com/~/git/TEST_APP.git/: session is down
	at org.eclipse.jgit.transport.JschSession$JschProcess.<init>(JschSession.java:154)
	at org.eclipse.jgit.transport.JschSession$JschProcess.<init>(JschSession.java:118)
	at org.eclipse.jgit.transport.JschSession.exec(JschSession.java:91)
	at org.eclipse.jgit.transport.TransportGitSsh$SshFetchConnection.<init>(TransportGitSsh.java:248)
	at org.eclipse.jgit.transport.TransportGitSsh.openFetch(TransportGitSsh.java:147)
	at org.eclipse.jgit.transport.FetchProcess.executeImp(FetchProcess.java:127)
	at org.eclipse.jgit.transport.FetchProcess.execute(FetchProcess.java:113)
	at org.eclipse.jgit.transport.Transport.fetch(Transport.java:1062)
	at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:129)
	... 72 more
Caused by: com.jcraft.jsch.JSchException: session is down
	at com.jcraft.jsch.Session.openChannel(Session.java:762)
	at org.eclipse.jgit.transport.JschSession$JschProcess.<init>(JschSession.java:147)
	... 80 more
{code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the arquillian-issues mailing list