PERL trusted connection
Posted in 2013
After upgrading Informix from 11.50 to 11.70, a Perl DBI script that previously worked failed with error -28021 about a missing trusted context. dbaccess worked fine from the same account. The user suspected the Perl CPAN library needed recompilation against the new IDS 11.70 libraries. No confirmed resolution is recorded in the thread.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: Backup & Restore, Installation, Setup & Upgrades, Platform-Specific Issues, Internationalization & Character Sets
Hi, Folks,
[informix@stephanie ontape]$ onstat -version
Program Name: onstat
Build Version: 11.70.FC7
Build Number: N011
Build Host: hans
Build OS: Linux 2.6.18-128.el5
Build Date: Tue Nov 27 21:54:02 CST 2012
Build Timestamp: 27-Nov-2012.21:30:00UTC-06
GLS Version: glslib-5.00.FC8
Just in-place upgraded from 11.50 to 11.70, The upgrade seems successfull .
But my used to be working PERL script does not work now, it complains,
DBI connect('sysmaster','',...) failed: SQL: -28021: A trusted connection
was not established because a trusted context is not
defined or enabled for the specified authorization ID. at
/home/shared/fqu/informix/monitor/sqlnow line 7
could not connect to database
In the Online log message, it has,
17:19:18 listener-thread: err = -28021: oserr = 0: errstr = : A trusted
connection was not established because a trusted context is not
defined or enabled for the specified authorization ID.
17:19:18 listener-thread: err = -28021: oserr = 0: errstr = : A trusted
connection was not established because a trusted context is not
defined or enabled for the specified authorization ID.
when I run finderr, it shows,
[informix@stephanie ontape]$ finderr 28021
Message number -28021 not found.
I attached the related connection part of my PERL script (below),
Any comments?
Thanks
Frank
#!/opt/perl/bin/perl -w
#
#-------------------------------------------------------------
use DBI;
$connect = 'dbi:Informix:sysmaster';
$dbh = DBI->connect($connect) or die "could not connect to database\\
";
$dbh->{ChopBlanks} = 1;
--047d7bf0de3eab417704e13fb3a7
If you run dbaccess from that account, do you get the same error?
Something like:
Echo "select * from systables" | dbaccess sysmaster -
When you updated the server, did you update the Client SDK as well?
From a 12.1 box the error text is:
finderr 28021
-28021 A trusted connection was not established because a trusted context is
not defined or not enabled for the specified authorization ID.
Ensure that the trusted context is correctly defined and enabled, and then
establish a trusted connection.
-Justin
-----Original Message-----
From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of FRANK
Sent: Thursday, July 11, 2013 10:27 AM
To: ids@iiug.org
Subject: PERL trusted connection [30823]
Hi, Folks,
[informix@stephanie ontape]$ onstat -version
Program Name: onstat
Build Version: 11.70.FC7
Build Number: N011
Build Host: hans
Build OS: Linux 2.6.18-128.el5
Build Date: Tue Nov 27 21:54:02 CST 2012
Build Timestamp: 27-Nov-2012.21:30:00UTC-06
GLS Version: glslib-5.00.FC8
Just in-place upgraded from 11.50 to 11.70, The upgrade seems successfull .
But my used to be working PERL script does not work now, it complains,
DBI connect('sysmaster','',...) failed: SQL: -28021: A trusted connection
was not established because a trusted context is not
defined or enabled for the specified authorization ID. at
/home/shared/fqu/informix/monitor/sqlnow line 7
could not connect to database
In the Online log message, it has,
17:19:18 listener-thread: err = -28021: oserr = 0: errstr = : A trusted
connection was not established because a trusted context is not
defined or enabled for the specified authorization ID.
17:19:18 listener-thread: err = -28021: oserr = 0: errstr = : A trusted
connection was not established because a trusted context is not
defined or enabled for the specified authorization ID.
when I run finderr, it shows,
[informix@stephanie ontape]$ finderr 28021
Message number -28021 not found.
I attached the related connection part of my PERL script (below),
Any comments?
Thanks
Frank
#!/opt/perl/bin/perl -w
#
#-------------------------------------------------------------
use DBI;
$connect = 'dbi:Informix:sysmaster';
$dbh = DBI->connect($connect) or die "could not connect to database\\
";
$dbh->{ChopBlanks} = 1;
--047d7bf0de3eab417704e13fb3a7
*******************************************************************************
Forum Note: Use "Reply" to post a response in the discussion forum.
Justin,
dbaceess is perfectly working fine.
I guess the reason could be that the old PERL CPAN libray needs
recompiled and installed against the IDS 11.70 library?
Thanks,
Frank
On Thu, Jul 11, 2013 at 2:52 PM, Justin Killen <
jkillen@allamericanasphalt.com> wrote:
> If you run dbaccess from that account, do you get the same error?
>
> Something like:
>
> Echo "select * from systables" | dbaccess sysmaster -
>
> When you updated the server, did you update the Client SDK as well?
>
> >From a 12.1 box the error text is:
>
> finderr 28021
> -28021 A trusted connection was not established because a trusted context
> is
> not defined or not enabled for the specified authorization ID.
>
> Ensure that the trusted context is correctly defined and enabled, and then
> establish a trusted connection.
>
> -Justin
>
> -----Original Message-----
> From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of
> FRANK
> Sent: Thursday, July 11, 2013 10:27 AM
> To: ids@iiug.org
> Subject: PERL trusted connection [30823]
>
> Hi, Folks,
>
> [informix@stephanie ontape]$ onstat -version
> Program Name: onstat
> Build Version: 11.70.FC7
> Build Number: N011
> Build Host: hans
> Build OS: Linux 2.6.18-128.el5
> Build Date: Tue Nov 27 21:54:02 CST 2012
> Build Timestamp: 27-Nov-2012.21:30:00UTC-06
> GLS Version: glslib-5.00.FC8
>
> Just in-place upgraded from 11.50 to 11.70, The upgrade seems successfull .
>
> But my used to be working PERL script does not work now, it complains,
>
> DBI connect('sysmaster','',...) failed: SQL: -28021: A trusted connection
> was not established because a trusted context is not
> defined or enabled for the specified authorization ID. at
> /home/shared/fqu/informix/monitor/sqlnow line 7
> could not connect to database
>
> In the Online log message, it has,
>
> 17:19:18 listener-thread: err = -28021: oserr = 0: errstr = : A trusted
> connection was not established because a trusted context is not
> defined or enabled for the specified authorization ID.
> 17:19:18 listener-thread: err = -28021: oserr = 0: errstr = : A trusted
> connection was not established because a trusted context is not
> defined or enabled for the specified authorization ID.
>
> when I run finderr, it shows,
>
> [informix@stephanie ontape]$ finderr 28021
> Message number -28021 not found.
>
> I attached the related connection part of my PERL script (below),
>
> Any comments?
>
> Thanks
> Frank
>
> #!/opt/perl/bin/perl -w
> #
> #-------------------------------------------------------------
>
> use DBI;
>
> $connect = 'dbi:Informix:sysmaster';
>
> $dbh = DBI->connect($connect) or die "could not connect to database\\
";
>
> $dbh->{ChopBlanks} = 1;
>
> --047d7bf0de3eab417704e13fb3a7
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--001a11c3d4a80b410804e1410a24
Sorry, I'm not familiar enough with how the module works to know if there are
version dependencies that would need a re-compile. I guess it's worth a shot
trying it since it's already broken.
It seems very strange to me that the server is giving you an error that
finderr doesn't know about. I'm not sure, but I would think that finderr would
be installed as part of the client SDK. It almost seems like maybe when you
upgraded the server you installed the binaries into a different directory? I'd
suggest double-checking the environment variables in your Informix startup
script vs. the ones in your script session. Or maybe even do a "find / -name
finder" and see if there are any duplicates.
An FYI - The maintainer of DBD::Informix is active on this list - maybe he'll
have some insight about necessities of recompiling between Informix versions.
-Justin
-----Original Message-----
From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of FRANK
Sent: Thursday, July 11, 2013 12:03 PM
To: ids@iiug.org
Subject: Re: PERL trusted connection [30826]
Justin,
dbaceess is perfectly working fine.
I guess the reason could be that the old PERL CPAN libray needs
recompiled and installed against the IDS 11.70 library?
Thanks,
Frank
On Thu, Jul 11, 2013 at 2:52 PM, Justin Killen <
jkillen@allamericanasphalt.com> wrote:
> If you run dbaccess from that account, do you get the same error?
>
> Something like:
>
> Echo "select * from systables" | dbaccess sysmaster -
>
> When you updated the server, did you update the Client SDK as well?
>
> >From a 12.1 box the error text is:
>
> finderr 28021
> -28021 A trusted connection was not established because a trusted context
> is
> not defined or not enabled for the specified authorization ID.
>
> Ensure that the trusted context is correctly defined and enabled, and then
> establish a trusted connection.
>
> -Justin
>
> -----Original Message-----
> From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of
> FRANK
> Sent: Thursday, July 11, 2013 10:27 AM
> To: ids@iiug.org
> Subject: PERL trusted connection [30823]
>
> Hi, Folks,
>
> [informix@stephanie ontape]$ onstat -version
> Program Name: onstat
> Build Version: 11.70.FC7
> Build Number: N011
> Build Host: hans
> Build OS: Linux 2.6.18-128.el5
> Build Date: Tue Nov 27 21:54:02 CST 2012
> Build Timestamp: 27-Nov-2012.21:30:00UTC-06
> GLS Version: glslib-5.00.FC8
>
> Just in-place upgraded from 11.50 to 11.70, The upgrade seems successfull .
>
> But my used to be working PERL script does not work now, it complains,
>
> DBI connect('sysmaster','',...) failed: SQL: -28021: A trusted connection
> was not established because a trusted context is not
> defined or enabled for the specified authorization ID. at
> /home/shared/fqu/informix/monitor/sqlnow line 7
> could not connect to database
>
> In the Online log message, it has,
>
> 17:19:18 listener-thread: err = -28021: oserr = 0: errstr = : A trusted
> connection was not established because a trusted context is not
> defined or enabled for the specified authorization ID.
> 17:19:18 listener-thread: err = -28021: oserr = 0: errstr = : A trusted
> connection was not established because a trusted context is not
> defined or enabled for the specified authorization ID.
>
> when I run finderr, it shows,
>
> [informix@stephanie ontape]$ finderr 28021
> Message number -28021 not found.
>
> I attached the related connection part of my PERL script (below),
>
> Any comments?
>
> Thanks
> Frank
>
> #!/opt/perl/bin/perl -w
> #
> #-------------------------------------------------------------
>
> use DBI;
>
> $connect = 'dbi:Informix:sysmaster';
>
> $dbh = DBI->connect($connect) or die "could not connect to database\\
";
>
> $dbh->{ChopBlanks} = 1;
>
> --047d7bf0de3eab417704e13fb3a7
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--001a11c3d4a80b410804e1410a24
*******************************************************************************
Forum Note: Use "Reply" to post a response in the discussion forum.
There is/was a bug in CSDK such that the meaning of a flag bit changed,
triggering that problem (the error message is quite distinctive). I seem
to remember it was encountered 2-3 years ago now (Gmail tells me it was
2010-11-24), and it quickly subsided as an issue. IIRC (and I probably
don't), it occurs when code compiled with an old CSDK was run using new
CSDK libraries. Also, IIRC, it affects the CONNECT statement rather than
implicit connections using the DATABASE statement.
The issue there was an upgrade from '11.50.UC7 to 11.70.UC1'. I forget what
the exact fix was, and whether the trouble was with the 11.50 (3.50) or the
11.70 (3.70) versions, but the combination of 'code compiled with older
CSDK running against newer code' ran into this trouble.
Recompilation will fix the issue.
Email sent to another person named Frank on 2011-01-06:
Sorry about that - though it isn't DBD::Informix's fault at all. There's a
> bug in the CSDK 3.70.xC1 libraries which means that code compiled with 3.50
> but run with 3.70 gets this error.
> There are two relatively simple solutions - both work.
> *Primary:*
>
> - Recompile DBD::Informix with CSDK 3.70.
>
>
> - Expect to re-recompile when 3.70.xC2 is available.
>
> *Secondary:*
>
> - Run the DBD::Informix compiled with CSDK 3.50 against 3.50 runtime
> libraries - you can connect OK to 11.70 servers like that.
>
>
> There is no denying that this should not be happening at all; it is a
> known defect that will be fixed in the 3.70.xC2 fix pack. Offhand, I think
> that will mean that code built with 3.70.xC1 will need recompiling with
> 3.70.xC2 when it comes out (later in 1Q2011). [...]
On Thu, Jul 11, 2013 at 10:27 AM, FRANK <yunyaoqu@gmail.com> wrote:
> Hi, Folks,
>
> [informix@stephanie ontape]$ onstat -version
> Program Name: onstat
> Build Version: 11.70.FC7
> Build Number: N011
> Build Host: hans
> Build OS: Linux 2.6.18-128.el5
> Build Date: Tue Nov 27 21:54:02 CST 2012
> Build Timestamp: 27-Nov-2012.21:30:00UTC-06
> GLS Version: glslib-5.00.FC8
>
> Just in-place upgraded from 11.50 to 11.70, The upgrade seems successfull .
>
> But my used to be working PERL script does not work now, it complains,
>
> DBI connect('sysmaster','',...) failed: SQL: -28021: A trusted connection
> was not established because a trusted context is not
> defined or enabled for the specified authorization ID. at
> /home/shared/fqu/informix/monitor/sqlnow line 7
> could not connect to database
>
> In the Online log message, it has,
>
> 17:19:18 listener-thread: err = -28021: oserr = 0: errstr = : A trusted
> connection was not established because a trusted context is not
> defined or enabled for the specified authorization ID.
> 17:19:18 listener-thread: err = -28021: oserr = 0: errstr = : A trusted
> connection was not established because a trusted context is not
> defined or enabled for the specified authorization ID.
>
> when I run finderr, it shows,
>
> [informix@stephanie ontape]$ finderr 28021
> Message number -28021 not found.
>
> I attached the related connection part of my PERL script (below),
>
> Any comments?
>
> Thanks
> Frank
>
> #!/opt/perl/bin/perl -w
> #
> #-------------------------------------------------------------
>
> use DBI;
>
> $connect = 'dbi:Informix:sysmaster';
>
> $dbh = DBI->connect($connect) or die "could not connect to database\\
";
>
> $dbh->{ChopBlanks} = 1;
>
> --047d7bf0de3eab417704e13fb3a7
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--
Jonathan Leffler <jonathan.leffler@gmail.com> #include <disclaimer.h>
Guardian of DBD::Informix - v2013.0521 - http://dbi.perl.org
"Blessed are we who can laugh at ourselves, for we shall never cease to be
amused."
--001a11c3f8f8bc1d5a04e14533ee
Thanks Jonathan! Yes, we recompiled the PERL DBI driver and it works
perfectly !! Frank
On Thu, Jul 11, 2013 at 8:00 PM, Jonathan Leffler <
jonathan.leffler@gmail.com> wrote:
> There is/was a bug in CSDK such that the meaning of a flag bit changed,
> triggering that problem (the error message is quite distinctive). I seem
> to remember it was encountered 2-3 years ago now (Gmail tells me it was
> 2010-11-24), and it quickly subsided as an issue. IIRC (and I probably
> don't), it occurs when code compiled with an old CSDK was run using new
> CSDK libraries. Also, IIRC, it affects the CONNECT statement rather than
> implicit connections using the DATABASE statement.
>
> The issue there was an upgrade from '11.50.UC7 to 11.70.UC1'. I forget what
> the exact fix was, and whether the trouble was with the 11.50 (3.50) or the
> 11.70 (3.70) versions, but the combination of 'code compiled with older
> CSDK running against newer code' ran into this trouble.
>
> Recompilation will fix the issue.
>
> Email sent to another person named Frank on 2011-01-06:
>
> Sorry about that - though it isn't DBD::Informix's fault at all. There's a
> > bug in the CSDK 3.70.xC1 libraries which means that code compiled with
> 3.50
> > but run with 3.70 gets this error.
> > There are two relatively simple solutions - both work.
> > *Primary:*
> >
> > - Recompile DBD::Informix with CSDK 3.70.
> >
> >
> > - Expect to re-recompile when 3.70.xC2 is available.
> >
> > *Secondary:*
> >
> > - Run the DBD::Informix compiled with CSDK 3.50 against 3.50 runtime
> > libraries - you can connect OK to 11.70 servers like that.
> >
> >
> > There is no denying that this should not be happening at all; it is a
> > known defect that will be fixed in the 3.70.xC2 fix pack. Offhand, I
> think
> > that will mean that code built with 3.70.xC1 will need recompiling with
> > 3.70.xC2 when it comes out (later in 1Q2011). [...]
>
> On Thu, Jul 11, 2013 at 10:27 AM, FRANK <yunyaoqu@gmail.com> wrote:
>
> > Hi, Folks,
> >
> > [informix@stephanie ontape]$ onstat -version
> > Program Name: onstat
> > Build Version: 11.70.FC7
> > Build Number: N011
> > Build Host: hans
> > Build OS: Linux 2.6.18-128.el5
> > Build Date: Tue Nov 27 21:54:02 CST 2012
> > Build Timestamp: 27-Nov-2012.21:30:00UTC-06
> > GLS Version: glslib-5.00.FC8
> >
> > Just in-place upgraded from 11.50 to 11.70, The upgrade seems
> successfull .
> >
> > But my used to be working PERL script does not work now, it complains,
> >
> > DBI connect('sysmaster','',...) failed: SQL: -28021: A trusted connection
> > was not established because a trusted context is not
> > defined or enabled for the specified authorization ID. at
> > /home/shared/fqu/informix/monitor/sqlnow line 7
> > could not connect to database
> >
> > In the Online log message, it has,
> >
> > 17:19:18 listener-thread: err = -28021: oserr = 0: errstr = : A trusted
> > connection was not established because a trusted context is not
> > defined or enabled for the specified authorization ID.
> > 17:19:18 listener-thread: err = -28021: oserr = 0: errstr = : A trusted
> > connection was not established because a trusted context is not
> > defined or enabled for the specified authorization ID.
> >
> > when I run finderr, it shows,
> >
> > [informix@stephanie ontape]$ finderr 28021
> > Message number -28021 not found.
> >
> > I attached the related connection part of my PERL script (below),
> >
> > Any comments?
> >
> > Thanks
> > Frank
> >
> > #!/opt/perl/bin/perl -w
> > #
> > #-------------------------------------------------------------
> >
> > use DBI;
> >
> > $connect = 'dbi:Informix:sysmaster';
> >
> > $dbh = DBI->connect($connect) or die "could not connect to database\\
";
> >
> > $dbh->{ChopBlanks} = 1;
> >
> > --047d7bf0de3eab417704e13fb3a7
> >
> >
> >
> >
>
>
*******************************************************************************
> > Forum Note: Use "Reply" to post a response in the discussion forum.
> >
> >
>
> --
> Jonathan Leffler <jonathan.leffler@gmail.com> #include <disclaimer.h>
> Guardian of DBD::Informix - v2013.0521 - http://dbi.perl.org
> "Blessed are we who can laugh at ourselves, for we shall never cease to be
> amused."
>
> --001a11c3f8f8bc1d5a04e14533ee
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--089e0149ca744468d104e15150a2
Related threads
- TABLE AN INDEX REORG
- ROLE FOR USERS
- HDR in Windows
- eliminate duplicate rows
- Fragmentation Elimination Problem