3 Replies Latest reply on Jan 22, 2013 5:51 AM by iocanel

    Fabric Container - connect error

    pratik_patel

      Hi,

       

      After creating a fabric container, when I try to connect to the container, it fails with authentication error.

       

      FuseESB:karaf@root> fabric:container-listr-list

                                                     

      root*                          1.0       true    fabric, fabric-ensemble-0000-1, fuse-esb-full success

        camel-container-9090         1.0       true    camel-cluster-server-port-9090 success

      FuseESB:karaf@root>

       

      FuseESB:karaf@root> fabric:container-connect camel-container-camel-container-9090

      Connected

      Password authentication failed

      Connected

      Password authentication failed

      FuseESB:karaf@root>

       

      Fuse logs

      -


      09:11:38,589 | INFO  | NioProcessor-189 | ClientSessionImpl                | 30 - org.apache.sshd.core - 0.8.0 | Session created...

      09:11:38,626 | INFO  | NioProcessor-189 | ClientSessionImpl                | 30 - org.apache.sshd.core - 0.8.0 | Server version string: SSH-2.0-SSHD-CORE-0.8.0

      09:11:38,627 | INFO  | NioProcessor-189 | ClientSessionImpl                | 30 - org.apache.sshd.core - 0.8.0 | Received SSH_MSG_KEXINIT

      09:11:38,631 | INFO  | NioProcessor-189 | DHG1                             | 30 - org.apache.sshd.core - 0.8.0 | Send SSH_MSG_KEXDH_INIT

      09:11:38,652 | INFO  | NioProcessor-189 | DHG1                             | 30 - org.apache.sshd.core - 0.8.0 | Received SSH_MSG_KEXDH_REPLY

      09:11:38,660 | INFO  | NioProcessor-189 | ClientSessionImpl                | 30 - org.apache.sshd.core - 0.8.0 | Received SSH_MSG_NEWKEYS

      09:11:38,660 | INFO  | NioProcessor-189 | ClientSessionImpl                | 30 - org.apache.sshd.core - 0.8.0 | Send SSH_MSG_SERVICE_REQUEST for ssh-userauth

      09:11:38,667 | INFO  | l Console Thread | UserAuthPassword                 | 30 - org.apache.sshd.core - 0.8.0 | Send SSH_MSG_USERAUTH_REQUEST for password

      09:11:38,680 | INFO  | NioProcessor-189 | UserAuthPassword                 | 30 - org.apache.sshd.core - 0.8.0 | Received SSH_MSG_USERAUTH_FAILURE

      09:11:38,682 | INFO  | NioProcessor-189 | ClientSessionImpl                | 30 - org.apache.sshd.core - 0.8.0 | Session null@mtsha1/192.168.6.211:8109 closed

      09:11:38,685 | INFO  | NioProcessor-190 | ClientSessionImpl                | 30 - org.apache.sshd.core - 0.8.0 | Session created...

      09:11:38,694 | INFO  | NioProcessor-190 | ClientSessionImpl                | 30 - org.apache.sshd.core - 0.8.0 | Server version string: SSH-2.0-SSHD-CORE-0.8.0

      09:11:38,694 | INFO  | NioProcessor-190 | ClientSessionImpl                | 30 - org.apache.sshd.core - 0.8.0 | Received SSH_MSG_KEXINIT

      09:11:38,699 | INFO  | NioProcessor-190 | DHG1                             | 30 - org.apache.sshd.core - 0.8.0 | Send SSH_MSG_KEXDH_INIT

      09:11:38,716 | INFO  | NioProcessor-190 | DHG1                             | 30 - org.apache.sshd.core - 0.8.0 | Received SSH_MSG_KEXDH_REPLY

      09:11:38,723 | INFO  | NioProcessor-190 | ClientSessionImpl                | 30 - org.apache.sshd.core - 0.8.0 | Received SSH_MSG_NEWKEYS

      09:11:38,724 | INFO  | NioProcessor-190 | ClientSessionImpl                | 30 - org.apache.sshd.core - 0.8.0 | Send SSH_MSG_SERVICE_REQUEST for ssh-userauth

      09:11:38,724 | INFO  | l Console Thread | UserAuthPassword                 | 30 - org.apache.sshd.core - 0.8.0 | Send SSH_MSG_USERAUTH_REQUEST for password

      09:11:38,726 | INFO  | NioProcessor-190 | UserAuthPassword                 | 30 - org.apache.sshd.core - 0.8.0 | Received SSH_MSG_USERAUTH_FAILURE

      09:11:38,726 | INFO  | NioProcessor-190 | ClientSessionImpl                | 30 - org.apache.sshd.core - 0.8.0 | Session null@mtsha1/192.168.6.211:8109 closed

      09:11:38,726 | INFO  | l Console Thread | Console                          | 15 - org.apache.karaf.shell.console - 2.3.0.fuse-71-047 | Exception caught while executing command

      org.fusesource.fabric.api.FabricAuthenticationException: Failed to authenticate.

         at org.fusesource.fabric.commands.ContainerConnect.executSshCommand(ContainerConnect.java:159)[251:org.fusesource.fabric.fabric-commands:7.1.0.fuse-047]

         at org.fusesource.fabric.commands.ContainerConnect.doExecute(ContainerConnect.java:96)[251:org.fusesource.fabric.fabric-commands:7.1.0.fuse-047]

         at org.apache.karaf.shell.console.OsgiCommandSupport.execute(OsgiCommandSupport.java:38)[15:org.apache.karaf.shell.console:2.3.0.fuse-71-047]

         at org.apache.felix.gogo.commands.basic.AbstractCommand.execute(AbstractCommand.java:35)[15:org.apache.karaf.shell.console:2.3.0.fuse-71-047]

         at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:78)[15:org.apache.karaf.shell.console:2.3.0.fuse-71-047]

         at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:474)[15:org.apache.karaf.shell.console:2.3.0.fuse-71-047]

         at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:400)[15:org.apache.karaf.shell.console:2.3.0.fuse-71-047]

         at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[15:org.apache.karaf.shell.console:2.3.0.fuse-71-047]

         at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)[15:org.apache.karaf.shell.console:2.3.0.fuse-71-047]

         at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)[15:org.apache.karaf.shell.console:2.3.0.fuse-71-047]

         at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89)[15:org.apache.karaf.shell.console:2.3.0.fuse-71-047]

         at org.apache.karaf.shell.console.jline.Console.run(Console.java:171)[15:org.apache.karaf.shell.console:2.3.0.fuse-71-047]

         at org.apache.karaf.shell.console.jline.DelayedStarted.run(DelayedStarted.java:61)[15:org.apache.karaf.shell.console:2.3.0.fuse-71-047]

       

      What can be the problem?

       

      Thanks,

      Pratik

        • 1. Re: Fabric Container - connect error
          iocanel

          Hi Pratik,

           

          When you are creating a fabric, you are prompted to either create a user or import one from etc/users.properties. Those credentials will get cached into the session of the shell and fabric:container-connect will attempt to reuse those. This also applies when you connect later on to the container using ssh.

           

          The expected behavior is to try the cached credentials first and upon failure to prompt you for username/password. The fact that you were not prompted for username password makes me think, that for some reason stale values have been stored in your session.

           

          So, I'd say that this seems like a bug.

           

          Can you please provide some more details with the step you used since you connected to the session (the commands entered since you started fabric or since you sshed into it)?

          • 2. Re: Fabric Container - connect error
            pratik_patel

            Hi Ioannis,

             

            Thanks for the reply. Too me also, it looks like caching issue. Because when I tried to create containers with different names and different profiles, I did not face this problem.

             

            Attached is the list of commands that had been executed before I ended up into this issue.

             

            Regards,

            Pratik

            • 3. Re: Fabric Container - connect error
              iocanel

              I think that in your cache its not just "stale credentials". I think that in your case there must be a forgotten instance/container running.

               

              In any case, after the first authentication failure, you should be prompted for credentials.

              I logged a jira about that: http://fusesource.com/issues/browse/FABRIC-357