Subject: | DBD::Sybase 1.09 unable to connect to ASE 15.0.2 via Kerberos |
Hi
I have recently built DBI-1.608 and DBD-Sybase-1.09 on RHEL 5.3 64bit.
Connecting "normally" to an ASE 15.0.2 dataserver using this build works
fine. Connecting with isql via Kerberos also works fine.
Unfortunately, connecting with the built DBD::Sybase module via Kerberos
does not work. The only error message I receive from the data server is
"error string not available". More details below and attached.
1) First, I obtain a Kerberos ticket
$ env - /usr/kerberos/bin/kinit -V -k -t
/home/ruscoeke/Kerberos/grBatch@SWISSBANK.COM grBatch@SWISSBANK.COM
Authenticated to Kerberos v5
2) Next, I test that connecting to the dataserver using isql via Kerberos
works.
$ env - \
PATH=/bin:/usr/bin:/usr/kerberos/bin \
SYBASE=/sbcimp/run/tp/sybase/OpenClientServer/v15.0ebf14845-KRBPRLM \
SYBASE_OCS=OCS-15_0 \
/sbcimp/run/tp/sybase/OpenClientServer/v15.0ebf14845-KRBPRLM/OCS-15_0/bin/isql
-V -S SM_GR_QA4_SQL
Show quoted text
1> quit
3) Finally, I run the attached dbd-sybase.perl.txt script, which fails
to connect. See the attachments for details.
Attachments
-----------
dbd-sybase.ldd_out.txt: library dependencies for the DBD::Sybase module
I have built.
dbd-sybase.perl.txt: the test script I am using to connect to ASE 15.0.2
using DBD::Sybase via Kerberos.
dbd-sybase.dbi_trace_out.txt: output of test script with DBI_TRACE set to 2.
dbd-sybase.strace_out.txt: abbreviated output of test script using strace.
Many thanks for any help you can give.
Regards
Kevin Ruscoe
Subject: | dbd-sybase.perl.txt |
#!/sbcimp/run/pd/perl/32-bit/5.8.8/bin/perl
use strict;
use warnings;
use lib qw( /home/ruscoeke/workspaces/TPO/products/cpan-extra/install/cpan-extra-dbd-sybase-5.8.8-2009.07/RHEL5/cpan-extra-dbd-sybase-5.8.8-2009.07/lib );
use DBI;
my $dbh = DBI->connect( 'dbi:Sybase:server=SM_GR_QA4_SQL;kerberos=SM_GR_QA4_SQL', '', '' );
my $rows_ref = $dbh->selectall_arrayref('SELECT @@version');
print "$rows_ref->[0][0]\n";
Subject: | dbd-sybase.ldd_out.txt |
$ env - \
/usr/bin/ldd
/home/ruscoeke/workspaces/TPO/products/cpan-extra/install/cpan-extra-dbd-sybase-5.8.8-2009.07/RHEL5/cpan-extra-dbd-sybase-5.8.8-2009.07/lib/auto/DBD/Sybase/Sybase.so
linux-gate.so.1 => (0xffffe000)
libsybct.so =>
/sbcimp/run/tp/sybase/OpenClientServer/v15.0ebf14845-KRBPRLM/OCS-15_0/lib/libsybct.so
(0xf7ead000)
libsybcs.so =>
/sbcimp/run/tp/sybase/OpenClientServer/v15.0ebf14845-KRBPRLM/OCS-15_0/lib/libsybcs.so
(0xf7e9f000)
libsybtcl.so =>
/sbcimp/run/tp/sybase/OpenClientServer/v15.0ebf14845-KRBPRLM/OCS-15_0/lib/libsybtcl.so
(0xf7e82000)
libsybcomn.so =>
/sbcimp/run/tp/sybase/OpenClientServer/v15.0ebf14845-KRBPRLM/OCS-15_0/lib/libsybcomn.so
(0xf7e02000)
libsybintl.so =>
/sbcimp/run/tp/sybase/OpenClientServer/v15.0ebf14845-KRBPRLM/OCS-15_0/lib/libsybintl.so
(0xf7dfb000)
libsybblk.so =>
/sbcimp/run/tp/sybase/OpenClientServer/v15.0ebf14845-KRBPRLM/OCS-15_0/lib/libsybblk.so
(0xf7de6000)
libdl.so.2 => /lib/libdl.so.2 (0xf7dc9000)
libm.so.6 => /lib/libm.so.6 (0xf7da2000)
libc.so.6 => /lib/libc.so.6 (0xf7c5d000)
libnsl.so.1 => /lib/libnsl.so.1 (0xf7c46000)
libsybunic.so =>
/sbcimp/run/tp/sybase/OpenClientServer/v15.0ebf14845-KRBPRLM/OCS-15_0/lib/libsybunic.so
(0xf7bd9000)
/lib/ld-linux.so.2 (0x004b6000)
Subject: | dbd-sybase.strace_out.txt |
$ env - \
PATH=/bin:/usr/bin:/usr/kerberos/bin \
SYBASE=/sbcimp/run/tp/sybase/OpenClientServer/v15.0ebf14845-KRBPRLM \
SYBASE_OCS=OCS-15_0 \
strace -f ./dbd-sybase.perl
[snip]
open("/sbcimp/run/tp/sybase/OpenClientServer/v15.0ebf14845-KRBPRLM/locales/message/us_english/ctlib.loc", O_RDONLY) = 5
read(5, "; \"ctlib.loc\" - Localization fil"..., 512) = 512
read(5, "eement specifying the Government"..., 512) = 512
read(5, "e to get origin message string\"\n"..., 512) = 512
close(5) = 0
write(2, "ct_con_props(CS_SEC_NETWORKAUTH)"..., 206ct_con_props(CS_SEC_NETWORKAUTH) failed at /home/ruscoeke/workspaces/TPO/products/cpan-extra/install/cpan-extra-dbd-sybase-5.8.8-2009.07/RHEL5/cpan-extra-dbd-sybase-5.8.8-2009.07/lib/DBD/Sybase.pm line 92.
) = 206
[snip]
Subject: | dbd-sybase.dbi_trace_out.txt |
$ env - \
PATH=/bin:/usr/bin:/usr/kerberos/bin \
SYBASE=/sbcimp/run/tp/sybase/OpenClientServer/v15.0ebf14845-KRBPRLM \
SYBASE_OCS=OCS-15_0 \
DBI_TRACE=2 \
./dbd-sybase.perl
DBI 1.608-ithread default trace level set to 0x0/2 (pid 25095) at DBI.pm line 273 via dbd-sybase.perl line 6
-> DBI->connect(dbi:Sybase:server=SM_GR_QA4_SQL;kerberos=SM_GR_QA4_SQL, , ****)
-> DBI->install_driver(Sybase) for linux perl=5.008008 pid=25095 ruid=8620 euid=8620
install_driver: DBD::Sybase version 1.09 loaded from /home/ruscoeke/workspaces/TPO/products/cpan-extra/install/cpan-extra-dbd-sybase-5.8.8-2009.07/RHEL5/cpan-extra-dbd-sybase-5.8.8-2009.07/lib/DBD/Sybase.pm
<- install_driver= DBI::dr=HASH(0x84427c8)
!! warn: 0 CLEARED by call to connect method
-> connect for DBD::Sybase::dr (DBI::dr=HASH(0x84427c8)~0x8442924 'server=SM_GR_QA4_SQL;kerberos=SM_GR_QA4_SQL' '' **** HASH(0x8451264)) thr#838e008
ct_con_props(CS_SEC_NETWORKAUTH) failed at /home/ruscoeke/workspaces/TPO/products/cpan-extra/install/cpan-extra-dbd-sybase-5.8.8-2009.07/RHEL5/cpan-extra-dbd-sybase-5.8.8-2009.07/lib/DBD/Sybase.pm line 92.
DESTROY for DBI::db=HASH(0x8532390) ignored - handle not initialised
!! ERROR: 12 'OpenClient message: LAYER = (7) ORIGIN = (9) SEVERITY = (5) NUMBER = (12)
Server SM_GR_QA4_SQL, database
Message String: ct_con_props(SET): security service layer: internal security control layer error: error string not available
' (err#0)
<- connect= undef at DBI.pm line 640
-> $DBI::errstr (&) FETCH from lasth=HASH
<- $DBI::errstr= 'OpenClient message: LAYER = (7) ORIGIN = (9) SEVERITY = (5) NUMBER = (12)
Server SM_GR_QA4_SQL, database
Message String: ct_con_props(SET): security service layer: internal security control layer error: error string not available
'
DBI connect('server=SM_GR_QA4_SQL;kerberos=SM_GR_QA4_SQL','',...) failed: OpenClient message: LAYER = (7) ORIGIN = (9) SEVERITY = (5) NUMBER = (12)
Server SM_GR_QA4_SQL, database
Message String: ct_con_props(SET): security service layer: internal security control layer error: error string not available
DBI connect('server=SM_GR_QA4_SQL;kerberos=SM_GR_QA4_SQL','',...) failed: OpenClient message: LAYER = (7) ORIGIN = (9) SEVERITY = (5) NUMBER = (12)
Server SM_GR_QA4_SQL, database
Message String: ct_con_props(SET): security service layer: internal security control layer error: error string not available
at ./dbd-sybase.perl line 8
Can't call method "selectall_arrayref" on an undefined value at ./dbd-sybase.perl line 10.
-- DBI::END ($@: , $!: )
!! ERROR: 12 CLEARED by call to disconnect_all method
-> disconnect_all for DBD::Sybase::dr (DBI::dr=HASH(0x84427c8)~0x8442924) thr#838e008
<- disconnect_all= 1 at DBI.pm line 719
! -> DESTROY in DBD::_::common for DBD::Sybase::dr (DBI::dr=HASH(0x8442924)~INNER) thr#838e008
! <- DESTROY= undef during global destruction