Skip to Content.
Sympa Menu

freetds - [freetds] Connection Pooling

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Shaun Craig <s.craig AT andronics.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: [freetds] Connection Pooling
  • Date: Fri, 29 Oct 2004 13:20:08 +0100

Hi, hoping you can help me with my problem, spent best part of week trying to
get this to work, heres a list of what i can and cant do.

name of server in freetds.conf = LeocateServer
i can tsql -S LeocateServer -U sa -P ruler
this works ok and i can query away

name of pool server in freetds.conf = mypool
i can tdspool mypool ok come up with
Found conf file in /usr/local/etc/pool.conf reading sections
Listening on port 5000
waiting for a connect

so this lets me think that im connect to MS SQL Server ok

but when i try the following
tsql -S mypool -U sa -P ruler i get the following errors
locale is
"LC_CTYPE=en_GB.UTF-8;LC_NUMERIC=C;LC_TIME=C;LC_COLLATE=C;LC_MONETARY=C;LC_MESSAGES=C;LC_PAPER=C;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=C;LC_IDENTIFICATION=C"
locale charset is "UTF-8"
Msg 20004, Level 9, State 0, Server OpenClient, Line 0
Read from SQL server failed.
Msg 20014, Level 9, State 0, Server OpenClient, Line 0
Login incorrect.
There was a problem connecting to the server

connection pool server crashes with a segmentation fault

so i did the following process to debug knowing it will crash at tsql stage,
i
will attach mypool.log, LeocateServer.lgo and the dump for you to view.
pool.log is empty after i run the test below.
$ script pool.log
$ export TDSVER=4.2
$ tdspool mypool &
$ export TDSDUMP=dump
$ tsql ...

freetds.conf
globals not touched

[mypool]
        host = 127.0.0.1
        port = 5000
        tds version = 4.2
        dump file = /usr/local/etc/mypool.log

[LeocateServer]
        host = [ip address] in here
        port = 1433
        tds version = 4.2
        dump file = /usr/local/etc/LeocateServer.log

pool.conf
globals not touched

[mypool]
        user = sa
        password = ruler
        database = Leocate
        server = LeocateServer
        port = 5000
       
any help would be fantastic, thanks and keep up the good work











Starting log file for FreeTDS 0.62.4
on 2004-10-29 12:42:50 with debug level 99.
iconv to convert client-side data to the "iso_1" character set
12:42:50.076230 tds_iconv_info_init: converting "ISO-8859-1"->"UCS-2LE"
12:42:50.076740 Connecting to 192.168.61.2 port 1433, TDS 4.2.
Sending packet @ 12:42:50.077595
0000 02 00 02 00 00 00 00 00-73 76 72 2d 73 75 73 65 |........ svr-suse|
0010 2d 31 38 00 00 00 00 00-00 00 00 00 00 00 00 00 |-18..... ........|
0020 00 00 00 00 00 00 0b 73-61 00 00 00 00 00 00 00 |.......s a.......|
0030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0040 00 00 00 00 00 02 72 75-6c 65 72 00 00 00 00 00 |......ru ler.....|
0050 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0060 00 00 00 00 05 33 37 38-37 36 00 00 00 00 00 00 |.....378 76......|
0070 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0080 00 00 00 05 03 01 06 0a-09 01 00 00 00 00 02 00 |........ ........|
0090 00 00 00 00 74 64 73 70-6f 6f 6c 00 00 00 00 00 |....tdsp ool.....|
00a0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
00b0 00 00 07 4c 65 6f 63 61-74 65 53 65 72 76 65 72 |...Leoca teServer|
00c0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
00d0 00 0d 72 75 6c 65 72 00-00 00 00 00 00 00 00 00 |..ruler. ........|
00e0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
00f0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0100 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0110 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0120 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0130 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0140 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0150 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0160 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0170 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0180 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0190 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
01a0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
01b0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
01c0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
01d0 00 05 04 02 00 00 54 44-53 2d 4c 69 62 72 61 72 |......TD S-Librar|
01e0 0a 00 00 00 00 00 0d 11-75 73 5f 65 6e 67 6c 69 |........ us_engli|
01f0 73 68 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |sh...... ........|


Sending packet @ 12:42:50.079292
0000 02 01 00 4c 00 00 00 00-00 00 00 00 00 00 0a 00 |...L.... ........|
0010 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0030 00 00 00 00 00 00 00 00-00 00 00 00 01 35 31 32 |........ .....512|
0040 00 00 00 03 00 00 00 00-00 00 00 00 |........ ....|


12:42:50.079954 tds_process_login_tokens()
Received header @ 12:42:50.109358
0000 04 01 00 9c 00 00 00 00- |........|


Received packet @ 12:42:50.109616
0000 e3 0f 00 01 06 6d 61 73-74 65 72 06 6d 61 73 74 |.....mas ter.mast|
0010 65 72 ab 3a 00 45 16 00-00 02 00 25 00 43 68 61 |er.:.E.. ...%.Cha|
0020 6e 67 65 64 20 64 61 74-61 62 61 73 65 20 63 6f |nged dat abase co|
0030 6e 74 65 78 74 20 74 6f-20 27 6d 61 73 74 65 72 |ntext to 'master|
0040 27 2e 09 53 51 4c 53 45-52 56 45 52 00 00 00 e3 |'..SQLSE RVER....|
0050 09 00 03 05 69 73 6f 5f-31 01 00 ad 20 00 01 04 |....iso_ 1... ...|
0060 02 00 00 16 4d 69 63 72-6f 73 6f 66 74 20 53 51 |....Micr osoft SQ|
0070 4c 20 53 65 72 76 65 72-00 00 5f 07 00 ff e3 0a |L Server .._.....|
0080 00 04 03 35 31 32 04 34-30 39 36 fd 00 00 00 00 |...512.4 096.....|
0090 00 00 00 00 - |....|


12:42:50.110005 looking for login token, got e3(ENVCHANGE)
12:42:50.110112 tds_process_default_tokens() marker is e3(ENVCHANGE)
tds_get_string: reading 6 from wire to give 6 to client.
tds_get_string: reading 6 from wire to give 6 to client.
12:42:50.110496 looking for login token, got ab(INFO)
12:42:50.110590 tds_process_default_tokens() marker is ab(INFO)
tds_get_string: reading 37 from wire to give 37 to client.
tds_get_string: reading 9 from wire to give 9 to client.
12:42:50.110793 Msg 5701, Level 0, State 2, Server SQLSERVER, Line 0
Changed database context to 'master'.
12:42:50.110878 looking for login token, got e3(ENVCHANGE)
12:42:50.110953 tds_process_default_tokens() marker is e3(ENVCHANGE)
tds_get_string: reading 5 from wire to give 5 to client.
tds_get_string: reading 1 from wire to give 1 to client.
12:42:50.111737 looking for login token, got ad(LOGINACK)
tds_get_string: reading 22 from wire to give 22 to client.
12:42:50.111912 looking for login token, got e3(ENVCHANGE)
12:42:50.111988 tds_process_default_tokens() marker is e3(ENVCHANGE)
tds_get_string: reading 3 from wire to give 3 to client.
tds_get_string: reading 4 from wire to give 4 to client.
12:42:50.112224 looking for login token, got fd(DONE)
12:42:50.112302 tds_process_default_tokens() marker is fd(DONE)
12:42:50.112377 tds_process_end: more_results = 0
was_cancelled = 0
error = 0
done_count_valid = 0
12:42:50.112462 tds_process_end() state set to TDS_IDLE
12:42:50.112534 leaving tds_process_login_tokens() returning 1
Sending packet @ 12:42:50.112640
0000 01 01 00 1b 00 00 00 00-73 65 74 20 74 65 78 74 |........ set text|
0010 73 69 7a 65 20 36 34 35-31 32 20 |size 645 12 |


Received header @ 12:42:50.116812
0000 04 01 00 11 00 00 00 00- |........|


Received packet @ 12:42:50.117053
0000 fd 00 00 be 00 00 00 00-00 |........ .|


12:42:50.117484 processing result tokens. marker is fd(DONE)
12:42:50.117581 tds_process_end: more_results = 0
was_cancelled = 0
error = 0
done_count_valid = 0
12:42:50.117668 tds_process_end() state set to TDS_IDLE
12:42:50.117742 tds_process_result_tokens() state is COMPLETED
Sending packet @ 12:42:50.117872
0000 01 01 00 13 00 00 00 00-75 73 65 20 4c 65 6f 63 |........ use Leoc|
0010 61 74 65 - |ate|


Received header @ 12:42:50.119394
0000 04 01 00 62 00 00 00 00- |...b....|


Received packet @ 12:42:50.119631
0000 e3 10 00 01 07 4c 65 6f-63 61 74 65 06 6d 61 73 |.....Leo cate.mas|
0010 74 65 72 ab 3b 00 45 16-00 00 01 00 26 00 43 68 |ter.;.E. ....&.Ch|
0020 61 6e 67 65 64 20 64 61-74 61 62 61 73 65 20 63 |anged da tabase c|
0030 6f 6e 74 65 78 74 20 74-6f 20 27 4c 65 6f 63 61 |ontext t o 'Leoca|
0040 74 65 27 2e 09 53 51 4c-53 45 52 56 45 52 00 01 |te'..SQL SERVER..|
0050 00 fd 00 00 e2 00 00 00-00 00 |........ ..|


12:42:50.119902 processing result tokens. marker is e3(ENVCHANGE)
12:42:50.119982 tds_process_default_tokens() marker is e3(ENVCHANGE)
tds_get_string: reading 7 from wire to give 7 to client.
tds_get_string: reading 6 from wire to give 6 to client.
12:42:50.120536 processing result tokens. marker is ab(INFO)
12:42:50.120639 tds_process_default_tokens() marker is ab(INFO)
tds_get_string: reading 38 from wire to give 38 to client.
tds_get_string: reading 9 from wire to give 9 to client.
12:42:50.120837 Msg 5701, Level 0, State 1, Server SQLSERVER, Line 1
Changed database context to 'Leocate'.
12:42:50.120922 processing result tokens. marker is fd(DONE)
12:42:50.120999 tds_process_end: more_results = 0
was_cancelled = 0
error = 0
done_count_valid = 0
12:42:50.121113 tds_process_end() state set to TDS_IDLE
12:42:50.121200 tds_process_result_tokens() state is COMPLETED
Received header @ 12:43:24.493791
0000 02 00 02 00 00 00 00 00- |........|


Received packet @ 12:43:24.494104
0000 73 76 72 2d 73 75 73 65-2d 31 38 00 00 00 00 00 |svr-suse -18.....|
0010 00 00 00 00 00 00 00 00-00 00 00 00 00 00 0b 73 |........ .......s|
0020 61 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |a....... ........|
0030 00 00 00 00 00 00 00 00-00 00 00 00 00 02 72 75 |........ ......ru|
0040 6c 65 72 00 00 00 00 00-00 00 00 00 00 00 00 00 |ler..... ........|
0050 00 00 00 00 00 00 00 00-00 00 00 00 05 33 37 38 |........ .....378|
0060 37 36 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |76...... ........|
0070 00 00 00 00 00 00 00 00-00 00 00 05 03 01 06 0a |........ ........|
0080 09 01 00 00 00 00 02 00-00 00 00 00 54 53 51 4c |........ ....TSQL|
0090 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
00a0 00 00 00 00 00 00 00 00-00 00 04 6d 79 70 6f 6f |........ ...mypoo|
00b0 6c 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |l....... ........|
00c0 00 00 00 00 00 00 00 00-00 06 72 75 6c 65 72 00 |........ ..ruler.|
00d0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
00e0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
00f0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0100 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0110 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0120 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0130 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0140 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0150 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0160 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0170 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0180 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0190 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
01a0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
01b0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
01c0 00 00 00 00 00 00 00 00-00 05 04 02 00 00 54 44 |........ ......TD|
01d0 53 2d 4c 69 62 72 61 72-0a 00 00 00 00 00 0d 11 |S-Librar ........|
01e0 75 73 5f 65 6e 67 6c 69-73 68 00 00 00 00 00 00 |us_engli sh......|
01f0 00 00 00 00 00 00 00 00- |........|









Archive powered by MHonArc 2.6.24.

Top of Page