There was an error: <repository> connection failed

Started by J, April 13, 2023, 12:29:33 PM

Previous topic - Next topic

J

Hi,

I get this very unspecific error when connecting to our bitbucket server. What is strange is that I have the same work environment as my colleagues (managed by company), my git client works fine separately and I can connect normally to our repository that way. For the rest of the team Archi and the coArchi plugin also just works without any special changes (no https specific config changes etc.). No token is used, just user credentials.

However for me, first time after set up if I import remote repo, it tries to fetch and does something for a while. Then after some seconds fails with "connection failed". I can't find that specific error documented anywhere or covered on the forum though of course there are various connection problems people have. None with this specific error that I can find.

I don't think it is needed as my colleagues have same set up, but I tried some of the various https configs suggested however I am not sure if that is really the issue. None of those things gave me more insights or worked (e.g. use OS cert, switch off cert validation etc.).

I am a bit stumped and I can't find any coArchi specific logging to find more information.

I would appreciate some help with solving this and perhaps this will help others in future that get exactly the same "connection failed" message.

Thanks,
Julian


Jean-Baptiste Sarrodie

Hi,

This is a catch-all error when it is impossible to connect to the git server (the underlying framework can't provide more information). It should not be credentials related (i.e. not an authentication issue).

Usual things to double-check:
- Do you have direct access to the git server or do you rely on a proxy. If needed, configure the proxy from within Archi's Collaboration preferences (reminder: coArchi still uses its own proxy settings)
- If you use an internal proxy relying on a local certificate chain, make sure you imported the certificate chain into the cacert file included with Archi's JVM (in this case look at this)

Regards,

JB
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

J

Hi,

Thanks for your reply. Took me a while to get to. No, there is no proxy. In Browser, no manual proxy is set, no setup script is specified and even automatically detect settings is off. Other tools like Maven connect fine without proxy.

Other ideas that are not proxy related?

Thanks,
Julian

J

#3
Note, the git client from windows cmd connects directly also without using proxy.

I do expect there is probably some "man-in-the-middle" proxying going on that is not transparent to my workstation, so I will have a go anyway at adding certificate chain. Hopefully that will solve it, but none of my colleagues are having to do that which is odd.

Thanks

J

So I successfully imported all the root and intermediate certificates but still the same issue. I am wondering if it could perhaps be related to special characters used in the password, though you said it should not be authentication related.

Jean-Baptiste Sarrodie

Hi,

That's really weird. There have been some people reporting some strange conflicts with coArchi detecting local git client configuration and trying to use it which turned into some connexion issues. This should not happen because coArchi relies on its own internal, java based, git implementation, but this happens. So maybe you could do a test and temporarily remove (or at least rename) you git config files and try again in Archi.

Quote from: J on April 18, 2023, 11:21:28 AMSo I successfully imported all the root and intermediate certificates but still the same issue.

Are you and your colleagues using the JVM installed with Archi or some other local one ?

Quote from: J on April 18, 2023, 11:21:28 AMI am wondering if it could perhaps be related to special characters used in the password, though you said it should not be authentication related.


I don't think it is related to this, but do a test with a simplified password (or a token) to be sure.

Regards,

JB
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

J

Quote from: Jean-Baptiste Sarrodie on April 18, 2023, 13:49:06 PMSo maybe you could do a test and temporarily remove (or at least rename) you git config files and try again in Archi.

Will do!

Quote from: Jean-Baptiste Sarrodie on April 18, 2023, 13:49:06 PMAre you and your colleagues using the JVM installed with Archi or some other local one ?

I installed the certs into the archi jre specifically. We do have other jvms installed but we are not configuring archi to use these. My team members did nothing but install and it worked. It even worked for my product owner who did nothing but install and use.

Quote from: Jean-Baptiste Sarrodie on April 18, 2023, 13:49:06 PMI don't think it is related to this, but do a test with a simplified password (or a token) to be sure.

Will try this too then.

Thanks

J

So...

1) I tested installing on a different machine to check the setup. It worked fine first time their with my same credentials, so definitely not a password character issue and means for sure it is a local issue on the current machine.
2) I renamed the git config file, no effect (also after restart including system one).
3) I removed all my user and system environment variables (apart from the core windows ones), no effect (also after restart including system one).
4) I uninstalled archi, the plugin and then removed any other remnants I could find. Thus ensured archi folder/s under AppData were gone, Archi folder under program files was gone and also ensured every reference to arhci is registry was gone. Restarted system. Reinstalled everything from scratch. Still not working. Still some local issue.
5) I disabled windows defender firewall, no effect.

I am completely stumped.

Note, I saw below (use windows trust store) on internet to be sure about middle man proxy assuming but I think this might not work in java 17?

-Djavax.net.ssl.trustStore=NUL
-Djavax.net.ssl.trustStoreType=WINDOWS-ROOT

Jean-Baptiste Sarrodie

Hi,

Quote from: J on April 18, 2023, 16:32:55 PMI tested installing on a different machine to check the setup. It worked fine first time their with my same credentials, so definitely not a password character issue and means for sure it is a local issue on the current machine.

Ok, so at least we know it can work. Are you able to list the potential differences between your machine and this test machine? And btw, can you provide more details on your machine (model, os version...) ?

Quote from: J on April 18, 2023, 16:32:55 PMNote, I saw below (use windows trust store) on internet to be sure about middle man proxy assuming but I think this might not work in java 17?

Some people reported some success with this but I've never been able to make it work (ie. windows certificates are not used).

That's becoming hard to solve. I'm afraid that the thing to do now is to use some port scanning tool to check what Archi is doing and if it really is able to connect to something (be it your server or your proxy).

Regards,

JB
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.