SSH issue: cant connect - existing connection forcibly closed??

Asked by Douglas Mosman

Hi. Looking for help pinpointing this issue. I think it is an SSH connectivity but I don't know enough about the client/server SSH interactions and what the log is telling me to resolve it. At this point, I am unable to create branches or checkouts so I'm pretty much dead in the water.

-- Doug

I'm running Bazaar Explorer on Windows XP

I'm new to Bazaar and Launchpad so I just followed the setup instructions from the project I was planning to join, openpetraorg (URL for setup instructions is listed below).

Initially, Oct. 26, everything worked and I could create branches on Launchpad and check out source to repositories on my PC. However, on Nov. 6, my pc seemed to be getting very slow and Windows Explorer was working slowly and erratically. After fighting with it for a while, I totally uninstalled Bazaar, deleted the Application Data folder and all repository folders and did a clean install, without TortoiseBZR.

Now all I get is the following error when I try to create a branch or checkout from an existing branch on Launchpad to a local repository on my PC.

"SocketConnectionError: Unable to connect to SSH host bazaar.launchpad.net; Unable to connect to bazaar.launchpad.net: [Errno 10054] An existing connection was forcibly closed by the remote host"

Unfortunately, I can't be sure if this problem was occurring before the reinstall. I do recall a team member telling me that they only used Bazaar Explorer without TortoiseBZR before I reinstalled, so I was having some problems even with the original Explorer/tortoiseBZR install.

Some Notes (in case they help)

1. running Bazaar 2.4.2 (as per project team's specification)
2. I originally installed tortoiseBZR but then did a complete uninstall and reinstall with just Bazaar Explorer due to some other issues
3. I did a new install with TortoiseBZR on another machine and the problem still occurs
4. openpetra setup instructions for Bazaar:
   http://sourceforge.net/apps/mediawiki/openpetraorg/index.php?title=How_to_work_with_bazaar_through_the_GUI_on_Windows

Question information

Language:
English Edit question
Status:
Solved
For:
Bazaar Edit question
Assignee:
No assignee Edit question
Solved by:
Douglas Mosman
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

Can you ping the server ok?

Revision history for this message
Douglas Mosman (dwmosman) said :
#2

ping launchpad.net - yes
ping bazaar.launchpad.net - yes

FWIW, the launchpad-login and launchpad-open commands seem to work. Although I don't know if they actually reach out to the server for what they need. And if they do, I don't know if they require the ssh keys to function.

Revision history for this message
Douglas Mosman (dwmosman) said :
#3

I am moving this to the Bazaar project. I think my original designation was in error.

Someone more knowledgeable than me is welcome to suggest a better location if I'm mistaken

Revision history for this message
Douglas Mosman (dwmosman) said :
#4

As per https://bugs.launchpad.net/bzr/+bug/915162, I used plink to try a manual connection to launchpad. I still get an error - "connection reset by peer". Is it possible that Launchpad is blocking me for some reason?

-- using pageant --

C:\Program Files\PuTTY>plink.exe -v -ssh -agent <email address hidden>
Looking up host "bazaar.launchpad.net"
Connecting to 91.189.95.84 port 22
Failed to connect to 91.189.95.84: Network error: Connection reset by peer
Network error: Connection reset by peer
FATAL ERROR: Network error: Connection reset by peer

-- using my private key directly --

C:\Program Files\PuTTY>plink.exe -v -ssh -noagent -i "C:\Local Files\dwmosman\My
 Documents\launchpad\ringer.ppk" <email address hidden>
Looking up host "bazaar.launchpad.net"
Connecting to 91.189.95.84 port 22
Failed to connect to 91.189.95.84: Network error: Connection reset by peer
Network error: Connection reset by peer
FATAL ERROR: Network error: Connection reset by peer

Revision history for this message
Douglas Mosman (dwmosman) said :
#5

Solved: Even though my setup worked initially, this was apparently a problem with my environment.

I did the following:
- replaced the cable router,
- bypassed my network switch and connected my pc network cable directly to the router,
- uninstalled and totally cleaned Norton Security Suite from my system,
- downloaded and installed a fresh copy of Norton Security Suite,
- set bzr.exe, bzrw.exe, plink.exe and putty.exe to be allowed to connect through the firewall,
- set a User Environment Variable: BZR_SSH=paramiko

At this point it works. I'm connecting successfully and can do branches and checkouts again. I'm sure that some of the changes were unnecessary but I don't yet know what change was the key. FWIW, if anyone is as lost as I was, here is the result of a successful plink test. (I just x'ed out of the command window at this point)

C:\Program Files\PuTTY>plink.exe -v -ssh -agent <email address hidden>
Looking up host "bazaar.launchpad.net"
Connecting to 91.189.95.84 port 22
Server version: SSH-2.0-Twisted
Using SSH protocol version 2
We claim version: SSH-2.0-PuTTY_Release_0.62
Using Diffie-Hellman with standard group "group1"
Doing Diffie-Hellman key exchange with hash SHA-1
The server's host key is not cached in the registry. You
have no guarantee that the server is the computer you
think it is.
The server's rsa2 key fingerprint is:
ssh-rsa 1024 9d:38:3a:63:b1:d5:6f:c4:44:67:53:49:2e:ee:fc:89
If you trust this host, enter "y" to add the key to
PuTTY's cache and carry on connecting.
If you want to carry on connecting just once, without
adding the key to the cache, enter "n".
If you do not trust this host, press Return to abandon the
connection.
Store key in cache? (y/n)

Revision history for this message
Douglas Mosman (dwmosman) said :
#7

Update:

The router must have been the problem.

I have just tested with my other machine and it now runs successfully with no changes. (i.e., existing Bazaar install with TortoiseBZR, existing unchanged Norton install, connected to network switch). The only common element is the new router.

Revision history for this message
Vincent Ladeuil (vila) said :
#8

@Douglas: Thanks for the feedback !