ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Get/Put a file from Server thro FTP using FileInput node.

Post new topic  Reply to topic
 Get/Put a file from Server thro FTP using FileInput node. « View previous topic :: View next topic » 
Author Message
somjyoti
PostPosted: Thu Jan 10, 2008 10:51 am    Post subject: Get/Put a file from Server thro FTP using FileInput node. Reply with quote

Newbie

Joined: 10 Jan 2008
Posts: 9

I am trying to get/put the file from server using File Input/Output node.

I ran the following command in command console.

mqsisetdbparms broker_name -n ftp::service -u server_usrname -p server_password

I gave 'ftp::service' in Security Identity Property in File Input node.

I am not getting the file from the server thro ftp.

Do i need to check or set any other settings.

Thanks in advance.
Som
Back to top
View user's profile Send private message
mqmatt
PostPosted: Thu Jan 10, 2008 11:03 am    Post subject: Reply with quote

Grand Master

Joined: 04 Aug 2004
Posts: 1213
Location: Hursley, UK

Use 'service' as the security identity. The 'ftp::' prefix is just used on mqsisetdbparms.
Back to top
View user's profile Send private message
somjyoti
PostPosted: Fri Jan 11, 2008 9:56 am    Post subject: FTP a file using FileInput node. Reply with quote

Newbie

Joined: 10 Jan 2008
Posts: 9

When i tried to FTP a file using File Input node I am getting the following Exception.

"The FileInput node ''FileInput'' in message flow ''FTPTest'' cannot resolve the relative file path ''/data1/service/WMB''.
Relative file paths must be resolved using the absolute directory path specified in the 'MQSI_FILENODES_ROOT_DIRECTORY' environment variable."

I given the file path ''/data1/service/WMB'' in Input Directory and '.' in Server Directory of the FIle Input node.

Regards
Som
Back to top
View user's profile Send private message
mqpaul
PostPosted: Mon Jan 14, 2008 3:39 am    Post subject: Reply with quote

Acolyte

Joined: 14 Jan 2008
Posts: 66
Location: Hursley, UK

I wonder why the FileInput node thinks "/data1/service/WMB'" is a relative directory name. Are you running the broker under a Microsoft Windows operating system? If so, it will expect the file name to be something like "\data1\service\WMB" or even "E:\data1\service\WMB".

Despite the fact that you are using the FileInput node for FTP, the input directory is seen as a normal directory on the broker system; you need to use Windows syntax for a Windows system, or UNIX syntax for a UNIX system.

Does that explain the problem?
Back to top
View user's profile Send private message
somjyoti
PostPosted: Mon Jan 14, 2008 10:59 am    Post subject: Reply with quote

Newbie

Joined: 10 Jan 2008
Posts: 9

Hi,

My broker is installed in Windows and the ftp server is in UNIX. In this case i can give the unix path, eventhough my broker is in Windows. rite?

Thanks
Som
Back to top
View user's profile Send private message
mqpaul
PostPosted: Tue Jan 15, 2008 3:31 am    Post subject: File node directory paths need to obey the correct OS syntax Reply with quote

Acolyte

Joined: 14 Jan 2008
Posts: 66
Location: Hursley, UK

Som,

The FileInput node's "Input directory" property refers to a directory in the file system on the OS running broker, so in your case it needs Windows directory syntax, such as '\data1\service\WMB'. Using UNIX syntax here doesn't work, and that's what caused the error message.

The FTP "Server directory" property is passed to the remote FTP server in a "CWD" (change working directory) command. A UNIX syntax path such as "output/filesForWMB" would be acceptable here. Of course your current value, ".", is perfectly valid too.

The broker doesn't check the Server directory property itself; it delegates checking to the FTP server. If there is a problem with the Server directory syntax, the FTP server will report it to the broker, and I think the broker would issue a BIP3380 message.
_________________
Paul
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Jan 15, 2008 3:44 am    Post subject: Re: File node directory paths need to obey the correct OS sy Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

mqpaul wrote:
Som,

The FileInput node's "Input directory" property refers to a directory in the file system on the OS running broker, so in your case it needs Windows directory syntax, such as '\data1\service\WMB'. Using UNIX syntax here doesn't work, and that's what caused the error message.

The FTP "Server directory" property is passed to the remote FTP server in a "CWD" (change working directory) command. A UNIX syntax path such as "output/filesForWMB" would be acceptable here. Of course your current value, ".", is perfectly valid too.

The broker doesn't check the Server directory property itself; it delegates checking to the FTP server. If there is a problem with the Server directory syntax, the FTP server will report it to the broker, and I think the broker would issue a BIP3380 message.


All of which is to likely say that you want "/data1/service/WMB" in the Server Directory property, rather than the Input Directory property.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
somjyoti
PostPosted: Tue Jan 15, 2008 7:56 am    Post subject: Reply with quote

Newbie

Joined: 10 Jan 2008
Posts: 9

Hi,

If I give "/data1/service/WMB" in the Server directory property, What i have to give in the Input directory property.
Thanks
Som


Last edited by somjyoti on Tue Jan 15, 2008 8:08 am; edited 1 time in total
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Jan 15, 2008 8:06 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

somjyoti wrote:
What i have to give in the Input directory property, coz it will not accept the empty value.


Probably the directory where the input file is.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
somjyoti
PostPosted: Tue Jan 15, 2008 8:20 am    Post subject: Reply with quote

Newbie

Joined: 10 Jan 2008
Posts: 9

I tried with 'data1/service/WMB' in the input directory property.

I am getting the following exception.

"The FileInput node ''FileInput'' in message flow ''FTPTest'' cannot resolve the relative file path ''/data1/service/WMB''.
Relative file paths must be resolved using the absolute directory path specified in the 'MQSI_FILENODES_ROOT_DIRECTORY' environment variable."

How to set or view the value in 'MQSI_FILENODES_ROOT_DIRECTORY' environment variable.

Thanks
Som
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Jan 15, 2008 8:33 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

You have two choices, I think.
1) set Input directory to ".", and FTP Server directory to "/data1/service/WMB"
2) set Input directory to "\data1\service\WMB" and FTPServer directory to "."

But I haven't used this node yet.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Jan 15, 2008 8:38 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

somjyoti wrote:
I tried with 'data1/service/WMB' in the input directory property.


Where is this in relation to the broker directory?

somjyoti wrote:
How to set or view the value in 'MQSI_FILENODES_ROOT_DIRECTORY' environment variable.


Same way you'd set or view any other environment variable. Be sure you check the one that's in scope for the flow.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mqpaul
PostPosted: Tue Jan 15, 2008 8:41 am    Post subject: FTP transfers from remote Source to local Input directory Reply with quote

Acolyte

Joined: 14 Jan 2008
Posts: 66
Location: Hursley, UK

Som,

The FileInput node first transfers the file from the remote Source directory to the local Input directory, then starts the flow with the transferred file from the Input directory. Specify the Source directory property as the file's location on the FTP server, and the Input directory somewhere on the broker system.

Where you put the file on the broker system is up to you. It should be a local file system for best performance, with enough free space to hold all the files you might transfer or archive. You can specify it as an absolute path, such as "E:\WMB\ftpTransfer\input\myFlow", or a relative path such as "input\myFlow". If you use relative paths, you must set the MQSI_FILENODES_ROOT_DIRECTORY property, such as MQSI_FILENODES_ROOT_DIRECTORY="E:\WMB\ftpTransfer", and the input directory is relative to this value. Note that specifying Input directory="." would be relative, and therefore use the directory in MQSI_FILENODES_ROOT_DIRECTORY.

In general, using a temporary location such as "C:\tmp" is not a good idea if you might want to rerun flows that failed, since the mqsibackout and mqsiarchive directories will get deleted if something clears the temporary directory.

Have a look at the paragraph titled File processing in following link to the Message Broker Information Center:
http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r1m0/topic/com.ibm.etools.mft.doc/ac55150_.htm
_________________
Paul
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Get/Put a file from Server thro FTP using FileInput node.
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.