[SOLVED] SSH, email - connection 'hangs'

Hello,
I have a problem with connections at work - it happens only at work, I tried on Arch and also Debian.
I haven't noticed it to affect 'web browsing' - it affects for sure ssh (incl. git) and sending email mesages.
What happens:
About 3/4 of times I try to send an email (google account from thunderbird), or log in to one of our servers with ssh (or pull/push some code from/to github) the connection 'hangs' and nothing happens. If I try ^C and 'redo' few times I finally manage to log in.
Log from ssh (unsuccessfull connection):
ssh bb5 -vvvv
OpenSSH_5.9p1, OpenSSL 1.0.0g 18 Jan 2012
debug1: Reading configuration data /home/kaczor/.ssh/config
debug1: /home/kaczor/.ssh/config line 18: Applying options for bb5
debug1: Reading configuration data /etc/ssh/ssh_config
debug2: ssh_connect: needpriv 0
debug1: Connecting to XXX.XXX.XXX.XXX [XXX.XXX.XXX.XXX] port 22.
debug1: Connection established.
debug3: Incorrect RSA1 identifier
debug3: Could not load "/home/kaczor/.ssh/id_rsa" as a RSA1 public key
debug1: identity file /home/kaczor/.ssh/id_rsa type 1
debug1: identity file /home/kaczor/.ssh/id_rsa-cert type -1
debug1: identity file /home/kaczor/.ssh/id_dsa type -1
debug1: identity file /home/kaczor/.ssh/id_dsa-cert type -1
debug1: identity file /home/kaczor/.ssh/id_ecdsa type -1
debug1: identity file /home/kaczor/.ssh/id_ecdsa-cert type -1
[-- and I can wait for ages on this --]
If the login is successfull the next lines are:
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.5p1 Debian-6+squeeze1
debug1: match: OpenSSH_5.5p1 Debian-6+squeeze1 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.9
debug2: fd 3 setting O_NONBLOCK
My /etc/ssh/ssh_config on Arch is default (everything commented out)
~/.ssh/config has only few Host, User, entries
On Debian:
/etc/ssh/ssh_config
Host *
SendEnv LANG LC_*
HashKnownHosts yes
GSSAPIAuthentication yes
GSSAPIDelegateCredentials no
Trying to ssh to server's IP doesn't change anything.
Any ideas how could I track where lies the problem? Or maybe I could at least make it 'retry' automatically?
Edit:
After setting timeout in ssh_config I get
Connection timed out during banner exchange
at the end of unsuccessfull connection.
Last edited by kaczor1984 (2012-04-24 15:15:17)

firecat53 wrote:
Try downgrading openssl and openssh to the previous versions. I had issues similiar (but not exactly) to this. I think try openssl-1.0.0.h and openssh-5.9p1-5
Scott
On Debian the openssl is 0.9.8g-15 and openssh is 5.1p1-5
Gcool wrote:Try connecting with the "-o ConnectTimeout=60" parameter....
I've set it already in ssh_config file (see my edit). Is there any way to make ssh 'retry' few times because now it gives up after first failure.
I've set   ConnectionAttempts 5 but i'm not sure if it works - I'll have to give it another try on tuesday.
mr.MikyMaus wrote:Can it be that your employer does not like encrypted traffic in his network? I could imagine an IPS system trying to decipher the connection... Try moving the server-side ssl service to a non-standard port if you can...
It is possible - however I don't know exactly how is the network 'distributed'. Maybe I'll try to change it at least at one server and give it a try.
Anyway - what about emails for example - this uses port 25 (smtp on gmail) and is experiencing the same problems (message sending lasts until timeout 8 out of 10 times).
I don't know too much about networks - maybe there is some kind of service which doesn't work properly in my network at the office. Any clues what could it be?
Most important for me is to make 'git pull' work - because it's executed automatically on those Debian boxes and if it fails they are not updated.
So solution like 'make it retry 10 times per 5 seconds' will do the job for 90% cases I think.

Similar Messages

  • Connection hange while trying to connect via ssh.

    Hi all,
    I have this problem and i fixed it, just wanted to understand the logic behiend it.
    I tried to login to a machine via ssh.
    After providing the username and password, the connection hang until you press CTRL -C.
    I checked DNS configuration, and some other stuff.
    The problem was a NFS entry in the vfstab that was unreachable.
    When i removed it, the connection went smoothlly.
    My question is, why that entry caused that problem ?
    Thanks!

    At login, the shell runs 'quota -v' to display any over-quota conditions that might exist.
    If the NFS mount was not mounted with "noquta", then it will send an RPC request to the server. If the server is down, that request will take 60 seconds to time out. If you have multiple mounts to the server, they might run sequentially.
    The login should complete after a minute or so, but most users won't wait that long.
    Darren

  • IPhone connections hangs when sending email after upgrade.

    After upgrading to 2.0 firmware on my first generation IPhone, the phone now regulary hangs when sending email via smtp. Even if I try to close the connection by putting it into AirPlane mode and back again it still hangs and from that point onwards doesn't check or send any new emails. If I then shut the phone down and restart it looses the email as it's not either in the sent or outbox folders. This has happened quite a few times since upgrading. Does anybody have any advice?

    Found this useful tidbit by mdwelsh231 on another thread:
    "I'm having this problem too. Rather than rebooting the phone, an even easier solution is to hold down the Home button for several seconds (I believe it's 8 sec) which will kill the Mail application and return you to the home screen. Restarting Mail (by tapping the Mail icon) will cause it to reconnect. I find that this resolves the connection hanging issue. However, it is still kind of a pain. I suspect a bug in the 2.0 iPhone firmware. "
    Worked for me
    Cheers,
    C

  • Jdbc connection hang?

    I used thin JDBC driver 9.0.1 comes with oracle 9i.
    However, the connection hang in heavy load.
    1. I try to check isClosed(), then reopen is more stable but problem is still exist.
    2. It's more stable than 1. when do.. getConnection, do job and Close it. But another application connect more difficult get some error like 'not found oracle realm' or something.
    Anybody has comment?
    Thanks,
    Kittikun Potivanakul
    [email protected]

    Hi to all and sorry for the delay of my reply.
    I am not using RAC. After setting of the system property +"-Djava.security.egd=file:///dev/random"+ it has solved the +"Connection reset"+ problem, but after about one hour I get +"Connection closed"+ from each connection of the pool when the application uses it.
    The pool uses the implicit cache mechanism of Oracle. Follow the properties of cache:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
    <properties>
    <comment> Oracle connection pool configuration file. </comment>
    <!-- Sets how many connections are created in the cache when it is created or reinitialized -->
    <entry key="InitialLimit">0</entry>
    <!-- Sets the minimum number of connections the cache maintains. -->
    <entry key="MinLimit">0</entry>
    <!-- Sets the maximum number of connection instances the cache can hold. If missing no limit-->
    <entry key="MaxLimit">10</entry>
    <!-- Sets the maximum time a physical connection can remain idle in a connection cache.
    An idle connection is one that is not active and does not have a logical handle associated with it. -->
    <entry key="InactivityTimeout">240</entry>
    <!-- Sets the maximum time that a connection can remain unused before the connection is closed and returned to the cache.
         A connection is considered unused if it has not had SQL database activity. -->
    <entry key="AbandonedConnectionTimeout">240</entry>
    <!-- If no connection is returned to the cache before the timeout elapses, then the connection request returns null. -->
    <entry key="ConnectionWaitTimeout">5</entry>
    <!-- If true causes the connection cache to test every connection it retrieves against the underlying database. If a valid connection cannot be retrieved, then an exception is thrown. -->
    <entry key="ValidateConnection">true</entry>
    </properties>
    Edited by: user12098943 on Aug 24, 2011 10:31 AM

  • Connection hanging with java

    Hello
    we apply some simple Connection pool mechanism from our java code to Oracle
    8.1.6. Due to some reason, oracle connections get hanging after a while. So
    far I have not found out why :-(. The result is that whatever command they
    are running at that moment gets blocked. This may be something so simple as
    Connection.createStatement(). Result: my thread is blocked, the program is
    blocked. Parts of it I solved by doing a test before delivering a connection
    in a separate thread that gets a timeout. Not really elegant :-(. First,
    when the connection gets corrupted in the code that uses it, I have no
    access. And secondly, when the thread gets timed out, and the pool creates a
    new connection, I still have this connection hanging ...
    So, I hope that someone has some useful tips how should handle hanging
    connections, and properly clean them. Meanwhile I will try to find the
    reason of the hanging as well (maybe v$session or v$open_cursor has a clue).
    Regards

    You're right.
    The Norton personal firewall does not handle localhost to localhost correctly. I do all the tests on the same machine. The netstat -an shows the port is listening in either case. But now I know the firewall blocks one of them silently. No rule prompt was triggered. Worse, no logging produced for that particular access.
    Thanks. You've been very helpful.

  • HT201415 My wi if connection Hangs at random and the iPad then needs to be restarted for it to reconnect!

    My wi if connection Hangs at random and the iPad then needs to be restarted for it to reconnect!
    Has anyone had a problem like this or know a solution.?

    Look at iOS Troubleshooting Wi-Fi networks and connections  http://support.apple.com/kb/TS1398
    iPad: Issues connecting to Wi-Fi networks  http://support.apple.com/kb/ts3304
    iOS: Recommended settings for Wi-Fi routers and access points  http://support.apple.com/kb/HT4199
    Additional things to try.
    Try this first. Turn Off your iPad. Then turn Off (disconnect power cord for 30 seconds or longer) the wireless router & then back On. Now boot your iPad. Hopefully it will see the WiFi.
    Go to Settings>Wi-Fi and turn Off. Then while at Settings>Wi-Fi, turn back On and chose a Network.
    Change the channel on your wireless router (Auto or Channel 6 is best). Instructions at http://macintoshhowto.com/advanced/how-to-get-a-good-range-on-your-wireless-netw ork.html
    Another thing to try - Go into your router security settings and change from WEP to WPA with AES.
    How to Quickly Fix iPad 3 Wi-Fi Reception Problems
    http://osxdaily.com/2012/03/21/fix-new-ipad-3-wi-fi-reception-problems/
    If none of the above suggestions work, look at this link.
    iPad Wi-Fi Problems: Comprehensive List of Fixes
    http://appletoolbox.com/2010/04/ipad-wi-fi-problems-comprehensive-list-of-fixes/
    Fix iPad Wifi Connection and Signal Issues  http://www.youtube.com/watch?v=uwWtIG5jUxE
    Fix Slow WiFi Issue https://discussions.apple.com/thread/2398063?start=60&tstart=0
    Unable to Connect After iOS Update - saw this solution on another post.
    https://discussions.apple.com/thread/4010130
    Note - When troubleshooting wifi connection problems, don't hold your iPad by hand. There have been a few reports that holding the iPad by hand, seems to attenuate the wifi signal.
    ~~~~~~~~~~~~~~~
    If any of the above solutions work, please post back what solved your problem. It will help others with the same problem.
     Cheers, Tom

  • Terminal SSH not connecting?

    Forgive me if this isn't the best place for this question, but it's mostly Greek to me. I've been able to log into my remote server using the "ssh [email protected]" command from Terminal. Within moments I get the "password" prompt and all is well.
    Recently, something is choking and I have no clue where to start looking. I type the ssh command and nothing happens for a minute or two, and then there's the message "Connection closed by nn.nnn.nnn.nnn" (the IP address). Blammo.
    The verbose log follows. Any clues? Thanks to all in advance.
    ==========
    Last login: Fri Feb 22 21:31:00 on ttyp1
    Welcome to Darwin!
    [MyComputer:~] shortname% ssh [email protected] -v
    OpenSSH_4.5p1, OpenSSL 0.9.7l 28 Sep 2006
    debug1: Reading configuration data /etc/ssh_config
    debug1: Connecting to domain.com [nn.nnn.nnn.nnn] port 22.
    debug1: Connection established.
    debug1: identity file /Users/shortname/.ssh/identity type -1
    debug1: identity file /Users/shortname/.ssh/id_rsa type -1
    debug1: identity file /Users/shortname/.ssh/id_dsa type -1
    debug1: Remote protocol version 1.99, remote software version OpenSSH_3.5p1 FreeBSD-20030924
    debug1: match: OpenSSH_3.5p1 FreeBSD-20030924 pat OpenSSH_3.*
    debug1: Enabling compatibility mode for protocol 2.0
    debug1: Local version string SSH-2.0-OpenSSH_4.5
    debug1: Miscellaneous failure
    No credentials cache found
    debug1: Miscellaneous failure
    No credentials cache found
    debug1: SSH2MSGKEXINIT sent
    debug1: SSH2MSGKEXINIT received
    debug1: kex: server->client aes128-cbc hmac-md5 none
    debug1: kex: client->server aes128-cbc hmac-md5 none
    debug1: SSH2MSG_KEX_DH_GEXREQUEST(1024<1024<8192) sent
    debug1: expecting SSH2MSG_KEX_DH_GEXGROUP
    debug1: SSH2MSG_KEX_DH_GEXINIT sent
    debug1: expecting SSH2MSG_KEX_DH_GEXREPLY
    debug1: Host 'domain.com' is known and matches the DSA host key.
    debug1: Found key in /Users/shortname/.ssh/known_hosts:2
    debug1: sshdssverify: signature correct
    debug1: SSH2MSGNEWKEYS sent
    debug1: expecting SSH2MSGNEWKEYS
    debug1: SSH2MSGNEWKEYS received
    debug1: SSH2MSG_SERVICEREQUEST sent
    debug1: SSH2MSG_SERVICEACCEPT received
    Connection closed by nn.nnn.nnn.nnn
    [MyComputer:~] shortname%

    Tried that, it asked me to establish the authenticity of the host, I said yes, it added the domain to the list of known hosts - and then nothing again. Got the "connection closed by the host" message after a minute or two.
    I tried something different, and sent "ssh [email protected]" (where 'othername' is a site owned by a friend) and it promptly asked for the password (which I don't know so I logged off Terminal). Is it possible the hangup is at my host? I can access all the features of my site normally - I just can't log in via ssh via either root or ftp.

  • My mail on iMac is not working properly. Click on email, it hangs, showing previous email. Takes forever to load. "No message selected" showing in a blank screen

    My mail is not working properly: when I click on an email it hangs, frequently showing the previous email, often for up to a minute. Or it shows "loading" and just sits there showing nothing. OR there is a blank screen saying "no message selected". It's slow to load, and I'm not happy. Recently switched from Windows PC, not impressed so far. Very frustrating.
    Any suggestions would be gratefully received. (I upgraded to Mountain LIon, and don't think I had problems before I did so, though I hadn't had the computer for long.)

    Hi Sarah,
    Open Console in Utilities & see if there are any clues or repeating messages when this happens.

  • [SOLVED] Wireless internet connection problem during installation

    Hi to everyone!
    I ask you a help in activating my wireless connection.
    I tried to install from the recent ISO (201208 - via CD)
    but I found some problems in activating a wireless connection in the first steps
    of the installation guide.
    My laptop is a Hp pavilion dv5 1020-el, with an Intel wireless 5100AGN internal interface.
    So I did:
    1) iwconfig to see my devices and the system detects my wlan0.
    2) followed the Wireless_Setup page from wiki to set it
    3) used wpa_supplicant and passphrase to set my ESSID name and wpa key.
    4) iwconfig then showed wlan0 associated with my ESSID, with Power ON and Encryption OFF.
    I could not try a connection via ping command.
    Even wpa_supplicant -i wlan0 -c /etc/wpa_supplicant.conf did not work.
    Maybe the problem is with Encryption OFF.
    Thanks for your attention!
    EDIT:
    I solved this way,connecting to an open wireless open  network:
    1.(from boot) I created a profile in /etc/network.d/ from /etc/network.d/examples
    2. started a # netcfg 'my_ESSID'
    3. # ping -c 3 www.google.com
    All is ok! I can install Arch Linux from my smartphone as a router.
    But I couldn't connect to a WPA protected wireless network yet.
    Last edited by spinaluc (2012-08-18 13:08:15)

    Thanks to everyone who responded to my question. The company who provides the wireless internet service to my apartment complex moved the antenna next to my unit and claims he boosted the power. As the saying goes, "The squeaky wheel gets the grease". I complained almost daily to the apartment manager and she, in turn, griped to the provider which eventually led to the "solution" above. Using Skype is still shaky as the person I'm calling isn't always able to make out what I am saying. So, I use Skype only when I REALLY need to make a phone call. Even though none of your suggestions solved my problem, I am still very, very grateful to all of you who tried. Thank you very, very much! -- Matt

  • How do You Test EMail Connectivity?

    How do You Test EMail Connectivity?
    Once you setup the mail gateway with an IP address, port, and domain name.  How can you test email connectivity?  How do you force the MARS Appliance to send an email?

    There is no "test e-mail connectivity" button/function. Essentially you need to configure inspection rules to notify you when they are fired by mars.
    You will need to setup a user (preferably a non-admin account for testing) under "Management"-"user management"(if you haven't already done so) make sure to supply e-mail address.
    http://www.cisco.com/en/US/docs/security/security_management/cs-mars/6.0/initial/configuration/setup.html#wp1030836
    Now you can "Configure a Rule to Send an Alert Action." the following link explains how to do this...An easy one would be the "System Rule: CS-MARS Login Failures - Non-Admin User" rule. Follow the instructions in the link below under the "Configure a Rule to Send an Alert Action" section to modify the rule mentioned above. Keep in mind that this rule only fires when there are login failures. Once you have modified this rule try logging into mars using the non-admin user with a bad password...you should get a e-mail from MARS.
    http://www.cisco.com/en/US/docs/security/security_management/cs-mars/6.0/user/guide/combo/alerts.html#wp1056101
    Hope this helps.
    Dustin Suko

  • How to setup calendar email connectivity

    How do i setup the email connectivity of a  collaboration room calendar without using a microsoft exchange server. Can i  just use java mail server?

    You can configurate the email connectivity under configuration -> collaboration ->
    transports -> mail transport. This mail transport uses the java mail library. You
    need to provide the host name of your mail server. But keep in mind that by doing it you won't have calendar connectivity. You will have only mail connectivity to send mails from KM folders and mails for collaboration tasks for example.
    Regards,
    Marc

  • N97 Email connection issue

    I have N97 with firmware version 11.0.021.209.04.
    I am basically pleased with the phone apart from the slide unlock not working maybe 1 in 30 times (just open the qwerty pad to unlock in this case) not a big issue to me but hope it resolved in the firmware release.
    However I have the following issue which is bugging me:-
    I have set up my network priority list with my WLAN as 1, and the vodafone connection as 2.
    I have my email connection setting set to default connection.
    When I'm at home I have no problem, I can access my email through my WLAN.
    However when I leave the house and try to to access my email I get a message saying WLAN is not available unable to access email. Obviously it is not available and I would expect the phone to automaticall switch to priority 2 but it doesn't.
    I have to manually go into email connection settings and select vodafone.
    My internet connection goes through the priority list no problem.
    Does anyone know if I've not set something up correctly or if it is a bug.
    Cheers

    i have read the posts in this thread. so far, settings will be one of the reasons why you can't access your network providers' packet data.
    >please understand that setting up email needs packet data/ GPRS to finish setting it up and then you can use WLAN to retrieve email whenever you want.
    try this setting:
    -->menu>messaging>options>settings>email>select mailbox (yahoo/hotmail,etc)
         >options>connection settings>access point in use> select network providers' packet data
    --> if  the same issue persist, try deleting your WLAN connection and add it again
    --> or, you can try to do a soft reset which will make your phone return it's factory settings only 
          not deleting file at all, just key-in *#7780#
    --> next, do a hard reset. this time your files will be deleted so it is very much advisable to back
         up your files in OVI suite first or in your memory card before hard reset, just key in *#7370#
    --> least likely, if your phone is a new one or you just bought it, it is unneccesary for you to do 
         software update unless it is indicated to your product key that you may do so and if there
         is a new software for your phone. (check in nokia.com if you may do software update by
         by entering your product key)
    --> if all else fails, bring your phone to Nokia Care Center/ Service Center accredited by Nokia
    Ncca10

  • Connection Hangs

    Hi All,
    Platform : Oracle - 10.1.0.4.0
    OS - HP-UX B11.23
    PeopleSoft -8.11 P1
    From the People Soft logs we get an error;
    12241/1 WRK:Init Remote Env Token  
    OCI0000141 - Error - ORA-01034: ORACLE not available
    ORA-27101: shared memory realm does not exist
    HPUX-ia64 Error: 2: No such file or directory
    The connection hangs and we need to re-start the application to get back to normal.
    But this error (0RA-27101) is not reported in database Alert Logs. The oracle is available when we access through sql*plus

    Hi,
    To resolve this issue with ORA-27101, you should be sure that ORACLE_HOME and ORACLE_SID are correct, and ORACLE_HOME should not have trailing slash.
    The error will appear on the client side and not in the alert log.
    Thanks
    Soundappan

  • JCO connections hanged in SMGW transaction at SAP

    Hi ,
    I have deployed an ear application in SAP WAS 7.0 which basically talks to my SAP backend using JCO 2.1 connectors. The application will fetch the data from SAP backend calling FM using JCO 2.1.
    I m using JCO pool manager and set to default 100 connections and taken care of release connections after every RFC call in finally block. The connections released successfully in  Dev and QA landscapes. In prod environment of customer, we are facing connections hang issues when it reaches to peak state of 100. It is due to max conversations reached at SAP backend, but the connections should eventually drop in SMGW which is not happening. There are some lost connections got hanged and remains for days and even they are not re-used. When i run method to release the pool, all connections are focibly returned back to pool, but lost connections still remain there.
    Can somebody has similar situation ?
    if connections reached to max in SMGW, will the connections from external client applications will get hanged ?
    Does the JCO have control on the hanged connections if it reaches to max number?
    Any help is appreciated!!!
    Regards,
    Ravi.

    The relevant SAP note here is [549268|https://service.sap.com/sap/support/notes/549268].
    But in this context there is big difference between the terms "not supported" and "does not work".
    When SAP speaks of "not supported" this means that there won't be any SAP support for this configuration but this does not say anything about if this works technically. "Not supported" is more a legal issue than a technical one. SAP did not test this configuration and therefore also cannot guarantee to work.
    Regarding JCo 2.1 I can say that technically it works with all Windows 32- and 64-bit versions. In contrast to that it really does not work with JRE releases >= 1.5 when using BCD types (type P) within your function modules.
    From my point of view the connection issues don't have anything to do with the Windows version here.
    And it is still not clear to me, if the maximum number of CPIC connections is reached at the AS ABAP/gateway side or the Java side. Furthermore it is not clear if these "hanging connections" were opened with your application at all or if they belong to another application.

  • Hi! I bought my notebook in october last year but from last month oftenly my WiFi connection hangs up nd stops catching any available Wifi connection? please suggest the solution

    Hi! I bought my Macbook Pro 13" in october last year but from last month oftenly my WiFi connection hangs up nd stops catching any available Wifi connection?
    At last I restart the modem and dn it catches the signal but that too is short lived.
    please suggest some solutions
    Thanking U,

    I have this problem on my home network but at the same time when my connection hangs up my other wifi machine remians connected. So i think there's no problem with the modem.

Maybe you are looking for