0 Followers · 61 Posts

File Transport Protocol (FTP) is a standard network protocol used for the transfer of computer files between a client and a server on a computer network.

Learn more.

Question Token Ibragimov · Jun 11, 2020

Hello,

I'm trying to upload file to SFTP server.  

I have access to SFTP server . 
My code is bellow 

Try {
Set sftp = ##class(%Net.SSH.Session).%New()

Set sc = sftp.AuthenticateWithUsername(username,password)
if 'sftp.Connect(host){
            Set status = $$$ERROR($$$GeneralError,"Cannot connect to sftp  ")
            Quit       
}
Set sc = sftp.OpenSFTP(.t)

If 'sftp.Disconnect() Write "Failed to logout",!

}Catch ex {
Set status=$$$ERROR($$$GeneralError,$ZE)
Quit
}

The output : $lb(5001,"Cannot connect to sftp "

What i'm doing wrong ?

10
1 1964
Question Jimmy Christian · Dec 18, 2019

Hello community,

I am receiving a HL7 message over TCP connection.

I have to set up  a process/operation to produce a daily file with this HL7 messages to be created in a directory using EnsLib.File.OutboundAdapter
and EnsLib.HL7.Operation.FileOperation. The file needs to have a header line added each time it is created and a footer .I did not find any standard class file under File Adapter which will create header/footer. 

Any suggestion will be greatly appreciated.

Thanks,

Jimmy Christian

4
0 914
Question David Underhill · May 12, 2020

I have been using %Net.FtpSession and while it works, its handling of file/directory listings from an FTP server is less than ideal and, while this is due to the FTP protocol itself, the class could be written to handle this as would an FTP client such as FileZilla and command line/class FTP handlers for other languages.  I was wondering if anyone knows how the Ensemble adaptor works with this in case it provides code that would help, though the source does not seem to be available.  Below are the issues I see in FTP, some are based on past experience writing our own FTP handler in the past,

2
0 521
Question Roger Merchberger · Jan 10, 2020

TL;DR: If I set an Ensemble  Production Service based on EnsLib.File.PassthroughService to a Binary charset encoding, it breaks the file handling. Any ideas?

Full long post:

All,

I set up an Ensemble production to transfer files via SFTP, which works fine sending the files to my Linux server. Then I was informed that we needed to save a hash of the file, for comparison with the destination to verify the file arrived unmodified. I looked at the base64 encoded hash on my linux server:

G7QWAP6FcLInFWP8ECRL/EI2NfKdaf6TtrpwYuvSOEc=

and I created a class to extend the StreamContainer to add a hash value:

8
0 448
Question David Losiewicz · Oct 3, 2019

I am using Ensemble FTP adapter to monitor file directory for files that require SFTP transfer to remote server using public/private keys for remote server authentication.

This works great in my engineering development space where file protections are loose.

I want to apply "principle of least privilege" regarding the public and private key files specified in  FTP Outbound adapter Business Operation. 

Can anyone recommend (Linux) permissions that allow Ensemble to execute the SFTP operation but minimizing access to the key files?

I've tried variouse combinations without success. 

1
0 989
Article Slava Rahmatoulin · Nov 5, 2016 9m read

This article will provide tips and tricks on customizing Ensemble business hosts with configurable settings.

Ensemble production Settings are configurable values that control the behavior of a production and its hosts.

The documentation for adding and removing Settings and specifying categories and controls for Settings is provided at the link:

http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=EGDV_prog#EGDV_prog_settings

“To provide new settings for a production, a business host, or an adapter, modify its class definition as follows:

6
4 4848
Question Kurro Lopez · Sep 4, 2019

Hello everyone,

We have a process that is listening to an FTP service to collect some CSV files and process them. The process works correctly and when it ends it clears the directory waiting for it to enter some other file.

We have been receiving the following error message for a long time:

ERROR <Ens>ErrGeneral: Error in SFTP Dir() ERROR #7500: Error DirEnum SSH '-2146430967': 'SSH Error [80101009]: Would block waiting for status message [80101009] at SFTP.cpp:150,0

This happens when there are no files to process and appears from time to time, maybe every 20 minutes.

4
0 974
Question William Proctor · May 2, 2019

Thanks for all replies in advance.  We have a security vulnerability that we have to get rid of.  We use Putty software to connect to cache as a terminal allowing several users to do maintenance work in cache.  this uses telnet Plain text.  I know that we can configure telnet to be encrypted using the super server service and I'm looking for software that can work like Putty as a terminal using encryption compatible with cache telnet encryption.   If I have cache installed on my PC and setup a connection to the server using Kerberos with encryption and use the terminal option to connect to the

5
0 923
Article Sanjib Pandey · Apr 23, 2019 4m read

Method : to download the FTP file from intersystem cache : If you have any question please drop a message :

ClassMethod FTPDownload(myFTP = "", myUserName = "", myPassword = "", sFileLocation = "", dLocation = "", noOfdownloadFile = 1, sourceFileDel = 0)
{
 /*---------------------------------------------------------------------------------------------------------------------------
 download the file according to the requirements  : FTP

Method : Resuable 

by : Sanjib Raj Pandey on 30/03/2018

0
0 713
Question Larry Pinsky · Mar 22, 2017

We have many sFTP business operations that work successfully.  I just modified an existing one to point to a new IP and Port, as well as use new credentials (username and password only).  When I attempt to sFTP a file, I receive the following error.

5
0 2781
Question Herb Salgado · Sep 13, 2018

Hello,

I am trying to send a HL7 Billing Batch 2.3:FHS file out to an FTP site:

The file needs to be  in Variable Length / Carriage return carriage control format--  

 When I send the file, the format is Fixed Length 512 Byte Record-- Not Working

The data is ok within the file-- It is just the way I am sending it out of Ensemble that is not correct.

I am thinking that it is a setting within the Operation that I am missing or not choosing correctly.

Charset-AsciiCR

Separators -|^~\&\r

Default Char Encoding: Binary

I appreciate the help,

Herb

Record format:      Fixed length 512 byte records

2
0 362
Question Kurro Lopez · Aug 29, 2018

Hi community,

I've created a BS that uses FTP InboundAdapter. It works, read the file and process it.

The problem is when there not any file in the FTP folder, it raises the following error:

 ERROR <Ens>ErrFTPListFailed: FTP: error en List para *.csv (mensaje='No-transfer-time exceeded. Closing control connection.',código=421)

I think it is something about the configuration, but I don't find what is the problem.

Any idea?

Best regards,

Francisco Lopez

4
0 816
Question barry dellinger · Nov 8, 2017

I am using Cache FTP classes to download from a FTP site files, that include zip files.

I can retrieve the whole file into a stream, but it contains a lot garbage.

Sample:

PKvªZK!—XÃ×$¯²4rNDDF Plus DB/Counseling Messages/CMM 1.0/RCMMD0_DESCNUnNUCX4NDDF Plus DB/Counseling Messages/CMM 1.0/RCMMD0_DESC´½[“ÛH’.ø¾fûð²ê*›¬ï—Q[›©n]²î®Ò–ª§Ï>‚$Hbؑ)ÊâÇ÷Ï=¸P™9gmlª•„‡.~ý|4Íñ)>$Uôîòäú6K“2Jó(ù¼MªŠþ2»¢J*ócåÅ%ºÄIt*JúO²K·iž˜Ë1Σ´ŠÊd[œNI¾Kvÿ÷ÿ5&faìÛ]|Nñçh_”Ñö˜f»2ÉMg4A´KiÜ%ÙE›+Qo/Ei~-d0VQl˜s ;­¢š¦)£ñ$º–˜lj>]xL|‰Ê¢8E—ätNÊøR—‰‰ŸxdI¿V4iz8^^Dþ3óþ±Hwî©«h[ä—8ÍÓüUñ)1ô’.&ùå›ê[¥..GºK7Æxcè
 

4
0 1597
Question Güvenal · Oct 4, 2017

Hello!We want an Integration that should be moving files from a FTP server in a DMZ zone into another FTP server on our local network.I tried using EnsLib.FTP.PassthroughService(EnsLib.FTP.InboundAdapter, EnsLib.FTP.OutboundAdapter)Using this approach ensamble write data to the database, causing the CACHE.DAT to grow for every file that is moved.Looks like the entire file is written to the database, is this the case?We are not really interested in storing any file content information in ensamble in this particular case.Does anyone has a good suggestion on how to accomplish the file transfer

6
0 1002
Question Tom McDevitt · Sep 15, 2017

Looking for some suggestion on what the 

community has been setting Confirm Complete to? The testing I did when this was set to size is way too slow at around 1 message for 2 seconds. Is it safe to set this value to None? Would I get half messages if the sending system didn't compete writing the message.

1
0 465
Question Mikael Toivonen · Aug 17, 2017

My issue is that I don't know why Ensemble processes incoming data in the wrong encoding.

Update: Issue was solved, I think, see my answer below.

our customer uploads UTF-8 encoded CSV files to our sFTP server. When I view the files on the server side, the scandinavian characters Ä and Ö (A and O with two dots on top of themselves, respectively) display correctly in the source file. When Ensemble downloads the files using a FTP Service, the characters display incorrectly in Ensemble. 

I am unable to pinpoint the reason for this behavior and I was hoping this is easily solvable.

6
0 9595
Question Scott Roth · Jun 9, 2017

I have a case where I am creating a PDF file from an Encoded String, and I need to transfer this file over to another server. I was wondering since this is PDF file if I could just invoke the FTP.OutboundAdapter within my Object script that is creating the PDF from the encoded string. Is this possible? Does anyone have an examples of using EnsLib.FTP.OutboundAdpater within their Object Script?

Thanks

Scott Roth

Integration - Interfaces

The Ohio State University Wexner Medical Center

5
0 654
Question Stuart Byrne · May 23, 2017

Dear All,

I’m having trouble creating the following business service.  It’s intention is to pick up an CSV via FTP and pass it to a Business process that transforms it to a HL7 message.

I have created a record map for the CSV file, which I am trying to call in the business service and parse it into a new message class, which can be transformed in the business process.

Please could you advise:

Business Service:

2
0 636
Question prabakaran a · Apr 20, 2017

Hi All,

         We can sent the file to FTP server using CMD prompt.

         When trying send file using cache FTP. it automatically logged out.

          While cache FTP access (read/write) FTP server it automatically logged out.

CODE:

1
0 832
Question bastien bouko · Mar 27, 2017

Hello,

i'd like to create a directory chain with  "EnsLib.FTP.OutboundAdapter"

i'm using it like that with the class file and it's working:

file = ##class(%File).CreateDirectoryChain(directory)

But now i'd like to create a directory chain with the FTP Outbound but i don't know how , i didn't see a method to do that.

Thanks in advance.

3
0 786
Question Stella Ticker · Feb 27, 2017

I am having a problem getting pair key authentication to work on my local PC. I am using freeSShd as the SFTP server. I generated private and public keys using putty gen . I used these keys to successfully log into the root directory using both Winscp and Putty. But this is not working with an FTP Operation. Below is the error that results. freeSSHd server log shows that I log in but immediately disconnect.

I am working on HS2015.1.1 Please help !!

1
0 1534
Question Kurro Lopez · Jan 4, 2017

Hi all,

I've a problem with EnsLib.FTP.OutboundAdapter

I've configured this adapter using a SFTP connection, it has been working the first time but now its raising the following error message:

ERROR <Ens>ErrFTPPutFailed: FTP: error al colocar archivo '1600000107279008930.pdf' (mensaje='Error in SFTP Put('C:\stream\QhFaDm4L1Jrgbg.stream','mypath/1600000107279008930.pdf') ERROR #7500: Error SSH '-2146430933': SSH Error [8010102B]: Unable to send FXP_OPEN* [8010102b] at SFTP.cpp:539,0',código=0)

This is part of my code:

4
0 3075
Question Scott Beeson · Feb 5, 2016
The minimum interval between invocations of the adapter by the Ensemble framework. For adapters that poll for external events, this is the polling interval. However, most polling adapters will process all inputs immediately if several are detected at one time. This is also the interval at which each Business Service will check for shutdown requests.

Is it seconds or what?  The default is 15  

1
0 526