dbTalk Databases Forums  

SQL Anywhere 11.0.1.2355 and ODBC connection fails 9 times out of 10

sybase.public.sqlanywhere.general sybase.public.sqlanywhere.general


Discuss SQL Anywhere 11.0.1.2355 and ODBC connection fails 9 times out of 10 in the sybase.public.sqlanywhere.general forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Jesse
 
Posts: n/a

Default SQL Anywhere 11.0.1.2355 and ODBC connection fails 9 times out of 10 - 01-12-2010 , 12:14 PM






We have a client running SQL Anywhere 11.0.1.2355 and hosting their database
on a Windows XP SP3 32-bit workstation. When they try to connect to the
database, 9 times out of 10 the connection fails.
The SQL Anywhere service is configured as follows:

C:\database\database.db
-n database
-tl0
-ti600
-c50M

The DBPing output from a workstation is as follows:

SQL Anywhere Server Ping Utility Version 11.0.1.2355
Attempting to connect using:
UID=dba;PWD=********;DBN=database;ENG=database;LIN KS=all
Attempting to connect to a running server...
Trying to start SharedMemory link ...
SharedMemory link started successfully
Attempting SharedMemory connection (no sasrv.ini cached address)
Failed to connect over SharedMemory
Removing failed address from sasrv.ini cache
Trying to start TCPIP link ...
TCP using Winsock version 2.2
My IP address is 192.168.1.107
My IP address is ::1
My IP address is 127.0.0.1
TCPIP link started successfully
Attempting TCPIP connection (no sasrv.ini cached address)
Looking for server with name needles
Sending broadcast to find server
Using broadcast address of: 192.168.1.255:2638
Sending broadcast to find server
Using broadcast address of: 127.255.255.255:2638
Sending broadcast to find server
Using broadcast address of: (ff02::1):2638
Found database server at address 192.168.1.201:2638
Found database server needles on TCPIP link
Connected using client address 0.0.0.0:57015
Connected to server over TCPIP at address 192.168.1.201:2638
Writing server address 192.168.1.201:2638 to sasrv.ini cache
TCP/IP link, function send(), error code 10054
Communication function ApplicationConnect code 2
Client disconnected
Cannot connect to server
Ping database failed -- Connection error: Found server but communication
error occurred.


Any ideas what would be causing the connection to fail?
I assume the issue lies somewhere with the fact that the client IP Address
is: 192.168.1.107, but later in DBPing there is a line indicating that it's
"Connected using client address 0.0.0.0:57015"
Firewalls have been disabled on the Windows XP workstation "server" hosting
the database.
The client computer can PING the "server" correctly.
The client computer runs DBLocate and successfully finds the database
running at the correct address each time.
This problem is occurring on all of their computers and is random (though it
fails more often than not).
The "server" computer has a static IP Address, the remaining workstations
have DHCP assigned IP Addresses from a Netgear router.
The client did not start having this problem until they had added a new
switch. The new switch (24-port) connects to an 8-port switch which
connects to the router. The "server" is plugged into the 24-port switch and
the workstations are plugged into the 8-port switch. However, the client
assures me they removed the new switch to rule that out as the cause of the
problem and they continue to have the issue.
Any help with this would be greatly appreciated.

Thanks in advance!
- Jesse

Reply With Quote
  #2  
Old   
Jeff Albion [Sybase iAnywhere]
 
Posts: n/a

Default Re: SQL Anywhere 11.0.1.2355 and ODBC connection fails 9 times outof 10 - 01-12-2010 , 12:41 PM






Hi Jesse,

On 1/12/2010 1:14 PM, Jesse wrote:
Quote:
We have a client running SQL Anywhere 11.0.1.2355 and hosting their
database on a Windows XP SP3 32-bit workstation. When they try to
connect to the database, 9 times out of 10 the connection fails.
The SQL Anywhere service is configured as follows:

C:\database\database.db
-n database
-tl0
-ti600
-c50M
I would highly recommend disabling the "-tl 0" argument - this removes
the ability for the server to send TCP "liveness" packets to keep a
connection open - which may be a major factor in your issue.

Quote:
SQL Anywhere Server Ping Utility Version 11.0.1.2355
Found database server at address 192.168.1.201:2638
Found database server needles on TCPIP link
Connected using client address 0.0.0.0:57015
Connected to server over TCPIP at address 192.168.1.201:2638
Writing server address 192.168.1.201:2638 to sasrv.ini cache
TCP/IP link, function send(), error code 10054
Communication function ApplicationConnect code 2
Client disconnected
Cannot connect to server
Ping database failed -- Connection error: Found server but communication
error occurred.

Any ideas what would be causing the connection to fail?
I assume the issue lies somewhere with the fact that the client IP
Address is: 192.168.1.107, but later in DBPing there is a line
indicating that it's "Connected using client address 0.0.0.0:57015"
This output is correct and is expected. The client (192.168.1.107)
connects to the server (192.168.1.201) on a known port (2638). The
client-side port used for the outbound TCP connection by the client
however is dynamically assigned by the OS, and in this case it happens
to be "57015". Running "netstat -a" at a Command Prompt should confirm this.

Quote:
Firewalls have been disabled on the Windows XP workstation "server"
hosting the database.
The client computer can PING the "server" correctly.
The client computer runs DBLocate and successfully finds the database
running at the correct address each time.
This problem is occurring on all of their computers and is random
(though it fails more often than not).
I agree - it seems the the UDP broadcast to find the server is fine, but
the TCP connect attempt (eventually?) fails with a 10054 (WSAECONNRESET
- http://msdn.microsoft.com/en-us/libr...VS.85%29.aspx).
This means that the socket between the client and server is getting
dropped, either by the software, or by the hardware. Have you tried
running the database server with the "-z -o console.txt" switches and
seeing if there is anything logged on the server side?

Quote:
The "server" computer has a static IP Address, the remaining
workstations have DHCP assigned IP Addresses from a Netgear router.
The client did not start having this problem until they had added a new
switch. The new switch (24-port) connects to an 8-port switch which
connects to the router. The "server" is plugged into the 24-port switch
and the workstations are plugged into the 8-port switch. However, the
client assures me they removed the new switch to rule that out as the
cause of the problem and they continue to have the issue.
If you find after examining the logs that both sides "drop" the
connection unexpectedly (e.g. both the server and the client report an
error in the logs simultaneously), you should try switching out the
network hardware again.

Regards,

--
Jeff Albion, Sybase iAnywhere

iAnywhere Developer Community :
http://www.sybase.com/developer/libr...ere-techcorner
iAnywhere Documentation : http://www.ianywhere.com/developer/product_manuals
SQL Anywhere Patches and EBFs :
http://downloads.sybase.com/swd/summ...&timeframe =0
Report a Bug/Open a Case : http://case-express.sybase.com/cx/

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.