cancel
Showing results for 
Search instead for 
Did you mean: 

Communication function sconn::receive code 4

Former Member
6,377

We have a SQL Anywhere 12 64-bit installation using the most recent 3519 EBF running under Linux. From our ETL application we get the following error though only intermittently:

Error connecting to database: (using class sybase.jdbc4.sqlanywhere.IDriver) [Sybase][JDBC Driver][SQL Anywhere]Connection error: Timeout occurred while waiting for connection response

I enabled the LOG connection parameter on the client to try and get more detailed logging. This has shown the following: Communication function sconn::receive code 4

I cannot find much information if any in the Sybase documentation on this error. I've looked at CPU, memory and IO on the db server using iostat during times we get this error and it doesn't seem to be stressed. We do have Foxhound running to monitor our Production database but haven't found any ovbious problem like blocked or excessive waiting connections. I'd appreciate any information to help further troubleshoot. Thanks.

0 Kudos

This comment is for Graeme Perrow....

We are getting this same error on 3 machines ... the other 15 machines on the network are ok connecting to our production server.

I have narrowed it down by installing SQL Anywhere 16 on 3 machines, and configured all 3 as db servers. Two machines are on one subnet (Windows 7 32 bit machine / Windows 7 64 bit), and the third (Windows Server 2008 64 bit) on a different subnet.

I have 'proven' that it's not a physical topology / switch problem / OS problem, as per the following:

Let's name the 3 machines:

Win2008-64bit - Srv64 Win7 - 64bit - CLI64 Win7 - 32bit - CLI32

Srv64 and CLI64 can connect to CLI32 (the machine with the problem)

CLI32 cannot connect to ANYTHING, even itself, over tcpip.

CLI32 can only connect to itself over a 'shared memory' link

Please enlighten on what we can do from here .. I've never seen anything like this in my life.

0 Kudos

Here is all the information that I can think of for the machine attempting to connect to itself:

1: -c 2: 2M 3: -n 4: abi16uc 5: C:\\gemsql\\abi16UC.db 6: -z

SQL Anywhere Network Server Version 16.0.0.1691

Developer edition, not licensed for deployment.

Copyright © 2014 SAP AG or an SAP affiliate company. All rights reserved. Use of this software is governed by the Sybase License Agreement. Refer to http://www.sybase.com/softwarelicenses.

Connection limit (licensed seats): 3 Processors detected: 1 (containing 4 logical processors) Maximum number of processors the server will use: 1 physical processor(s), 2 core(s) This server is licensed to: Developer Edition Restricted Use Running Windows 7 Build 7601 Service Pack 1 on X86 (X86_64) Server built for X86 processor architecture 2408K of memory used for caching Minimum cache size: 2408K, maximum cache size: 1398276K Using a maximum page size of 4096 bytes Multiprogramming level: minimum:4, current:20, maximum:80 Automatic tuning of multiprogramming level is enabled TCP using Winsock version 2.2 IPv6 support enabled Starting database "abi16UC" (C:\\gemsql\\abi16UC.db) at Thu Jul 31 2014 10:50 Transaction log: abi9-12.log Starting checkpoint of "abi16UC" (abi16UC.db) at Thu Jul 31 2014 10:50 Finished checkpoint of "abi16UC" (abi16UC.db) at Thu Jul 31 2014 10:50 Cache size adjusted to 2668K Database "abi16UC" (abi16UC.db) started at Thu Jul 31 2014 10:50 Database server started at Thu Jul 31 2014 10:50 Trying to start SharedMemory link ... SharedMemory link started successfully Trying to start TCPIP link ... Starting on port 2638 Starting UDP listener on IP address 192.168.58.41:2638 Starting UDP listener on IP address (::1):2638 Starting UDP listener on IP address 127.0.0.1:2638 Looking for server with name abi16uc Sending broadcast to find server Using broadcast address of: 192.168.58.255 Looking for server with name abi16uc Sending broadcast to find server Using broadcast address of: ff02::1 Looking for server with name abi16uc Sending broadcast to find server Using broadcast address of: 127.255.255.255 Server not found (no reply received) TCPIP link started successfully Now accepting requests Starting TCPIP listener on IP address (::):2638 Starting TCPIP listener on IP address 0.0.0.0:2638 Cache size adjusted to 709244K TCP/IP: Received connection request from 192.168.58.41:54508. Connection from 192.168.58.41:54508 assigned connection ID 1 Connection ID 1: Client disconnected

============================================================================================================== [Sybase][ODBC Driver][SQL Anywhere]Connection error: Timeout occurred while waiting for connection response

SQLCODE=-832
SQLSTATE=08001


Connection parameters: User= Password=*** Host=ABI-2012-04-B.absolutebrilliance.local:2638 Server=abi16uc LINKS=TCPIP ENC=NONE ==============================================================================================================

C:\\Users\\administrator>ipconfig

Windows IP Configuration

Ethernet adapter Local Area Connection:

Connection-specific DNS Suffix . : Link-local IPv6 Address . . . . . : fe80::547e:eba7:4a20:75b8%11 IPv4 Address. . . . . . . . . . . : 192.168.58.41 Subnet Mask . . . . . . . . . . . : 255.255.255.0 Default Gateway . . . . . . . . . : 192.168.58.1

Tunnel adapter isatap.{6C2EF952-2F54-4F69-8170-2336EE12C9B3}:

Media State . . . . . . . . . . . : Media disconnected Connection-specific DNS Suffix . :

Tunnel adapter Teredo Tunneling Pseudo-Interface:

Media State . . . . . . . . . . . : Media disconnected Connection-specific DNS Suffix . : =============================================================================================

jeff_albion
Advisor
Advisor
0 Kudos

Hi Joel,

If you're having similar issues, feel free to post a new question (and link back to this one if you think it might be related). Or is this the same installation, on SQL Anywhere 16?

Connection parameters: User= Password=*** Host=ABI-2012-04-B.absolutebrilliance.local:2638 Server=abi16uc LINKS=TCPIP ENC=NONE

Can you try: "HOST=192.168.58.41:2638" or "HOST=127.0.0.1:2638" to see if a direct IP address works?

You'll also want to try a later EBF (16.0.0.1910 or later) if your IPv4 isn't configured correctly:

http://search.sybase.com/kbx/changerequests?bug_id=762317

Accepted Solutions (0)

Answers (1)

Answers (1)

graeme_perrow
Advisor
Advisor

This means that the client made a connection to the database server and then sent a packet but waited for the timeout value (30 seconds for TCP/IP, 5 minutes for shared memory) without receiving a response from the server. This could happen if the server is very busy or (for TCP/IP connections) if there is an intermittent network problem in between the two machines.

Try using the -z -ot server.out switches on the server to see if it logs anything when this happens.

Former Member
0 Kudos

We do have the -z -o switch on the server. I'm not sure if the -ot would log anything additional but there wasn't anything obvious on the server side logs. Can you elaborate on where to find the 30 sec. TCP timeout? I searched through all the SQL Anywhere Database administration manual. I saw the LTO timeout and the tcpip(TO) timeout but those default to 120 and 5 seconds respectively. If that timeout is tuneable, I wonder if we would get some benefit by increasing it. Thanks again for your help.

jeff_albion
Advisor
Advisor
0 Kudos

We do have the -z -o switch on the server.

Can you compare this server information to your ETL client's LOG= information? Do you see a connection coming through, or does it never make it through? You mentioned looking for TCP timeout information, so I'll assume you're using TCP/IP as the transport - is this on the same machine or between different machines?

If it's on different machines, can you run a lower-level network montioring tool between the two points (e.g. Wireshark: http://www.wireshark.org/ ) while the client is making the connection and seeing what the network response is at both ends?

What quality of TCP/IP link are you using between your servers? What hardware is between them, and can they provide any additional information?

Former Member
0 Kudos

We do get entries on the console server log that match up with the connections seen in the client LOG. Messages like "Connection ID 527423: "etl_user" connected and reused pooled connection ID 527415" and "Connection ID 527423: "etl_user" disconnected and cached connection in pool". NIC's are gigabit but ETL is on DMZ size of firewall and DB server is on LAN side connecting over TCP. Interfaces on the firewall are only 100mbps. Wireshark is the next step I will try. I've redirected our firewall logs to a syslog server but not seeing anything obvious yet on that end. Thanks.