Opened 9 years ago

Closed 9 years ago

#12744 closed defect (fixed)

When connection to server is lost, reconnection fails

Reported by: Robby Owned by: darkrain42
Milestone: 2.7.4 Component: XMPP
Version: 2.7.3 Keywords:
Cc:

Description

This was initially reported in #a14367.

darkrain: Yeah, it's still broken in im.pidgin.pidgin

Ticket description (#a14367):

Summary

When the connection to the server is lost (for example, if the service is restarted or the server is rebooted, etc.), Adium hangs at "initializing stream (25%)".

The event appears to happen shortly after the connection is lost, when Adium tries to reconnect. It sits at 25%, never trying again to connect, until the account is unchecked in adium -> preferences -> accounts, and rechecked. Upon rechecking, the connection is then successful.

Steps to reproduce

  1. Connect to an xmpp server
  2. Stop Jabber service
  3. Look at status in preferences -> accounts
  4. Uncheck/disable account
  5. Check/enable account

Relevant part of the debug log taken from #a14367:

08:22:52: (Libpurple: jabber) Recv (ssl)(92): <presence type="unavailable" from="luna@dipswitch.net/home" to="luna@dipswitch.net/heliax"/>
08:22:52: (Libpurple: jabber) Recv (ssl)(91): <stream:error><system-shutdown xmlns='urn:ietf:params:xml:ns:xmpp-streams'/></stream:error>
08:22:52: (Libpurple: connection) Connection error on 0x1b72ecc0 (reason: 0 description: System Shutdown)
08:22:52: Connection Disconnected: gc=1b72ecc0 (System Shutdown)
08:22:52: <ESPurpleJabberAccount:259d600 1>:luna@dipswitch.net accountConnectionReportDisconnect: System Shutdown
08:22:52: (Libpurple: jabber) Recv (ssl)(16): </stream:stream>
08:22:52: (Libpurple: account) Disconnecting account luna@dipswitch.net/heliax (0x16e550e0)
08:22:52: (Libpurple: connection) Disconnecting connection 0x1b72ecc0
08:22:52: (Libpurple: connection) Deactivating keepalive.
08:22:52: (Libpurple: jabber) Sending (ssl) (luna@dipswitch.net/heliax): </stream:stream>
08:22:52: Disconnected: gc=1b72ecc0
08:22:52: <ESPurpleJabberAccount:259d600 1>:luna@dipswitch.net: Telling the core we disconnected
08:22:52: <ESPurpleJabberAccount:259d600 1>:luna@dipswitch.net: Disconnected ("System Shutdown"): Automatically reconnecting in 5.000000 seconds (0 attempts performed)
08:22:52: (Libpurple: connection) Destroying connection 0x1b72ecc0
08:22:57: (Libpurple: util) Writing file accounts.xml to directory /Users/localadmin/Library/Application Support/Adium 2.0/Users/Default/libpurple
08:22:57: (Libpurple: util) Writing file /Users/localadmin/Library/Application Support/Adium 2.0/Users/Default/libpurple/accounts.xml
08:22:57: Original image of size 218.000000 218.000000
08:22:57: <ESPurpleJabberAccount:259d600 1>:luna@dipswitch.net: Scaled image to size {96, 96}
08:22:57: -[CBPurpleAccount setAccountUserImage:withData:]: <ESPurpleJabberAccount:259d600 1>:luna@dipswitch.net setting icon data of length 23225
08:22:57: <ESPurpleJabberAccount:259d600 1>:luna@dipswitch.net: Updating status for key: User Icon
08:22:57: Adium: Connect: luna@dipswitch.net initiating connection using status state <AIStatus: 3e54c00 [♫ iTunes]> (%_iTunes).
08:22:57: Setting status on 16e550e0 (luna@dipswitch.net/heliax): ID available, isActive 1, attributes {
    buzz = 1;
    message = "";
    priority = 8;
}
08:22:57: (Libpurple: account) Connecting to account luna@dipswitch.net/heliax.
08:22:57: (Libpurple: connection) Connecting. gc = 0x17f9fa70
08:22:57: Connecting: gc=0x17f9fa70 (Connecting) 1 / 5
08:22:57: (Libpurple: dnssrv) querying SRV record for dipswitch.net: _xmpp-client._tcp.dipswitch.net
08:22:57: <ESPurpleJabberAccount:259d600 1>:luna@dipswitch.net: Updating status for key: Online
08:22:57: ************ luna@dipswitch.net --step-- 1
08:22:57: (Libpurple: util) Writing file blist.xml to directory /Users/localadmin/Library/Application Support/Adium 2.0/Users/Default/libpurple
08:22:57: (Libpurple: util) Writing file /Users/localadmin/Library/Application Support/Adium 2.0/Users/Default/libpurple/blist.xml
08:22:57: (Libpurple: dnssrv) found 1 SRV entries
08:22:57: (Libpurple: dns) DNS query for 'im.dipswitch.net' queued
08:22:57: -[AdiumPurpleDnsRequest startLookup]: Performing DNS resolve: im.dipswitch.net:5222
08:22:58: DNS resolve complete for im.dipswitch.net:5222; 1 addresses returned
08:22:58: (Libpurple: dnsquery) IP resolved for im.dipswitch.net
08:22:58: (Libpurple: proxy) Attempting connection to 71.120.128.10
08:22:58: (Libpurple: proxy) Connecting to im.dipswitch.net:5222 with no proxy
08:22:58: (Libpurple: proxy) Connection in progress
08:22:58: Called read with no read_tag <SourceInfo 0x186f04c0: Socket 0x1b71a510: fd 14; timer_tag 0; read_tag 0; write_tag 29518>
08:22:58: (Libpurple: proxy) Connecting to im.dipswitch.net:5222.
08:22:58: adium_input_get_error(14): Socket is NOT valid
08:22:58: (Libpurple: proxy) Error connecting to im.dipswitch.net:5222 (Socket is not connected).
08:22:58: (Libpurple: proxy) Connection attempt failed: Socket is not connected
08:22:58: (Libpurple: jabber) Unable to connect to server: Socket is not connected.  Trying next SRV record or connecting directly.
08:22:58: (Libpurple: dns) DNS query for 'dipswitch.net' queued
08:22:58: -[AdiumPurpleDnsRequest startLookup]: Performing DNS resolve: dipswitch.net:5222
08:22:58: DNS resolve complete for dipswitch.net:5222; 1 addresses returned
08:22:58: (Libpurple: dnsquery) IP resolved for dipswitch.net
08:22:58: (Libpurple: proxy) Attempting connection to 71.120.128.10
08:22:58: (Libpurple: proxy) Connecting to dipswitch.net:5222 with no proxy
08:22:58: (Libpurple: proxy) Connection in progress
08:22:58: Called read with no read_tag <SourceInfo 0x1d7bac20: Socket 0x1d7067b0: fd 14; timer_tag 0; read_tag 0; write_tag 29520>
08:22:58: (Libpurple: proxy) Connecting to dipswitch.net:5222.
08:22:58: adium_input_get_error(14): Socket is NOT valid
08:22:58: (Libpurple: proxy) Error connecting to dipswitch.net:5222 (Socket is not connected).
08:22:58: (Libpurple: proxy) Connection attempt failed: Socket is not connected
08:22:58: (Libpurple: jabber) Couldn't connect directly to dipswitch.net.  Trying to find alternative connection methods, like BOSH.
08:22:58: (Libpurple: dnssrv) querying TXT record for dipswitch.net: _xmppconnect.dipswitch.net
08:22:58: (Libpurple: dnssrv) found 3 TXT entries
08:22:58: (Libpurple: jabber) Didn't find an alternative connection method.

Change History (2)

comment:1 Changed 9 years ago by darkrain42

  • Milestone set to 2.7.4
  • Owner changed from deryni to darkrain42

This is really trivial -- we need to throw a connection error right where that "Didn't find an alternative connection method." message is printed.

comment:2 Changed 9 years ago by darkrain42@…

  • Resolution set to fixed
  • Status changed from new to closed

(In fe36f3cc103e9f3e86937ec01f11257123b961fc):
jabber: Handle a corner case better by throwing an error instead of stalling

This happens if the server *has* a TXT record for _xmppconnect.$domain, but has no useful content there. Fixes #12744, #a14367.

Note: See TracTickets for help on using tickets.
All information, including names and email addresses, entered onto this website or sent to mailing lists affiliated with this website will be public. Do not post confidential information, especially passwords!