Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fteCreateTransfer dd parameter does not handle folders as destiantion and does not support wildcards #22

Open
goffinet opened this issue Dec 17, 2024 · 5 comments

Comments

@goffinet
Copy link

goffinet commented Dec 17, 2024

Hello @ShashikanthRaoT ,
cc: @nickwe3

We are using an MQ MFT Bridge Agent version 9.1.0.9 on a Windows machine and we currently plan to use your dev code to deploy the Bridge Agent version 9.4.1.0 on Openshift. We have modified the ProtocolBridgeCustomCredentialExit.java exit to handle Key auth without passphrase or password only. A this point, all is OK.

But when we test our fteCreateTransfer we encounter these errors with destination directory (-dd paramter) and wilcard support:

Case 1: File to file transfer is OK

/data/bin/fteCreateTransfer -p ... -t binary -sa ... -sm ... -da ... -dm ... \
-dd E:\\mqft\\output\\tmp\\test.csv "test:/testt/test.csv"

Case 2: If we do not specify the destination file with -dd parameters we have this error (only the folder as destination):

/data/bin/fteCreateTransfer -p ... -t binary -sa ... -sm ... -da ... -dm ... \
-dd E:\\mqft\\output\\tmp\\ "test:/test/test.csv"
<destination exist="overwrite" type="file">
<file size="-1">E:\mqft\output\tmp\/</file>
</destination>
BFGTR0072E: The transfer failed due to the following exception: BFGIO0002E: The file ‘E:\mqft\output\tmp’ is not a normal file (it may be a directory).

see also the / after the destination path: E:\mqft\output\tmp\/

Case 3: If we try to use a wildcard at source, it fails also:

/data/bin/fteCreateTransfer -p ... -t binary -sa ... -sm ... -da ... -dm ... \
-dd E:\\mqft\\output\\tmp\\ "test:/test/*.csv"
    <item mode="binary">
      <source disposition="leave" type="file">
        <file size="0">test:/test/*.csv</file>
      </source>
      <destination type="file">
        <file size="-1">E:\mqft\output\tmp/</file>
      </destination>
      <status resultCode="1">
        <supplement>BFGIO0110E: File "/test/*.csv" does not exist.</supplement>
      </status>
    </item>
@ShashikanthRaoT
Copy link
Collaborator

I am wondering if this is anything to do with how the Shell is interperting the "" slashes when running the fteCreateTransfer and how the interpreted parameters are being sent to the command. Does using "/" for destination path work? Generally Windows handles both "" and "/" equally. You can also try out by adding double quotes around destination path.

@fgodiet
Copy link

fgodiet commented Dec 18, 2024

Unfortunately not.
Adding double quotes around the destination path, replacing double backslashes with slashes, etc. doesn't change anything. Only transfers specifying the file name at source and destination will work.
@goffinet @fgodiet

@gsriniv
Copy link

gsriniv commented Dec 18, 2024

@goffinet @fgodiet
We are trying to recreate the scenario, will update once we are done at our end.

Please correct if your set-up is different from our understanding as below -
Source agent (PBA) is on OpenShift and the destination is agent is a onPrem - Windows

@gsriniv
Copy link

gsriniv commented Dec 18, 2024

It will be helpful if we can get any logs for Case 1 and Case 2.

And also the following case -(i.e with -df option)

/data/bin/fteCreateTransfer -p ... -t binary -sa ... -sm ... -da ... -dm ...
-df E:\mqft\output\tmp\test.csv "test:/test/test.csv"

//cc @bhargav-gaddam

@fgodiet
Copy link

fgodiet commented Dec 18, 2024

e agent (PBA) is on OpenShift and the destination is agent is a

Hello @gsriniv,
Your assertion is correct : Source agent (PBA) is on OpenShift and the destination is agent is a onPrem - Windows

/data/bin/fteCreateTransfer -t binary -sa QA_MQFTFTPHBACLOUD -sm MQCLOUD_QA -da QA_MQFTTRANSQA01 -dm MQ_FILETRANSFER_QA -dd "E:\\mqft\test\\output\\tmp" "test:/test/*.csv" -de overwrite -cs none

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants