Perl - problem installing or connecting to a queue manager from MQSeries - 1.34 (reason = 2059)

I tried installing MQSeries 1.34from CPAN, and I was getting an error message that I found a fix on the CPAN error tracking website. So I applied the fix and still got some test errors, but the build seemed to be in order. It is installed using force install MQSeries. Once I installed it, I can create objects and reference libraries in other perl scripts, but when I try to connect to the queue or queue manager, I get an error message.

Any advice on what is wrong with the setup, or how to fix it, and get support and starting my connection, would be much appreciated.

Here are the details of my configuration:

$ uname -srvpio
Linux 2.6.32-573.22.1.el6.x86_64 #1 SMP Thu Mar 17 03:23:39 EDT 2016 x86_64 x86_64 GNU/Linux

$ /opt/mqm/bin/dspmqsver
Name:        WebSphere MQ Advanced Message Security
Version:     7.5.0.0
Level:       p000-L120604
BuildType:   IKAP - (Production)

$ rpm -qa |grep 'MQ' |sort
MQSeriesAMS-7.5.0-0.x86_64
MQSeriesClient-7.5.0-0.x86_64
MQSeriesExplorer-7.5.0-0.x86_64
MQSeriesFTAgent-7.5.0-0.x86_64
MQSeriesFTBase-7.5.0-0.x86_64
MQSeriesFTLogger-7.5.0-0.x86_64
MQSeriesFTService-7.5.0-0.x86_64
MQSeriesFTTools-7.5.0-0.x86_64
MQSeriesGSKit-7.5.0-0.x86_64
MQSeriesJava-7.5.0-0.x86_64
MQSeriesJRE-7.5.0-0.x86_64
MQSeriesMan-7.5.0-0.x86_64
MQSeriesMsg_cs-7.5.0-0.x86_64
MQSeriesMsg_de-7.5.0-0.x86_64
MQSeriesMsg_es-7.5.0-0.x86_64
MQSeriesMsg_fr-7.5.0-0.x86_64
MQSeriesMsg_hu-7.5.0-0.x86_64
MQSeriesMsg_it-7.5.0-0.x86_64
MQSeriesMsg_ja-7.5.0-0.x86_64
MQSeriesMsg_ko-7.5.0-0.x86_64
MQSeriesMsg_pl-7.5.0-0.x86_64
MQSeriesMsg_pt-7.5.0-0.x86_64
MQSeriesMsg_ru-7.5.0-0.x86_64
MQSeriesMsg_Zh_CN-7.5.0-0.x86_64
MQSeriesMsg_Zh_TW-7.5.0-0.x86_64
MQSeriesRuntime-7.5.0-0.x86_64
MQSeriesSamples-7.5.0-0.x86_64
MQSeriesSDK-7.5.0-0.x86_64
MQSeriesServer-7.5.0-0.x86_64
MQSeriesXRClients-7.5.0-0.x86_64
MQSeriesXRService-7.5.0-0.x86_64

$ ./dispModVersion.pl MQSeries
Module                Installed       CPAN
MQSeries                   1.34       1.34

$ perl -v

This is perl 5, version 22, subversion 1 (v5.22.1) built for x86_64-linux

Copyright 1987-2015, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on this system using "man perl" or "perldoc perl".  If you have access to the Internet, point your browser at http://www.perl.org/, the Perl Home Page.

$ perl -V
Summary of my perl5 (revision 5 version 22 subversion 1) configuration:

  Platform:
    osname=linux, osvers=2.6.32-573.22.1.el6.x86_64, archname=x86_64-linux
    uname='linux ******* 2.6.32-573.22.1.el6.x86_64 #1 smp thu mar 17 03:23:39 edt 2016 x86_64 x86_64 x86_64 gnulinux '
    config_args='-des -Dprefix=******'
    hint=recommended, useposix=true, d_sigaction=define
    useithreads=undef, usemultiplicity=undef
    use64bitint=define, use64bitall=define, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cc', ccflags ='-fwrapv -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2',
    optimize='-O2',
    cppflags='-fwrapv -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
    ccversion='', gccversion='4.4.7 20120313 (Red Hat 4.4.7-16)', gccosandvers=''
    intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678, doublekind=3
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16, longdblkind=3
    ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -fstack-protector -L/usr/local/lib'
    libpth=/usr/local/lib /usr/lib /lib/../lib64 /usr/lib/../lib64 /lib /lib64 /usr/lib64 /usr/local/lib64
    libs=-lpthread -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc
    perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
    libc=libc-2.12.so, so=so, useshrplib=false, libperl=libperl.a
    gnulibc_version='2.12'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
    cccdlflags='-fPIC', lddlflags='-shared -O2 -L/usr/local/lib -fstack-protector'


Characteristics of this binary (from libperl):
  Compile-time options: HAS_TIMES PERLIO_LAYERS PERL_DONT_CREATE_GVSV
                        PERL_HASH_FUNC_ONE_AT_A_TIME_HARD PERL_MALLOC_WRAP
                        PERL_NEW_COPY_ON_WRITE PERL_PRESERVE_IVUV
                        USE_64_BIT_ALL USE_64_BIT_INT USE_LARGE_FILES
                        USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE
                        USE_LOCALE_NUMERIC USE_LOCALE_TIME USE_PERLIO
                        USE_PERL_ATOF
  Built under linux
  Compiled at Apr 18 2016 15:46:59
  %ENV:
    PERL5BIN="*******/bin"
    PERL5HOME="*******"
    PERL5SITE="*******/lib/site_perl/5.22.1"
  @INC:
    *******/lib/site_perl/5.22.1/x86_64-linux
    *******/lib/site_perl/5.22.1
    *******/lib/5.22.1/x86_64-linux
    *******/lib/5.22.1

MQSeries, :

t/99-pod.t .. 2/63
#   Failed test 'POD test for MQSeries/Message/IIH.pm'
#   at Test/Pod.pm line 187.
# MQSeries/Message/IIH.pm (415): Non-ASCII character seen before =encoding in 'Villagβ–’mez'. Assuming CP1252
# Looks like you failed 1 test of 63.
t/99-pod.t .. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/63 subtests

Test Summary Report
-------------------
t/99-pod.t (Wstat: 256 Tests: 63 Failed: 1)
  Failed test:  61
  Non-zero exit status: 1
Files=1, Tests=63,  1 wallclock secs ( 0.02 usr  0.01 sys +  0.34 cusr  0.00 csys =  0.37 CPU)
Result: FAIL
Failed 1/1 test programs. 1/63 subtests failed.

MQSeries/Message/IIH.pm, =encoding ISO-8859-1 , CPAN, :

t/99-pod.t .. ok
All tests successful.
Files=1, Tests=63,  0 wallclock secs ( 0.03 usr  0.01 sys +  0.34 cusr  0.01 csys =  0.39 CPU)
Result: PASS
make[1]: Entering directory `build/MQSeries-1.34-SLJq6K/MQClient'
PERL_DL_NONLAZY=1 "perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, '../blib/lib', '../blib/arch')" t/*.t
t/10constants.t ........... ok
t/20convert.t ............. Failed 5/6 subtests
t/30basic.t ............... ok
t/31properties.t .......... ok
t/32async_put.t ........... ok
t/40oo-qmgr.t ............. 3/14 MQCONN failed (Reason = 2059) (Queue manager not available for connection.) at t/40oo-qmgr.t line 38.

#   Failed test 'MQSeries::QueueManager - constructor'
#   at t/40oo-qmgr.t line 39.
t/40oo-qmgr.t ............. 5/14 MQCONN failed (Reason = 2059) (Queue manager not available for connection.) at t/40oo-qmgr.t line 52.

#   Failed test 'MQSeries::QueueManager - Connect'
#   at t/40oo-qmgr.t line 58.
t/40oo-qmgr.t ............. 7/14 MQCONN failed (Reason = 2059) (Queue manager not available for connection.) at t/40oo-qmgr.t line 73.

#   Failed test 'MQSeries::QueueManager - constructor'
#   at t/40oo-qmgr.t line 74.
Can't call method "Open" on an undefined value at t/40oo-qmgr.t line 77.
# Looks like you planned 14 tests but ran 7.
# Looks like you failed 3 tests of 7 run.
# Looks like your test exited with 13 just after 7.
t/40oo-qmgr.t ............. Dubious, test returned 13 (wstat 3328, 0xd00)
Failed 10/14 subtests
t/50oo-command.t .......... ok
t/51oo-command-changes.t .. ok
t/52oo-command-filter.t ... ok
t/60-logs.t ............... ok
t/70-config.t ............. ok

Test Summary Report
-------------------
t/20convert.t           (Wstat: 0 Tests: 2 Failed: 1)
  Failed test:  2
  Parse errors: Bad plan.  You planned 6 tests but ran 2.
t/40oo-qmgr.t           (Wstat: 3328 Tests: 7 Failed: 3)
  Failed tests:  3, 5, 7
  Non-zero exit status: 13
  Parse errors: Bad plan.  You planned 14 tests but ran 7.
Files=11, Tests=5334, 1264 wallclock secs ( 0.96 usr  0.02 sys +  1.56 cusr  0.18 csys =  2.72 CPU)
Result: FAIL
Failed 2/11 test programs. 4/5334 subtests failed.

, , , :

MQCONN failed (Reason = 2059) (Queue manager not available for connection.) at testMQConnectivity.pl line 16.
MQCONN failed (Reason = 2059) (Queue manager not available for connection.) at testMQConnectivity.pl line 16.
at MQSeries/QueueManager.pm line 809.
        MQSeries::QueueManager::Connect(MQSeries::QueueManager=HASH(0x24a7180)) called at MQSeries/QueueManager.pm line 155
        MQSeries::QueueManager::new(undef, "QueueManager", "*******", "Reason", SCALAR(0x151d4f0), "CompCode", SCALAR(0x151d610), "ClientConn", ...) called at testMQConnectivity.pl line 16

CONFIG CPAN MQ, /opt/mqm/samp/bin/amqsputc /opt/mqm/samp/bin/amqsgetc export MQSERVER=..., make test TEST_VERBOSE=1 CPAN, :

/20convert.t:

t/20convert.t .............
1..6
ok 1
ok 2
ok 3
ok 4
MQGET failed: CompCode => 2, Reason => 2033
not ok 5
Message conversion failed.
Should be: 'This msg is in EBCDIC'
Is:        ''
not ok 6
Failed 2/6 subtests

/31properties.t:

t/31properties.t ..........
1..22
ok 1 - use MQClient::MQSeries;
Connecting to queue manager '*******' (MQCONN)
ok 2 - MQCONN
Opening queue manager for inquire
ok 3 - MQOPEN - queue manager
Querying queue manager attributes (MQINQ)
ok 4 - MQINQ
Closing queue manager object handle (MQCLOSE)
ok 5 - MQCLOSE - queue manager
Create message handle object (MQCRTMH)
ok 6 - MQCRTMH
Set message property (MQSETMP - string)
ok 7 - MQSETMP - string
Set message property (MQSETMP - float)
ok 8 - MQSETMP - float
Set message property (MQSETMP - int)
ok 9 - MQSETMP - int
Inquire message property (MQINQMP - float)
ok 10 - MQINQMP - float
ok 11 - MQINQMP - float value okay (3.14164996147156)
Delete float property
ok 12 - MQDLTMP - float
Opening queue '*******' (MQOPEN)
ok 13 - MQOPEN - queue
Putting message with properties (MQPUT)
ok 14 - MQPUT
Create message handle object (MQCRTMH #2)
ok 15 - MQCRTMH \#2
Getting message (MQGET)
not ok 16 - MQGET

#   Failed test 'MQGET'
#   at t/31properties.t line 146.
Inquire message property (MQINQMP - int)
not ok 17 - MQINQMP - int

#   Failed test 'MQINQMP - int'
#   at t/31properties.t line 156.
Use of uninitialized value $prop in concatenation (.) or string at t/31properties.t line 157.
not ok 18 - MQINQMP - int value okay ()

#   Failed test 'MQINQMP - int value okay ()'
#   at t/31properties.t line 157.
#          got: undef
#     expected: '42'
Delete message handle (MQDLTMH)
ok 19 - MQDLTMH
Delete message handle (MQDLTMH #2)
ok 20 - MQDLTMH \#2
Closing queue (MQCLOSE)
ok 21 - MQCLOSE
Disconnecting (MQDISC)
ok 22 - MQDISC
# Looks like you failed 3 tests of 22.
Dubious, test returned 3 (wstat 768, 0x300)
Failed 3/22 subtests

/32async_put.t:

t/32async_put.t ...........
1..25
ok 1 - use MQClient::MQSeries;
Connecting to queue manager '*******' (MQCONN)
ok 2 - MQCONN
Opening queue manager for inquire
ok 3 - MQOPEN - queue manager
Querying queue manager attributes (MQINQ)
MQINQ returned: CompCode => 0, Reason => 0
ok 4 - MQINQ
Closing queue manager object handle (MQCLOSE)
ok 5 - MQCLOSE - queue manager
Opening queue '*******' (MQOPEN)
ok 6 - MQOPEN - queue
Putting message #1 (async MQPUT)
ok 7 - MQPUT - 1
Putting message #2 (async MQPUT)
ok 8 - MQPUT - 2
Putting message #3 (async MQPUT)
ok 9 - MQPUT - 3
Putting message #4 (async MQPUT)
ok 10 - MQPUT - 4
Putting message #5 (async MQPUT)
ok 11 - MQPUT - 5
Getting status info (MQSTAT)
ok 12 - MQSTAT
not ok 13 - MQSTAT result

#   Failed test 'MQSTAT result'
#   at t/32async_put.t line 120.
#     Structures begin differing at:
#          $got->{PutSuccessCount} = '5'
#     $expected->{PutSuccessCount} = '0'
Getting message #1 (MQGET)
ok 14 - MQGET - 1
ok 15 - MQGET message content - 1
Getting message #2 (MQGET)
ok 16 - MQGET - 2
ok 17 - MQGET message content - 2
Getting message #3 (MQGET)
ok 18 - MQGET - 3
ok 19 - MQGET message content - 3
Getting message #4 (MQGET)
ok 20 - MQGET - 4
ok 21 - MQGET message content - 4
Getting message #5 (MQGET)
ok 22 - MQGET - 5
ok 23 - MQGET message content - 5
Closing queue (MQCLOSE)
ok 24 - MQCLOSE
Disconnecting (MQDISC)
ok 25 - MQDISC
# Looks like you failed 1 test of 25.
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/25 subtests

t/40oo-qmgr.t, , :

/40oo-qmgr.t:

t/40oo-qmgr.t .............
1..14
ok 1 - use MQClient::MQSeries;
ok 2 - use MQSeries::QueueManager;
ok 3 - MQSeries::QueueManager - constructor
ok 4 - MQSeries::QueueManager - constructor - AutoConnect=0
ok 5 - MQSeries::QueueManager - Connect
ok 6 - MQSeries::QueueManager - Disconnect
ok 7 - MQSeries::QueueManager - constructor
ok 8 - MQSeries::QueueManager - Open
ok 9 - MQSeries::QueueManager - Inquire
ok 10 - MQSeries::QueueManager - Inquire - Platform
ok 11 - MQSeries::QueueManager - Inquire - CodedCharSetId
ok 12 - MQSeries::QueueManager - Inquire - CommandLevel
ok 13 - MQSeries::QueueManager - Inquire - DeadLetterQName
ok 14 - MQSeries::QueueManager - Close
ok

:

Test Summary Report
-------------------
t/20convert.t           (Wstat: 0 Tests: 6 Failed: 2)
  Failed tests:  5-6
t/31properties.t        (Wstat: 768 Tests: 22 Failed: 3)
  Failed tests:  16-18
  Non-zero exit status: 3
t/32async_put.t         (Wstat: 256 Tests: 25 Failed: 1)
  Failed test:  13
  Non-zero exit status: 1
Files=11, Tests=5345, 183 wallclock secs ( 1.02 usr  0.08 sys +  1.48 cusr  0.18 csys =  2.76 CPU)
Result: FAIL
Failed 3/11 test programs. 6/5345 subtests failed.

, ?

/opt/mqm/samp/bin/amqsputc /opt/mqm/samp/bin/amqsgetc, , , , .

!

+4

Source: https://habr.com/ru/post/1651698/


All Articles