Why Fuse fabric node is not able to a push to Fabric Git store and throws HTTP 401 Unauthorized error ?

Solution Unverified - Updated -

Issue

  • We configured 2 fabric nodes. The first host is "aaa.com" and the second host is "bbb.com"

  • The fabric was created on aaa.com.

  • Host "bbb.com" was joined to this fabric as a managed container (TestContainer). This causes the fabric profile to be deployed into the TestContainer. When this container starts up it tries to connect to the GitDataStore on "aaa.com". This is failing as the http call is UnAuthorized (401).

  • We are using LDAP authentication for my karaf Jaas realm. This works for the primary fabric node on "aaa.com". The "ldap-module.xml" file is in default profile in the TestContainer.

  • Below is the log from TestContainer.

22:44:07,650 | DEBUG | pool-16-thread-1 | HttpURLConnection                |  -  -  | sun.net.www.MessageHeader@2d4747764 pairs: {null: HTTP/1.1 401 Unauthorized}{WWW-Authenticate: Basic realm="karaf"}{Content-Length: 0}{Server: Jetty(8.1.14.v20131031)}
22:44:07,650 | DEBUG | pool-16-thread-1 | GitDataStore                     | 86 - io.fabric8.fabric-git - 1.0.0.redhat-379 | Push failed. This will be ignored.
org.eclipse.jgit.api.errors.TransportException: http://atlesbfabqv01:8181/git/fabric/: not authorized
        at org.eclipse.jgit.api.PushCommand.call(PushCommand.java:160)[86:io.fabric8.fabric-git:1.0.0.redhat-379]
        at io.fabric8.git.internal.GitDataStore.doPush(GitDataStore.java:941)[86:io.fabric8.fabric-git:1.0.0.redhat-379]
        at io.fabric8.git.internal.GitDataStore.gitOperation(GitDataStore.java:902)[86:io.fabric8.fabric-git:1.0.0.redhat-379]
        at io.fabric8.git.internal.GitDataStore.gitOperation(GitDataStore.java:857)[86:io.fabric8.fabric-git:1.0.0.redhat-379]
        at io.fabric8.git.internal.GitDataStore.gitOperation(GitDataStore.java:852)[86:io.fabric8.fabric-git:1.0.0.redhat-379]
        at io.fabric8.git.internal.GitDataStore.push(GitDataStore.java:1216)[86:io.fabric8.fabric-git:1.0.0.redhat-379]
        at io.fabric8.git.internal.GitDataStore$1.run(GitDataStore.java:166)[86:io.fabric8.fabric-git:1.0.0.redhat-379]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_51]
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)[:1.7.0_51]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)[:1.7.0_51]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)[:1.7.0_51]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)[:1.7.0_51]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[:1.7.0_51]
        at java.lang.Thread.run(Thread.java:744)[:1.7.0_51]
Caused by: org.eclipse.jgit.errors.TransportException: http://atlesbfabqv01:8181/git/fabric/: not authorized
        at org.eclipse.jgit.transport.TransportHttp.connect(TransportHttp.java:479)[86:io.fabric8.fabric-git:1.0.0.redhat-379]
        at org.eclipse.jgit.transport.TransportHttp.openPush(TransportHttp.java:398)[86:io.fabric8.fabric-git:1.0.0.redhat-379]
        at org.eclipse.jgit.transport.PushProcess.execute(PushProcess.java:154)[86:io.fabric8.fabric-git:1.0.0.redhat-379]
        at org.eclipse.jgit.transport.Transport.push(Transport.java:1170)[86:io.fabric8.fabric-git:1.0.0.redhat-379]
        at org.eclipse.jgit.api.PushCommand.call(PushCommand.java:156)[86:io.fabric8.fabric-git:1.0.0.redhat-379]
        ... 13 more

Environment

  • JBoss Fuse
    • 6.1.0

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content