public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Takashi Yano <takashi.yano@nifty.ne.jp>
To: cygwin@cygwin.com
Subject: Re: IBM MQ client application fails on latest cygwin
Date: Thu, 8 Apr 2021 20:16:00 +0900	[thread overview]
Message-ID: <20210408201600.9f70ffa0b828a785e70a891c@nifty.ne.jp> (raw)
In-Reply-To: <CA+7cx1rN2pkwV0P=jLQWKcuAU5hcvAgzsCD5si-wn4uk+fDthg@mail.gmail.com>

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>

  parent reply	other threads:[~2021-04-08 11:16 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-06 13:16 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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210408201600.9f70ffa0b828a785e70a891c@nifty.ne.jp \
    --to=takashi.yano@nifty.ne.jp \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).