public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* IBM MQ client application fails on latest cygwin
@ 2021-04-06 13:16 Morten Kjærulff
  2021-04-06 14:24 ` Takashi Yano
  2021-04-06 14:37 ` Takashi Yano
  0 siblings, 2 replies; 13+ messages in thread
From: Morten Kjærulff @ 2021-04-06 13:16 UTC (permalink / raw)
  To: cygwin

Hi,

Came back from easter vacation today and updated my cygwin
installation. I havn't touched my PC since March 26.

I have a non-cygwin IBM MQSeries client application which I call from
a script. It connects to my z/OS MQ server.

When I run it from a windows command prompt, it works fine.

When I run it from mintty, it fails in a strange way.
On my PC I see
2539 (09EB) (RC2539): MQRC_CHANNEL_CONFIG_ERROR
On z/OS I see
CSQX575E QMGR CSQXRESP Negotiation failed for channel
CSQX228E QMGR CSQXRESP Listener unable to start channel,
channel ????
TRPTYPE=TCP INDISP=QMGR
So it seems some garbage has been sent.

Installing old versions of mintty gives the same result.

Installing an old version of cygwin seems to resolve the issue:
3.2.0-1 fail
3.1.7-1 fine

How can I help?

/Morten

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: IBM MQ client application fails on latest cygwin
  2021-04-06 13:16 IBM MQ client application fails on latest cygwin Morten Kjærulff
@ 2021-04-06 14:24 ` Takashi Yano
  2021-04-06 14:37 ` Takashi Yano
  1 sibling, 0 replies; 13+ messages in thread
From: Takashi Yano @ 2021-04-06 14:24 UTC (permalink / raw)
  To: cygwin

On Tue, 6 Apr 2021 15:16:56 +0200
Morten Kjærulff wrote:
> I have a non-cygwin IBM MQSeries client application which I call from
> a script. It connects to my z/OS MQ server.
> 
> When I run it from a windows command prompt, it works fine.
> 
> When I run it from mintty, it fails in a strange way.
> On my PC I see
> 2539 (09EB) (RC2539): MQRC_CHANNEL_CONFIG_ERROR
> On z/OS I see
> CSQX575E QMGR CSQXRESP Negotiation failed for channel
> CSQX228E QMGR CSQXRESP Listener unable to start channel,
> channel ????
> TRPTYPE=TCP INDISP=QMGR
> So it seems some garbage has been sent.
> 
> Installing old versions of mintty gives the same result.
> 
> Installing an old version of cygwin seems to resolve the issue:
> 3.2.0-1 fail
> 3.1.7-1 fine
> 
> How can I help?

Could you please try the followings and let me know
the results?

1) Execute 'cmd /c bash' in mintty and run MQ clint.
2) Run cygwin in command prompt and execute 'script', then run MQ client.

-- 
Takashi Yano <takashi.yano@nifty.ne.jp>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: IBM MQ client application fails on latest cygwin
  2021-04-06 13:16 IBM MQ client application fails on latest cygwin Morten Kjærulff
  2021-04-06 14:24 ` Takashi Yano
@ 2021-04-06 14:37 ` Takashi Yano
       [not found]   ` <CA+7cx1o-Npm_ne8v+EB1QfCYPEZ4GB4dJSn3bQozEMm9pK4RgQ@mail.gmail.com>
  1 sibling, 1 reply; 13+ messages in thread
From: Takashi Yano @ 2021-04-06 14:37 UTC (permalink / raw)
  To: cygwin

On Tue, 6 Apr 2021 15:16:56 +0200
Morten Kjærulff wrote:
> When I run it from a windows command prompt, it works fine.

In this case, did you run MQ client from cygwin shell
in command prompt? Or run it in cmd.exe?

-- 
Takashi Yano <takashi.yano@nifty.ne.jp>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: IBM MQ client application fails on latest cygwin
       [not found]   ` <CA+7cx1o-Npm_ne8v+EB1QfCYPEZ4GB4dJSn3bQozEMm9pK4RgQ@mail.gmail.com>
@ 2021-04-07 10:56     ` Takashi Yano
  2021-04-07 11:04       ` Takashi Yano
  0 siblings, 1 reply; 13+ messages in thread
From: Takashi Yano @ 2021-04-07 10:56 UTC (permalink / raw)
  To: cygwin

On Wed, 7 Apr 2021 11:32:59 +0200
Morten Kjærulff wrote:
> On Tue, Apr 6, 2021 at 4:37 PM Takashi Yano wrote:
> >
> > On Tue, 6 Apr 2021 15:16:56 +0200
> > Morten Kjærulff wrote:
> > > When I run it from a windows command prompt, it works fine.
> >
> > In this case, did you run MQ client from cygwin shell
> > in command prompt? Or run it in cmd.exe?
> 
> what works is:
> cmd.exe->bash->script->non-cygwin-mq-client.exe
> 
> what fails is:
> cmd.exe->bash->mintty->bash->script->non-cygwin-mq-client.exe
> 
> also fails:
> cmd.exe->bash->mintty->bash
> and then
> cmd /c bash -c 'script' # script->non-cygwin-mq-client.exe

Thnaks for the report.

What about:
mintty->cmd /c bash->non-cygwin-mq-client.exe ?

-- 
Takashi Yano <takashi.yano@nifty.ne.jp>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: IBM MQ client application fails on latest cygwin
  2021-04-07 10:56     ` Takashi Yano
@ 2021-04-07 11:04       ` Takashi Yano
       [not found]         ` <CA+7cx1rN2pkwV0P=jLQWKcuAU5hcvAgzsCD5si-wn4uk+fDthg@mail.gmail.com>
  0 siblings, 1 reply; 13+ messages in thread
From: Takashi Yano @ 2021-04-07 11:04 UTC (permalink / raw)
  To: cygwin

On Wed, 7 Apr 2021 19:56:24 +0900
Takashi Yano wrote:
> On Wed, 7 Apr 2021 11:32:59 +0200
> Morten Kjærulff wrote:
> > On Tue, Apr 6, 2021 at 4:37 PM Takashi Yano wrote:
> > >
> > > On Tue, 6 Apr 2021 15:16:56 +0200
> > > Morten Kjærulff wrote:
> > > > When I run it from a windows command prompt, it works fine.
> > >
> > > In this case, did you run MQ client from cygwin shell
> > > in command prompt? Or run it in cmd.exe?
> > 
> > what works is:
> > cmd.exe->bash->script->non-cygwin-mq-client.exe
> > 
> > what fails is:
> > cmd.exe->bash->mintty->bash->script->non-cygwin-mq-client.exe
> > 
> > also fails:
> > cmd.exe->bash->mintty->bash
> > and then
> > cmd /c bash -c 'script' # script->non-cygwin-mq-client.exe
> 
> Thnaks for the report.
> 
> What about:
> mintty->cmd /c bash->non-cygwin-mq-client.exe ?

Do you mean your script starting mq-client by "script" ?
I meant /usr/bin/script by "script".

> > cmd.exe->bash->script->non-cygwin-mq-client.exe

If so, what about:
cmd.exe->bash->/usr/bin/script->(your script)->non-cygwin-mq-client.exe ?

-- 
Takashi Yano <takashi.yano@nifty.ne.jp>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: IBM MQ client application fails on latest cygwin
       [not found]         ` <CA+7cx1rN2pkwV0P=jLQWKcuAU5hcvAgzsCD5si-wn4uk+fDthg@mail.gmail.com>
@ 2021-04-08 11:16           ` Takashi Yano
  2021-04-08 12:25             ` Takashi Yano
  0 siblings, 1 reply; 13+ messages in thread
From: Takashi Yano @ 2021-04-08 11:16 UTC (permalink / raw)
  To: cygwin

On Thu, 8 Apr 2021 08:04:26 +0200
Morten Kjærulff wrote:
> On Wed, Apr 7, 2021 at 1:04 PM Takashi Yano wrote:
> >
> > On Wed, 7 Apr 2021 19:56:24 +0900
> > Takashi Yano wrote:
> > > On Wed, 7 Apr 2021 11:32:59 +0200
> > > Morten Kjærulff wrote:
> > > > On Tue, Apr 6, 2021 at 4:37 PM Takashi Yano wrote:
> > > > >
> > > > > On Tue, 6 Apr 2021 15:16:56 +0200
> > > > > Morten Kjærulff wrote:
> > > > > > When I run it from a windows command prompt, it works fine.
> > > > >
> > > > > In this case, did you run MQ client from cygwin shell
> > > > > in command prompt? Or run it in cmd.exe?
> > > >
> > > > what works is:
> > > > cmd.exe->bash->script->non-cygwin-mq-client.exe
> > > >
> > > > what fails is:
> > > > cmd.exe->bash->mintty->bash->script->non-cygwin-mq-client.exe
> > > >
> > > > also fails:
> > > > cmd.exe->bash->mintty->bash
> > > > and then
> > > > cmd /c bash -c 'script' # script->non-cygwin-mq-client.exe
> > >
> > > Thnaks for the report.
> > >
> > > What about:
> > > mintty->cmd /c bash->non-cygwin-mq-client.exe ?
> >
> > Do you mean your script starting mq-client by "script" ?
> > I meant /usr/bin/script by "script".
> >
> > > > cmd.exe->bash->script->non-cygwin-mq-client.exe
> >
> > If so, what about:
> > cmd.exe->bash->/usr/bin/script->(your script)->non-cygwin-mq-client.exe ?
> >
> > --
> > Takashi Yano
> 
> Hi,
> 
> I cooked the issue down to this.
> 
> My script:
> $ cat tmq.sh
> #!/bin/sh
> 
> export MQSERVER='BROWSE/TCP/mvs1(1414)'
> amqsbcgc Q
> 
> amqsbcgc is a sample that comes with MQ:
> $ which amqsbcgc
> /cygdrive/c/Program Files/IBM/WebSphere MQ/tools/c/samples/bin64/amqsbcgc
> 
> It is a C program:
> $ head /cygdrive/c/Program\ Files/IBM/WebSphere\ MQ/tools/c/Samples/amqsbcg0.c
> /* @(#) MQMBID sn=p800-008-171121 su=_A5OAkM6qEeemCpCOEyy4yA
> pn=samples/c/amqsbcg0.c */
> /**********************************************************************/
> /*                                                                    */
> /* Program name: AMQSBCG0                                             */
> /*                                                                    */
> /* Description : Sample program to read and output the message        */
> /*                 descriptor fields, any other message properties    */
> /*                 and the message content of all the messages on a   */
> /*                 queue                                              */
> /*   <copyright                                                       */
> 
> When I run it from a bash prompt, started with cmd.exe->bash.exe, I
> see correct output (2085 means Q not found, which means that we are
> connected ok):
> $ ./tmq.sh
> 
> AMQSBCG0 - starts here
> **********************
> 
>  MQOPEN - 'Q'
>  MQOPEN failed with CompCode:2, Reason:2085
>  MQDISC
> 
> If I start mintty, I see:
> $ ./tmq.sh
> 
> AMQSBCG0 - starts here
> **********************
> 
>  MQCONNX failed with CompCode:2, Reason:2539
> 
> I also see errors at the server side, which means that some sort of
> connection has been made, but it seems to be garbled.
> 
> When we are "under" mintty it does not matter how I call amqsbcgc, it
> always fails, here is one example:
> 
> $ ./tmq.sh
> 
> AMQSBCG0 - starts here
> **********************
> 
>  MQCONNX failed with CompCode:2, Reason:2539
> 
> $ cmd
> Microsoft Windows [Version 10.0.17763.1817]
> (c) 2018 Microsoft Corporation. Alle rettigheder forbeholdes.
> 
> C:\mhome\mqadm>set MQSERVER=BROWSE/TCP/mvs1(1414)
> set MQSERVER=BROWSE/TCP/mvs1(1414)
> 
> C:\mhome\mqadm>amqsbcgc Q
> amqsbcgc Q
> 
> AMQSBCG0 - starts here
> **********************
> 
>  MQCONNX failed with CompCode:2, Reason:2539

In the log above in cmd, input command are echoed twice.
This happens when the pseudo console is not activated. Are you
using Win7 or old Win10? Or do you set CYGWIN=disable_pcon by
any chance?

If you set CYGWIN=disable_pcon, please try unset it.

-- 
Takashi Yano <takashi.yano@nifty.ne.jp>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: IBM MQ client application fails on latest cygwin
  2021-04-08 11:16           ` Takashi Yano
@ 2021-04-08 12:25             ` Takashi Yano
  2021-04-08 13:10               ` Morten Kjærulff
  0 siblings, 1 reply; 13+ messages in thread
From: Takashi Yano @ 2021-04-08 12:25 UTC (permalink / raw)
  To: cygwin

On Thu, 8 Apr 2021 20:16:00 +0900
Takashi Yano wrote:
> On Thu, 8 Apr 2021 08:04:26 +0200
> Morten Kjærulff wrote:
> > On Wed, Apr 7, 2021 at 1:04 PM Takashi Yano wrote:
> > >
> > > On Wed, 7 Apr 2021 19:56:24 +0900
> > > Takashi Yano wrote:
> > > > On Wed, 7 Apr 2021 11:32:59 +0200
> > > > Morten Kjærulff wrote:
> > > > > On Tue, Apr 6, 2021 at 4:37 PM Takashi Yano wrote:
> > > > > >
> > > > > > On Tue, 6 Apr 2021 15:16:56 +0200
> > > > > > Morten Kjærulff wrote:
> > > > > > > When I run it from a windows command prompt, it works fine.
> > > > > >
> > > > > > In this case, did you run MQ client from cygwin shell
> > > > > > in command prompt? Or run it in cmd.exe?
> > > > >
> > > > > what works is:
> > > > > cmd.exe->bash->script->non-cygwin-mq-client.exe
> > > > >
> > > > > what fails is:
> > > > > cmd.exe->bash->mintty->bash->script->non-cygwin-mq-client.exe
> > > > >
> > > > > also fails:
> > > > > cmd.exe->bash->mintty->bash
> > > > > and then
> > > > > cmd /c bash -c 'script' # script->non-cygwin-mq-client.exe
> > > >
> > > > Thnaks for the report.
> > > >
> > > > What about:
> > > > mintty->cmd /c bash->non-cygwin-mq-client.exe ?
> > >
> > > Do you mean your script starting mq-client by "script" ?
> > > I meant /usr/bin/script by "script".
> > >
> > > > > cmd.exe->bash->script->non-cygwin-mq-client.exe
> > >
> > > If so, what about:
> > > cmd.exe->bash->/usr/bin/script->(your script)->non-cygwin-mq-client.exe ?
> > >
> > > --
> > > Takashi Yano
> > 
> > Hi,
> > 
> > I cooked the issue down to this.
> > 
> > My script:
> > $ cat tmq.sh
> > #!/bin/sh
> > 
> > export MQSERVER='BROWSE/TCP/mvs1(1414)'
> > amqsbcgc Q
> > 
> > amqsbcgc is a sample that comes with MQ:
> > $ which amqsbcgc
> > /cygdrive/c/Program Files/IBM/WebSphere MQ/tools/c/samples/bin64/amqsbcgc
> > 
> > It is a C program:
> > $ head /cygdrive/c/Program\ Files/IBM/WebSphere\ MQ/tools/c/Samples/amqsbcg0.c
> > /* @(#) MQMBID sn=p800-008-171121 su=_A5OAkM6qEeemCpCOEyy4yA
> > pn=samples/c/amqsbcg0.c */
> > /**********************************************************************/
> > /*                                                                    */
> > /* Program name: AMQSBCG0                                             */
> > /*                                                                    */
> > /* Description : Sample program to read and output the message        */
> > /*                 descriptor fields, any other message properties    */
> > /*                 and the message content of all the messages on a   */
> > /*                 queue                                              */
> > /*   <copyright                                                       */
> > 
> > When I run it from a bash prompt, started with cmd.exe->bash.exe, I
> > see correct output (2085 means Q not found, which means that we are
> > connected ok):
> > $ ./tmq.sh
> > 
> > AMQSBCG0 - starts here
> > **********************
> > 
> >  MQOPEN - 'Q'
> >  MQOPEN failed with CompCode:2, Reason:2085
> >  MQDISC
> > 
> > If I start mintty, I see:
> > $ ./tmq.sh
> > 
> > AMQSBCG0 - starts here
> > **********************
> > 
> >  MQCONNX failed with CompCode:2, Reason:2539
> > 
> > I also see errors at the server side, which means that some sort of
> > connection has been made, but it seems to be garbled.
> > 
> > When we are "under" mintty it does not matter how I call amqsbcgc, it
> > always fails, here is one example:
> > 
> > $ ./tmq.sh
> > 
> > AMQSBCG0 - starts here
> > **********************
> > 
> >  MQCONNX failed with CompCode:2, Reason:2539
> > 
> > $ cmd
> > Microsoft Windows [Version 10.0.17763.1817]
> > (c) 2018 Microsoft Corporation. Alle rettigheder forbeholdes.

Ah, you are using Win10 1809. Then the pseudo console should be
supported.

> > C:\mhome\mqadm>set MQSERVER=BROWSE/TCP/mvs1(1414)
> > set MQSERVER=BROWSE/TCP/mvs1(1414)
> > 
> > C:\mhome\mqadm>amqsbcgc Q
> > amqsbcgc Q
> > 
> > AMQSBCG0 - starts here
> > **********************
> > 
> >  MQCONNX failed with CompCode:2, Reason:2539
> 
> In the log above in cmd, input command are echoed twice.
> This happens when the pseudo console is not activated. Are you
> using Win7 or old Win10? Or do you set CYGWIN=disable_pcon by
> any chance?
> 
> If you set CYGWIN=disable_pcon, please try unset it.

Probably you set CYGWIN=disable_pcon in .bashrc or elsewhere.
Please try to unset it.

-- 
Takashi Yano <takashi.yano@nifty.ne.jp>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: IBM MQ client application fails on latest cygwin
  2021-04-08 12:25             ` Takashi Yano
@ 2021-04-08 13:10               ` Morten Kjærulff
  2021-04-08 14:04                 ` Takashi Yano
  0 siblings, 1 reply; 13+ messages in thread
From: Morten Kjærulff @ 2021-04-08 13:10 UTC (permalink / raw)
  To: cygwin

On Thu, Apr 8, 2021 at 2:26 PM Takashi Yano wrote:
>
> On Thu, 8 Apr 2021 20:16:00 +0900
> Takashi Yano wrote:
> > On Thu, 8 Apr 2021 08:04:26 +0200
> > Morten Kjærulff wrote:
> > > On Wed, Apr 7, 2021 at 1:04 PM Takashi Yano wrote:
> > > >
> > > > On Wed, 7 Apr 2021 19:56:24 +0900
> > > > Takashi Yano wrote:
> > > > > On Wed, 7 Apr 2021 11:32:59 +0200
> > > > > Morten Kjærulff wrote:
> > > > > > On Tue, Apr 6, 2021 at 4:37 PM Takashi Yano wrote:
> > > > > > >
> > > > > > > On Tue, 6 Apr 2021 15:16:56 +0200
> > > > > > > Morten Kjærulff wrote:
> > > > > > > > When I run it from a windows command prompt, it works fine.
> > > > > > >
> > > > > > > In this case, did you run MQ client from cygwin shell
> > > > > > > in command prompt? Or run it in cmd.exe?
> > > > > >
> > > > > > what works is:
> > > > > > cmd.exe->bash->script->non-cygwin-mq-client.exe
> > > > > >
> > > > > > what fails is:
> > > > > > cmd.exe->bash->mintty->bash->script->non-cygwin-mq-client.exe
> > > > > >
> > > > > > also fails:
> > > > > > cmd.exe->bash->mintty->bash
> > > > > > and then
> > > > > > cmd /c bash -c 'script' # script->non-cygwin-mq-client.exe
> > > > >
> > > > > Thnaks for the report.
> > > > >
> > > > > What about:
> > > > > mintty->cmd /c bash->non-cygwin-mq-client.exe ?
> > > >
> > > > Do you mean your script starting mq-client by "script" ?
> > > > I meant /usr/bin/script by "script".
> > > >
> > > > > > cmd.exe->bash->script->non-cygwin-mq-client.exe
> > > >
> > > > If so, what about:
> > > > cmd.exe->bash->/usr/bin/script->(your script)->non-cygwin-mq-client.exe ?
> > > >
> > > > --
> > > > Takashi Yano
> > >
> > > Hi,
> > >
> > > I cooked the issue down to this.
> > >
> > > My script:
> > > $ cat tmq.sh
> > > #!/bin/sh
> > >
> > > export MQSERVER='BROWSE/TCP/mvs1(1414)'
> > > amqsbcgc Q
> > >
> > > amqsbcgc is a sample that comes with MQ:
> > > $ which amqsbcgc
> > > /cygdrive/c/Program Files/IBM/WebSphere MQ/tools/c/samples/bin64/amqsbcgc
> > >
> > > It is a C program:
> > > $ head /cygdrive/c/Program\ Files/IBM/WebSphere\ MQ/tools/c/Samples/amqsbcg0.c
> > > /* @(#) MQMBID sn=p800-008-171121 su=_A5OAkM6qEeemCpCOEyy4yA
> > > pn=samples/c/amqsbcg0.c */
> > > /**********************************************************************/
> > > /*                                                                    */
> > > /* Program name: AMQSBCG0                                             */
> > > /*                                                                    */
> > > /* Description : Sample program to read and output the message        */
> > > /*                 descriptor fields, any other message properties    */
> > > /*                 and the message content of all the messages on a   */
> > > /*                 queue                                              */
> > > /*   <copyright                                                       */
> > >
> > > When I run it from a bash prompt, started with cmd.exe->bash.exe, I
> > > see correct output (2085 means Q not found, which means that we are
> > > connected ok):
> > > $ ./tmq.sh
> > >
> > > AMQSBCG0 - starts here
> > > **********************
> > >
> > >  MQOPEN - 'Q'
> > >  MQOPEN failed with CompCode:2, Reason:2085
> > >  MQDISC
> > >
> > > If I start mintty, I see:
> > > $ ./tmq.sh
> > >
> > > AMQSBCG0 - starts here
> > > **********************
> > >
> > >  MQCONNX failed with CompCode:2, Reason:2539
> > >
> > > I also see errors at the server side, which means that some sort of
> > > connection has been made, but it seems to be garbled.
> > >
> > > When we are "under" mintty it does not matter how I call amqsbcgc, it
> > > always fails, here is one example:
> > >
> > > $ ./tmq.sh
> > >
> > > AMQSBCG0 - starts here
> > > **********************
> > >
> > >  MQCONNX failed with CompCode:2, Reason:2539
> > >
> > > $ cmd
> > > Microsoft Windows [Version 10.0.17763.1817]
> > > (c) 2018 Microsoft Corporation. Alle rettigheder forbeholdes.
>
> Ah, you are using Win10 1809. Then the pseudo console should be
> supported.
>
> > > C:\mhome\mqadm>set MQSERVER=BROWSE/TCP/mvs1(1414)
> > > set MQSERVER=BROWSE/TCP/mvs1(1414)
> > >
> > > C:\mhome\mqadm>amqsbcgc Q
> > > amqsbcgc Q
> > >
> > > AMQSBCG0 - starts here
> > > **********************
> > >
> > >  MQCONNX failed with CompCode:2, Reason:2539
> >
> > In the log above in cmd, input command are echoed twice.
> > This happens when the pseudo console is not activated. Are you
> > using Win7 or old Win10? Or do you set CYGWIN=disable_pcon by
> > any chance?
> >
> > If you set CYGWIN=disable_pcon, please try unset it.
>
> Probably you set CYGWIN=disable_pcon in .bashrc or elsewhere.
> Please try to unset it.

I explicitly have a
set CYGWIN=
in the .bat file that initially invokes bash.
I do not set CYGWIN= elsewhere (just grep'd for it).

I change my test script to show empy CYGWIN=
$ cat tmq.sh
#!/bin/sh

export MQSERVER='BROWSE/TCP/mvs1(1414)'
echo CYGWIN=$CYGWIN
amqsbcgc Q

$ ./tmq.sh
CYGWIN=

AMQSBCG0 - starts here
**********************

 MQCONNX failed with CompCode:2, Reason:2539

Output of systeminfo:


C:\mhome\mqadm>systeminfo

Host Name:                 DX777
OS Name:                   Microsoft Windows 10 Enterprise
OS Version:                10.0.17763 N/A Build 17763
OS Manufacturer:           Microsoft Corporation
OS Configuration:          Member Workstation
OS Build Type:             Multiprocessor Free
Registered Owner:          admin1
Registered Organization:
Product ID:                00329-00000-00003-AA588
Original Install Date:     21-11-2019, 11:14:32
System Boot Time:          07-04-2021, 10:40:05
System Manufacturer:       LENOVO
System Model:              20BX004NMD
System Type:               x64-based PC
Processor(s):              1 Processor(s) Installed.
                           [01]: Intel64 Family 6 Model 61 Stepping 4
GenuineIntel ~2195 Mhz
BIOS Version:              LENOVO JBET71WW (1.35 ), 14-09-2018
Windows Directory:         C:\WINDOWS
System Directory:          C:\WINDOWS\system32
Boot Device:               \Device\HarddiskVolume1
System Locale:             da;Dansk
Input Locale:              da;Dansk
Time Zone:                 (UTC+01:00) København, Stockholm, Oslo, Madrid, Paris
Total Physical Memory:     7.888 MB
Available Physical Memory: 3.302 MB
Virtual Memory: Max Size:  9.104 MB
Virtual Memory: Available: 3.179 MB
Virtual Memory: In Use:    5.925 MB
Page File Location(s):     C:\pagefile.sys
Domain:                    intern.vp.dk
Logon Server:              \\DS300
Hotfix(s):                 23 Hotfix(s) Installed.
                           [01]: KB4601555
                           [02]: KB4465065
                           [03]: KB4470788
                           [04]: KB4486153
                           [05]: KB4486158
                           [06]: KB4489907
                           [07]: KB4523204
                           [08]: KB4535680
                           [09]: KB4539571
                           [10]: KB4549947
                           [11]: KB4558997
                           [12]: KB4562562
                           [13]: KB4566424
                           [14]: KB4570332
                           [15]: KB4577586
                           [16]: KB4577667
                           [17]: KB4580325
                           [18]: KB4587735
                           [19]: KB4589208
                           [20]: KB4598480
                           [21]: KB4601393
                           [22]: KB5000859
                           [23]: KB5000822
Network Card(s):           4 NIC(s) Installed.
                           [01]: Intel(R) Ethernet Connection (3) I218-V
                                 Connection Name: Ethernet 5
                                 Status:          Media disconnected
                           [02]: Intel(R) Dual Band Wireless-AC 7265
                                 Connection Name: Wi-Fi 3
                                 DHCP Enabled:    Yes
                                 DHCP Server:     192.168.0.1
                                 IP address(es)
                                 [01]: 192.168.0.24
                                 [02]: fe80::2c6e:9e53:e28a:31f2
                           [03]: Bluetooth Device (Personal Area Network)
                                 Connection Name:
Bluetooth-netværksforbindelse 3
                                 Status:          Media disconnected
                           [04]: PANGP Virtual Ethernet Adapter
                                 Connection Name: Ethernet 6
                                 DHCP Enabled:    No
                                 IP address(es)
                                 [01]: 10.51.10.14
Hyper-V Requirements:      VM Monitor Mode Extensions: Yes
                           Virtualization Enabled In Firmware: No
                           Second Level Address Translation: Yes
                           Data Execution Prevention Available: Yes

C:\mhome\mqadm>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: IBM MQ client application fails on latest cygwin
  2021-04-08 13:10               ` Morten Kjærulff
@ 2021-04-08 14:04                 ` Takashi Yano
       [not found]                   ` <CA+7cx1qzAQ8uAGVWBV8SjN=1sP9CRTEnXXr60+HBmmtMSS3zCw@mail.gmail.com>
  0 siblings, 1 reply; 13+ messages in thread
From: Takashi Yano @ 2021-04-08 14:04 UTC (permalink / raw)
  To: cygwin

On Thu, 8 Apr 2021 15:10:54 +0200
Morten Kjærulff wrote:
> On Thu, Apr 8, 2021 at 2:26 PM Takashi Yano wrote:
> >
> > On Thu, 8 Apr 2021 20:16:00 +0900
> > Takashi Yano wrote:
> > > On Thu, 8 Apr 2021 08:04:26 +0200
> > > Morten Kjærulff wrote:
> > > > On Wed, Apr 7, 2021 at 1:04 PM Takashi Yano wrote:
> > > > >
> > > > > On Wed, 7 Apr 2021 19:56:24 +0900
> > > > > Takashi Yano wrote:
> > > > > > On Wed, 7 Apr 2021 11:32:59 +0200
> > > > > > Morten Kjærulff wrote:
> > > > > > > On Tue, Apr 6, 2021 at 4:37 PM Takashi Yano wrote:
> > > > > > > >
> > > > > > > > On Tue, 6 Apr 2021 15:16:56 +0200
> > > > > > > > Morten Kjærulff wrote:
> > > > > > > > > When I run it from a windows command prompt, it works fine.
> > > > > > > >
> > > > > > > > In this case, did you run MQ client from cygwin shell
> > > > > > > > in command prompt? Or run it in cmd.exe?
> > > > > > >
> > > > > > > what works is:
> > > > > > > cmd.exe->bash->script->non-cygwin-mq-client.exe
> > > > > > >
> > > > > > > what fails is:
> > > > > > > cmd.exe->bash->mintty->bash->script->non-cygwin-mq-client.exe
> > > > > > >
> > > > > > > also fails:
> > > > > > > cmd.exe->bash->mintty->bash
> > > > > > > and then
> > > > > > > cmd /c bash -c 'script' # script->non-cygwin-mq-client.exe
> > > > > >
> > > > > > Thnaks for the report.
> > > > > >
> > > > > > What about:
> > > > > > mintty->cmd /c bash->non-cygwin-mq-client.exe ?
> > > > >
> > > > > Do you mean your script starting mq-client by "script" ?
> > > > > I meant /usr/bin/script by "script".
> > > > >
> > > > > > > cmd.exe->bash->script->non-cygwin-mq-client.exe
> > > > >
> > > > > If so, what about:
> > > > > cmd.exe->bash->/usr/bin/script->(your script)->non-cygwin-mq-client.exe ?
> > > > >
> > > > > --
> > > > > Takashi Yano
> > > >
> > > > Hi,
> > > >
> > > > I cooked the issue down to this.
> > > >
> > > > My script:
> > > > $ cat tmq.sh
> > > > #!/bin/sh
> > > >
> > > > export MQSERVER='BROWSE/TCP/mvs1(1414)'
> > > > amqsbcgc Q
> > > >
> > > > amqsbcgc is a sample that comes with MQ:
> > > > $ which amqsbcgc
> > > > /cygdrive/c/Program Files/IBM/WebSphere MQ/tools/c/samples/bin64/amqsbcgc
> > > >
> > > > It is a C program:
> > > > $ head /cygdrive/c/Program\ Files/IBM/WebSphere\ MQ/tools/c/Samples/amqsbcg0.c
> > > > /* @(#) MQMBID sn=p800-008-171121 su=_A5OAkM6qEeemCpCOEyy4yA
> > > > pn=samples/c/amqsbcg0.c */
> > > > /**********************************************************************/
> > > > /*                                                                    */
> > > > /* Program name: AMQSBCG0                                             */
> > > > /*                                                                    */
> > > > /* Description : Sample program to read and output the message        */
> > > > /*                 descriptor fields, any other message properties    */
> > > > /*                 and the message content of all the messages on a   */
> > > > /*                 queue                                              */
> > > > /*   <copyright                                                       */
> > > >
> > > > When I run it from a bash prompt, started with cmd.exe->bash.exe, I
> > > > see correct output (2085 means Q not found, which means that we are
> > > > connected ok):
> > > > $ ./tmq.sh
> > > >
> > > > AMQSBCG0 - starts here
> > > > **********************
> > > >
> > > >  MQOPEN - 'Q'
> > > >  MQOPEN failed with CompCode:2, Reason:2085
> > > >  MQDISC
> > > >
> > > > If I start mintty, I see:
> > > > $ ./tmq.sh
> > > >
> > > > AMQSBCG0 - starts here
> > > > **********************
> > > >
> > > >  MQCONNX failed with CompCode:2, Reason:2539
> > > >
> > > > I also see errors at the server side, which means that some sort of
> > > > connection has been made, but it seems to be garbled.
> > > >
> > > > When we are "under" mintty it does not matter how I call amqsbcgc, it
> > > > always fails, here is one example:
> > > >
> > > > $ ./tmq.sh
> > > >
> > > > AMQSBCG0 - starts here
> > > > **********************
> > > >
> > > >  MQCONNX failed with CompCode:2, Reason:2539
> > > >
> > > > $ cmd
> > > > Microsoft Windows [Version 10.0.17763.1817]
> > > > (c) 2018 Microsoft Corporation. Alle rettigheder forbeholdes.
> >
> > Ah, you are using Win10 1809. Then the pseudo console should be
> > supported.
> >
> > > > C:\mhome\mqadm>set MQSERVER=BROWSE/TCP/mvs1(1414)
> > > > set MQSERVER=BROWSE/TCP/mvs1(1414)
> > > >
> > > > C:\mhome\mqadm>amqsbcgc Q
> > > > amqsbcgc Q
> > > >
> > > > AMQSBCG0 - starts here
> > > > **********************
> > > >
> > > >  MQCONNX failed with CompCode:2, Reason:2539
> > >
> > > In the log above in cmd, input command are echoed twice.
> > > This happens when the pseudo console is not activated. Are you
> > > using Win7 or old Win10? Or do you set CYGWIN=disable_pcon by
> > > any chance?
> > >
> > > If you set CYGWIN=disable_pcon, please try unset it.
> >
> > Probably you set CYGWIN=disable_pcon in .bashrc or elsewhere.
> > Please try to unset it.
> 
> I explicitly have a
> set CYGWIN=
> in the .bat file that initially invokes bash.
> I do not set CYGWIN= elsewhere (just grep'd for it).
> 
> I change my test script to show empy CYGWIN=
> $ cat tmq.sh
> #!/bin/sh
> 
> export MQSERVER='BROWSE/TCP/mvs1(1414)'
> echo CYGWIN=$CYGWIN
> amqsbcgc Q
> 
> $ ./tmq.sh
> CYGWIN=
> 
> AMQSBCG0 - starts here
> **********************
> 
>  MQCONNX failed with CompCode:2, Reason:2539
> 
> Output of systeminfo:
> 
> 
> C:\mhome\mqadm>systeminfo
> 
> Host Name:                 DX777
> OS Name:                   Microsoft Windows 10 Enterprise
> OS Version:                10.0.17763 N/A Build 17763
> OS Manufacturer:           Microsoft Corporation
> OS Configuration:          Member Workstation
> OS Build Type:             Multiprocessor Free
> Registered Owner:          admin1
> Registered Organization:
> Product ID:                00329-00000-00003-AA588
> Original Install Date:     21-11-2019, 11:14:32
> System Boot Time:          07-04-2021, 10:40:05
> System Manufacturer:       LENOVO
> System Model:              20BX004NMD
> System Type:               x64-based PC
> Processor(s):              1 Processor(s) Installed.
>                            [01]: Intel64 Family 6 Model 61 Stepping 4
> GenuineIntel ~2195 Mhz
> BIOS Version:              LENOVO JBET71WW (1.35 ), 14-09-2018
> Windows Directory:         C:\WINDOWS
> System Directory:          C:\WINDOWS\system32
> Boot Device:               \Device\HarddiskVolume1
> System Locale:             da;Dansk
> Input Locale:              da;Dansk
> Time Zone:                 (UTC+01:00) København, Stockholm, Oslo, Madrid, Paris
> Total Physical Memory:     7.888 MB
> Available Physical Memory: 3.302 MB
> Virtual Memory: Max Size:  9.104 MB
> Virtual Memory: Available: 3.179 MB
> Virtual Memory: In Use:    5.925 MB
> Page File Location(s):     C:\pagefile.sys
> Domain:                    intern.vp.dk
> Logon Server:              \\DS300
> Hotfix(s):                 23 Hotfix(s) Installed.
>                            [01]: KB4601555
>                            [02]: KB4465065
>                            [03]: KB4470788
>                            [04]: KB4486153
>                            [05]: KB4486158
>                            [06]: KB4489907
>                            [07]: KB4523204
>                            [08]: KB4535680
>                            [09]: KB4539571
>                            [10]: KB4549947
>                            [11]: KB4558997
>                            [12]: KB4562562
>                            [13]: KB4566424
>                            [14]: KB4570332
>                            [15]: KB4577586
>                            [16]: KB4577667
>                            [17]: KB4580325
>                            [18]: KB4587735
>                            [19]: KB4589208
>                            [20]: KB4598480
>                            [21]: KB4601393
>                            [22]: KB5000859
>                            [23]: KB5000822
> Network Card(s):           4 NIC(s) Installed.
>                            [01]: Intel(R) Ethernet Connection (3) I218-V
>                                  Connection Name: Ethernet 5
>                                  Status:          Media disconnected
>                            [02]: Intel(R) Dual Band Wireless-AC 7265
>                                  Connection Name: Wi-Fi 3
>                                  DHCP Enabled:    Yes
>                                  DHCP Server:     192.168.0.1
>                                  IP address(es)
>                                  [01]: 192.168.0.24
>                                  [02]: fe80::2c6e:9e53:e28a:31f2
>                            [03]: Bluetooth Device (Personal Area Network)
>                                  Connection Name:
> Bluetooth-netværksforbindelse 3
>                                  Status:          Media disconnected
>                            [04]: PANGP Virtual Ethernet Adapter
>                                  Connection Name: Ethernet 6
>                                  DHCP Enabled:    No
>                                  IP address(es)
>                                  [01]: 10.51.10.14
> Hyper-V Requirements:      VM Monitor Mode Extensions: Yes
>                            Virtualization Enabled In Firmware: No
>                            Second Level Address Translation: Yes
>                            Data Execution Prevention Available: Yes
> 
> C:\mhome\mqadm>

Hmm, another possibility to disable pseudo console is setting
"Legacy console mode". However, since this setting also affects
in cygwin 3.1.7, this cannot explain that your case works in
cygwin 3.1.7 ...

-- 
Takashi Yano <takashi.yano@nifty.ne.jp>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: IBM MQ client application fails on latest cygwin
       [not found]                   ` <CA+7cx1qzAQ8uAGVWBV8SjN=1sP9CRTEnXXr60+HBmmtMSS3zCw@mail.gmail.com>
@ 2021-04-08 16:30                     ` Morten Kjærulff
  2021-04-09  0:22                       ` Takashi Yano
  0 siblings, 1 reply; 13+ messages in thread
From: Morten Kjærulff @ 2021-04-08 16:30 UTC (permalink / raw)
  To: cygwin

On Thu, Apr 8, 2021 at 4:24 PM Morten Kjærulff wrote:
>
> On Thu, Apr 8, 2021 at 4:04 PM Takashi Yano wrote:
> >
> > On Thu, 8 Apr 2021 15:10:54 +0200
> > Morten Kjærulff wrote:
> > > On Thu, Apr 8, 2021 at 2:26 PM Takashi Yano wrote:
> > > >
> > > > On Thu, 8 Apr 2021 20:16:00 +0900
> > > > Takashi Yano wrote:
> > > > > On Thu, 8 Apr 2021 08:04:26 +0200
> > > > > Morten Kjærulff wrote:
> > > > > > On Wed, Apr 7, 2021 at 1:04 PM Takashi Yano wrote:
> > > > > > >
> > > > > > > On Wed, 7 Apr 2021 19:56:24 +0900
> > > > > > > Takashi Yano wrote:
> > > > > > > > On Wed, 7 Apr 2021 11:32:59 +0200
> > > > > > > > Morten Kjærulff wrote:
> > > > > > > > > On Tue, Apr 6, 2021 at 4:37 PM Takashi Yano wrote:
> > > > > > > > > >
> > > > > > > > > > On Tue, 6 Apr 2021 15:16:56 +0200
> > > > > > > > > > Morten Kjærulff wrote:
> > > > > > > > > > > When I run it from a windows command prompt, it works fine.
> > > > > > > > > >
> > > > > > > > > > In this case, did you run MQ client from cygwin shell
> > > > > > > > > > in command prompt? Or run it in cmd.exe?
> > > > > > > > >
> > > > > > > > > what works is:
> > > > > > > > > cmd.exe->bash->script->non-cygwin-mq-client.exe
> > > > > > > > >
> > > > > > > > > what fails is:
> > > > > > > > > cmd.exe->bash->mintty->bash->script->non-cygwin-mq-client.exe
> > > > > > > > >
> > > > > > > > > also fails:
> > > > > > > > > cmd.exe->bash->mintty->bash
> > > > > > > > > and then
> > > > > > > > > cmd /c bash -c 'script' # script->non-cygwin-mq-client.exe
> > > > > > > >
> > > > > > > > Thnaks for the report.
> > > > > > > >
> > > > > > > > What about:
> > > > > > > > mintty->cmd /c bash->non-cygwin-mq-client.exe ?
> > > > > > >
> > > > > > > Do you mean your script starting mq-client by "script" ?
> > > > > > > I meant /usr/bin/script by "script".
> > > > > > >
> > > > > > > > > cmd.exe->bash->script->non-cygwin-mq-client.exe
> > > > > > >
> > > > > > > If so, what about:
> > > > > > > cmd.exe->bash->/usr/bin/script->(your script)->non-cygwin-mq-client.exe ?
> > > > > > >
> > > > > > > --
> > > > > > > Takashi Yano
> > > > > >
> > > > > > Hi,
> > > > > >
> > > > > > I cooked the issue down to this.
> > > > > >
> > > > > > My script:
> > > > > > $ cat tmq.sh
> > > > > > #!/bin/sh
> > > > > >
> > > > > > export MQSERVER='BROWSE/TCP/mvs1(1414)'
> > > > > > amqsbcgc Q
> > > > > >
> > > > > > amqsbcgc is a sample that comes with MQ:
> > > > > > $ which amqsbcgc
> > > > > > /cygdrive/c/Program Files/IBM/WebSphere MQ/tools/c/samples/bin64/amqsbcgc
> > > > > >
> > > > > > It is a C program:
> > > > > > $ head /cygdrive/c/Program\ Files/IBM/WebSphere\ MQ/tools/c/Samples/amqsbcg0.c
> > > > > > /* @(#) MQMBID sn=p800-008-171121 su=_A5OAkM6qEeemCpCOEyy4yA
> > > > > > pn=samples/c/amqsbcg0.c */
> > > > > > /**********************************************************************/
> > > > > > /*                                                                    */
> > > > > > /* Program name: AMQSBCG0                                             */
> > > > > > /*                                                                    */
> > > > > > /* Description : Sample program to read and output the message        */
> > > > > > /*                 descriptor fields, any other message properties    */
> > > > > > /*                 and the message content of all the messages on a   */
> > > > > > /*                 queue                                              */
> > > > > > /*   <copyright                                                       */
> > > > > >
> > > > > > When I run it from a bash prompt, started with cmd.exe->bash.exe, I
> > > > > > see correct output (2085 means Q not found, which means that we are
> > > > > > connected ok):
> > > > > > $ ./tmq.sh
> > > > > >
> > > > > > AMQSBCG0 - starts here
> > > > > > **********************
> > > > > >
> > > > > >  MQOPEN - 'Q'
> > > > > >  MQOPEN failed with CompCode:2, Reason:2085
> > > > > >  MQDISC
> > > > > >
> > > > > > If I start mintty, I see:
> > > > > > $ ./tmq.sh
> > > > > >
> > > > > > AMQSBCG0 - starts here
> > > > > > **********************
> > > > > >
> > > > > >  MQCONNX failed with CompCode:2, Reason:2539
> > > > > >
> > > > > > I also see errors at the server side, which means that some sort of
> > > > > > connection has been made, but it seems to be garbled.
> > > > > >
> > > > > > When we are "under" mintty it does not matter how I call amqsbcgc, it
> > > > > > always fails, here is one example:
> > > > > >
> > > > > > $ ./tmq.sh
> > > > > >
> > > > > > AMQSBCG0 - starts here
> > > > > > **********************
> > > > > >
> > > > > >  MQCONNX failed with CompCode:2, Reason:2539
> > > > > >
> > > > > > $ cmd
> > > > > > Microsoft Windows [Version 10.0.17763.1817]
> > > > > > (c) 2018 Microsoft Corporation. Alle rettigheder forbeholdes.
> > > >
> > > > Ah, you are using Win10 1809. Then the pseudo console should be
> > > > supported.
> > > >
> > > > > > C:\mhome\mqadm>set MQSERVER=BROWSE/TCP/mvs1(1414)
> > > > > > set MQSERVER=BROWSE/TCP/mvs1(1414)
> > > > > >
> > > > > > C:\mhome\mqadm>amqsbcgc Q
> > > > > > amqsbcgc Q
> > > > > >
> > > > > > AMQSBCG0 - starts here
> > > > > > **********************
> > > > > >
> > > > > >  MQCONNX failed with CompCode:2, Reason:2539
> > > > >
> > > > > In the log above in cmd, input command are echoed twice.
> > > > > This happens when the pseudo console is not activated. Are you
> > > > > using Win7 or old Win10? Or do you set CYGWIN=disable_pcon by
> > > > > any chance?
> > > > >
> > > > > If you set CYGWIN=disable_pcon, please try unset it.
> > > >
> > > > Probably you set CYGWIN=disable_pcon in .bashrc or elsewhere.
> > > > Please try to unset it.
> > >
> > > I explicitly have a
> > > set CYGWIN=
> > > in the .bat file that initially invokes bash.
> > > I do not set CYGWIN= elsewhere (just grep'd for it).
> > >
> > > I change my test script to show empy CYGWIN=
> > > $ cat tmq.sh
> > > #!/bin/sh
> > >
> > > export MQSERVER='BROWSE/TCP/mvs1(1414)'
> > > echo CYGWIN=$CYGWIN
> > > amqsbcgc Q
> > >
> > > $ ./tmq.sh
> > > CYGWIN=
> > >
> > > AMQSBCG0 - starts here
> > > **********************
> > >
> > >  MQCONNX failed with CompCode:2, Reason:2539
> > >
> > > Output of systeminfo:
> > >
> > >
> > > C:\mhome\mqadm>systeminfo
> > >
> > > Host Name:                 DX777
> > > OS Name:                   Microsoft Windows 10 Enterprise
> > > OS Version:                10.0.17763 N/A Build 17763
> > > OS Manufacturer:           Microsoft Corporation
> > > OS Configuration:          Member Workstation
> > > OS Build Type:             Multiprocessor Free
> > > Registered Owner:          admin1
> > > Registered Organization:
> > > Product ID:                00329-00000-00003-AA588
> > > Original Install Date:     21-11-2019, 11:14:32
> > > System Boot Time:          07-04-2021, 10:40:05
> > > System Manufacturer:       LENOVO
> > > System Model:              20BX004NMD
> > > System Type:               x64-based PC
> > > Processor(s):              1 Processor(s) Installed.
> > >                            [01]: Intel64 Family 6 Model 61 Stepping 4
> > > GenuineIntel ~2195 Mhz
> > > BIOS Version:              LENOVO JBET71WW (1.35 ), 14-09-2018
> > > Windows Directory:         C:\WINDOWS
> > > System Directory:          C:\WINDOWS\system32
> > > Boot Device:               \Device\HarddiskVolume1
> > > System Locale:             da;Dansk
> > > Input Locale:              da;Dansk
> > > Time Zone:                 (UTC+01:00) København, Stockholm, Oslo, Madrid, Paris
> > > Total Physical Memory:     7.888 MB
> > > Available Physical Memory: 3.302 MB
> > > Virtual Memory: Max Size:  9.104 MB
> > > Virtual Memory: Available: 3.179 MB
> > > Virtual Memory: In Use:    5.925 MB
> > > Page File Location(s):     C:\pagefile.sys
> > > Domain:                    intern.vp.dk
> > > Logon Server:              \\DS300
> > > Hotfix(s):                 23 Hotfix(s) Installed.
> > >                            [01]: KB4601555
> > >                            [02]: KB4465065
> > >                            [03]: KB4470788
> > >                            [04]: KB4486153
> > >                            [05]: KB4486158
> > >                            [06]: KB4489907
> > >                            [07]: KB4523204
> > >                            [08]: KB4535680
> > >                            [09]: KB4539571
> > >                            [10]: KB4549947
> > >                            [11]: KB4558997
> > >                            [12]: KB4562562
> > >                            [13]: KB4566424
> > >                            [14]: KB4570332
> > >                            [15]: KB4577586
> > >                            [16]: KB4577667
> > >                            [17]: KB4580325
> > >                            [18]: KB4587735
> > >                            [19]: KB4589208
> > >                            [20]: KB4598480
> > >                            [21]: KB4601393
> > >                            [22]: KB5000859
> > >                            [23]: KB5000822
> > > Network Card(s):           4 NIC(s) Installed.
> > >                            [01]: Intel(R) Ethernet Connection (3) I218-V
> > >                                  Connection Name: Ethernet 5
> > >                                  Status:          Media disconnected
> > >                            [02]: Intel(R) Dual Band Wireless-AC 7265
> > >                                  Connection Name: Wi-Fi 3
> > >                                  DHCP Enabled:    Yes
> > >                                  DHCP Server:     192.168.0.1
> > >                                  IP address(es)
> > >                                  [01]: 192.168.0.24
> > >                                  [02]: fe80::2c6e:9e53:e28a:31f2
> > >                            [03]: Bluetooth Device (Personal Area Network)
> > >                                  Connection Name:
> > > Bluetooth-netværksforbindelse 3
> > >                                  Status:          Media disconnected
> > >                            [04]: PANGP Virtual Ethernet Adapter
> > >                                  Connection Name: Ethernet 6
> > >                                  DHCP Enabled:    No
> > >                                  IP address(es)
> > >                                  [01]: 10.51.10.14
> > > Hyper-V Requirements:      VM Monitor Mode Extensions: Yes
> > >                            Virtualization Enabled In Firmware: No
> > >                            Second Level Address Translation: Yes
> > >                            Data Execution Prevention Available: Yes
> > >
> > > C:\mhome\mqadm>
> >
> > Hmm, another possibility to disable pseudo console is setting
> > "Legacy console mode". However, since this setting also affects
> > in cygwin 3.1.7, this cannot explain that your case works in
> > cygwin 3.1.7 ...
>
> If you mean setting CYGWIN=disable_pcon I can confirm that it still
> fails under mintty and work from cmd.exe->bash

Could it be a codepage issue?
My PC is ascii, my MQ server runs on z/OS, which is EBCDIC.
The MQ client program works like this:
It looks at the MQSERVER environment variable, with the value
"BROWSE/TCP/mvs1(1414)".
It makes a TCP connection to host mvs1 at port 1414 and sends the
channel name "BROWSE" which must exist at the MQ server.
The MQ server says:
CSQX228E QMGR CSQXRESP Listener unable to start channel,
channel ????
It seems that it have not understood that the channel name is "BROWSE".
The MQ return code I see at the client side is 2539 and according to
https://www.ibm.com/docs/en/ibm-mq/8.0?topic=codes-2539-09eb-rc2539-mqrc-channel-config-error
Common causes of this reason code are:
The server and client cannot agree on the channel attributes to use.
There are errors in one or both of the QM.INI or MQCLIENT.INI
configuration files.
The server machine does not support the code page used by the client.

Last one "The server machine does not support the code page used by the client."
Could something mess up the stuff send over TCP to the MQ server?

/Morten

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: IBM MQ client application fails on latest cygwin
  2021-04-08 16:30                     ` Morten Kjærulff
@ 2021-04-09  0:22                       ` Takashi Yano
       [not found]                         ` <CA+7cx1pCOrK8fjJGWsPmf3v=ZxOubp-2WmJuhxnaZ-n13O6kLw@mail.gmail.com>
  0 siblings, 1 reply; 13+ messages in thread
From: Takashi Yano @ 2021-04-09  0:22 UTC (permalink / raw)
  To: cygwin

On Thu, 8 Apr 2021 18:30:25 +0200
Morten Kjærulff wrote:
> Could it be a codepage issue?

Maybe.

What does chcp.com say in command prompt and in mintty?

In cygwin 3.2.0, the codepage, when pseudo console is disabled,
has been changed from the default codepage of the system to
UTF-8 (65001). If pseudo console is disabled in your environment
for some reason, this can affect.

Please try to change the codepage using chcp.com to the default
codepage of the system.

The default codepage of the system is used also when the
pseudo console is activated, so if possible, I recomend to
enable it somehow.

The reason why pseudo console is disabled, can be one of:
- The system is older than Win10 1809.
- disable_pcon is set in environment variable CYGWIN.
- Terminal does not have enough capability to enable it. (e.g. TERM=dumb)
- The "Legacy console" mode is enabled.
  https://docs.microsoft.com/en-us/windows/console/legacymode


-- 
Takashi Yano <takashi.yano@nifty.ne.jp>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: IBM MQ client application fails on latest cygwin
       [not found]                         ` <CA+7cx1pCOrK8fjJGWsPmf3v=ZxOubp-2WmJuhxnaZ-n13O6kLw@mail.gmail.com>
@ 2021-04-09  5:54                           ` Morten Kjærulff
  2021-04-09  8:29                             ` Takashi Yano
  0 siblings, 1 reply; 13+ messages in thread
From: Morten Kjærulff @ 2021-04-09  5:54 UTC (permalink / raw)
  To: cygwin

On Fri, Apr 9, 2021 at 7:26 AM Morten Kjærulff wrote:
>
> On Fri, Apr 9, 2021 at 2:22 AM Takashi Yano wrote:
> >
> > On Thu, 8 Apr 2021 18:30:25 +0200
> > Morten Kjærulff wrote:
> > > Could it be a codepage issue?
> >
> > Maybe.
> >
> > What does chcp.com say in command prompt and in mintty?
>
> 850
>
> > In cygwin 3.2.0, the codepage, when pseudo console is disabled,
> > has been changed from the default codepage of the system to
> > UTF-8 (65001). If pseudo console is disabled in your environment
> > for some reason, this can affect.
> >
> > Please try to change the codepage using chcp.com to the default
> > codepage of the system.
>
> Then it works:
>
> $ cmd
> Microsoft Windows [Version 10.0.17763.1817]
> (c) 2018 Microsoft Corporation. Alle rettigheder forbeholdes.
>
> C:\mhome>set MQSERVER=BROWSE/TCP/mvs1(1414)
> set MQSERVER=BROWSE/TCP/mvs1(1414)
>
> C:\mhome>chcp
> chcp
> Active code page: 65001
>
> C:\mhome>amqsbcgc Q
> amqsbcgc Q
>
> AMQSBCG0 - starts here
> **********************
>
>  MQCONNX failed with CompCode:2, Reason:2539
> C:\mhome>chcp 850
> chcp 850
> Active code page: 850
>
> C:\mhome>amqsbcgc Q
> amqsbcgc Q
>
> AMQSBCG0 - starts here
> **********************
>
>  MQOPEN - 'Q'
>  MQOPEN failed with CompCode:2, Reason:2085
>  MQDISC
> C:\mhome>
>
> > The default codepage of the system is used also when the
> > pseudo console is activated, so if possible, I recomend to
> > enable it somehow.
> >
> > The reason why pseudo console is disabled, can be one of:
> > - The system is older than Win10 1809.
> > - disable_pcon is set in environment variable CYGWIN.
> > - Terminal does not have enough capability to enable it. (e.g. TERM=dumb)
> > - The "Legacy console" mode is enabled.
> >   https://docs.microsoft.com/en-us/windows/console/legacymode
>
> For some reason I was running in legacy mode. Turning it off, make
> chcp display '0' under mintty, but my MQ client works:
>
> $ cmd
> Microsoft Windows [Version 10.0.17763.1817]
> (c) 2018 Microsoft Corporation. Alle rettigheder forbeholdes.
>
> C:\mhome>chcp
> Active code page: 0
>
> C:\mhome>set MQSERVER=BROWSE/TCP/mvs1(1414)
>
> C:\mhome>amqsbcgc Q
>
> AMQSBCG0 - starts here
> **********************
>
>  MQOPEN - 'Q'
>  MQOPEN failed with CompCode:2, Reason:2085
>  MQDISC
> C:\mhome>
>
> >
> > --
> > Takashi Yano

Sorry for replying personally and not to the group.

I have a virtual machine with Windows 7.
It is also a problem here, but here I don't have "legacy mode" in the
command prompt properties.
Any tricks?

/Morten

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: IBM MQ client application fails on latest cygwin
  2021-04-09  5:54                           ` Morten Kjærulff
@ 2021-04-09  8:29                             ` Takashi Yano
  0 siblings, 0 replies; 13+ messages in thread
From: Takashi Yano @ 2021-04-09  8:29 UTC (permalink / raw)
  To: cygwin

On Fri, 9 Apr 2021 07:54:35 +0200
Morten Kjærulff wrote:
> On Fri, Apr 9, 2021 at 7:26 AM Morten Kjærulff wrote:
> >
> > On Fri, Apr 9, 2021 at 2:22 AM Takashi Yano wrote:
> > >
> > > On Thu, 8 Apr 2021 18:30:25 +0200
> > > Morten Kjærulff wrote:
> > > > Could it be a codepage issue?
> > >
> > > Maybe.
> > >
> > > What does chcp.com say in command prompt and in mintty?
> >
> > 850
> >
> > > In cygwin 3.2.0, the codepage, when pseudo console is disabled,
> > > has been changed from the default codepage of the system to
> > > UTF-8 (65001). If pseudo console is disabled in your environment
> > > for some reason, this can affect.
> > >
> > > Please try to change the codepage using chcp.com to the default
> > > codepage of the system.
> >
> > Then it works:
> >
> > $ cmd
> > Microsoft Windows [Version 10.0.17763.1817]
> > (c) 2018 Microsoft Corporation. Alle rettigheder forbeholdes.
> >
> > C:\mhome>set MQSERVER=BROWSE/TCP/mvs1(1414)
> > set MQSERVER=BROWSE/TCP/mvs1(1414)
> >
> > C:\mhome>chcp
> > chcp
> > Active code page: 65001
> >
> > C:\mhome>amqsbcgc Q
> > amqsbcgc Q
> >
> > AMQSBCG0 - starts here
> > **********************
> >
> >  MQCONNX failed with CompCode:2, Reason:2539
> > C:\mhome>chcp 850
> > chcp 850
> > Active code page: 850
> >
> > C:\mhome>amqsbcgc Q
> > amqsbcgc Q
> >
> > AMQSBCG0 - starts here
> > **********************
> >
> >  MQOPEN - 'Q'
> >  MQOPEN failed with CompCode:2, Reason:2085
> >  MQDISC
> > C:\mhome>

Yeah! Your speculation that this is the codepage issue,
seems correct.

> > > The default codepage of the system is used also when the
> > > pseudo console is activated, so if possible, I recomend to
> > > enable it somehow.
> > >
> > > The reason why pseudo console is disabled, can be one of:
> > > - The system is older than Win10 1809.
> > > - disable_pcon is set in environment variable CYGWIN.
> > > - Terminal does not have enough capability to enable it. (e.g. TERM=dumb)
> > > - The "Legacy console" mode is enabled.
> > >   https://docs.microsoft.com/en-us/windows/console/legacymode
> >
> > For some reason I was running in legacy mode. Turning it off, make
> > chcp display '0' under mintty, but my MQ client works:
> >
> > $ cmd
> > Microsoft Windows [Version 10.0.17763.1817]
> > (c) 2018 Microsoft Corporation. Alle rettigheder forbeholdes.
> >
> > C:\mhome>chcp
> > Active code page: 0
> >
> > C:\mhome>set MQSERVER=BROWSE/TCP/mvs1(1414)
> >
> > C:\mhome>amqsbcgc Q
> >
> > AMQSBCG0 - starts here
> > **********************
> >
> >  MQOPEN - 'Q'
> >  MQOPEN failed with CompCode:2, Reason:2085
> >  MQDISC
> > C:\mhome>
> >
> > >
> > > --
> > > Takashi Yano
> 
> Sorry for replying personally and not to the group.
> 
> I have a virtual machine with Windows 7.
> It is also a problem here, but here I don't have "legacy mode" in the
> command prompt properties.
> Any tricks?

In Windows 7, console is always in "Legacy mode".
Moreover, pseudo console is not supported in Win7.

Therefore, the simplest way is changing codepage
to appropriate value before executing MQ client.

Another solution is to start mintty with charset
option, such as:
mintty -o locale=da_DK -o charset=CP850


This default codepage change from cygwin 3.1.7 was the
anguished choice.
https://cygwin.com/pipermail/cygwin-patches/2020q3/010627.html

If you are interested in this topic, please reffer
to the discussion started from:
https://cygwin.com/pipermail/cygwin-developers/2020-August/011951.html

I still think that it is not good idea to output
UTF-8 string regardless of locale setting. However,
some apps do that... :(

-- 
Takashi Yano <takashi.yano@nifty.ne.jp>

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2021-04-09  8:29 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-06 13:16 IBM MQ client application fails on latest cygwin Morten Kjærulff
2021-04-06 14:24 ` Takashi Yano
2021-04-06 14:37 ` Takashi Yano
     [not found]   ` <CA+7cx1o-Npm_ne8v+EB1QfCYPEZ4GB4dJSn3bQozEMm9pK4RgQ@mail.gmail.com>
2021-04-07 10:56     ` Takashi Yano
2021-04-07 11:04       ` Takashi Yano
     [not found]         ` <CA+7cx1rN2pkwV0P=jLQWKcuAU5hcvAgzsCD5si-wn4uk+fDthg@mail.gmail.com>
2021-04-08 11:16           ` Takashi Yano
2021-04-08 12:25             ` Takashi Yano
2021-04-08 13:10               ` Morten Kjærulff
2021-04-08 14:04                 ` Takashi Yano
     [not found]                   ` <CA+7cx1qzAQ8uAGVWBV8SjN=1sP9CRTEnXXr60+HBmmtMSS3zCw@mail.gmail.com>
2021-04-08 16:30                     ` Morten Kjærulff
2021-04-09  0:22                       ` Takashi Yano
     [not found]                         ` <CA+7cx1pCOrK8fjJGWsPmf3v=ZxOubp-2WmJuhxnaZ-n13O6kLw@mail.gmail.com>
2021-04-09  5:54                           ` Morten Kjærulff
2021-04-09  8:29                             ` Takashi Yano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).