Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

Error while creating the SFTP Connection

adityachadde
New Contributor III
New Contributor III

Hi Team,

We are trying to create an sftp connection we are getting an error. The credentials are correct still we are getting this error

We haven't added any certificates in the sftp ootb connection.

are we getting below error because of SSL certificate or issue is something else?

kindly help us with this.

c.s.s.s.service.SFTPAuthService : Exception in testConnection : |com.jcraft.jsch.JSchException: Auth fail|\u0009at com.jcraft.jsch.Session.connect(Session.java:519) ~[na:na]|\u0009at com.jcraft.jsch.Session.connect(Session.java:183) ~[na:na]|\u0009at com.saviynt.ssm.sftpconnector.service.SFTPAuthService.testConnection(SFTPAuthService.java:53) ~[na:na]|\u0009at com.saviynt.ssm.sftpconnector.SFTPConnector.test(SFTPConnector.java:43) ~[na:na]|\u0009at com.saviynt.ssm.connectorms.controller.FileTransferController.test(FileTransferController.java:57) ~[classes!/:2021.1.0.0-SNAPSHOT]|\u0009at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]| \n","stream":"stdout","time":"2023-06-07T10:27:04.689242991Z"}

Best regards,

Aditya Chadde

16 REPLIES 16

DixshantValecha
Saviynt Employee
Saviynt Employee

The error message suggests that there is an authentication failure when attempting to establish an SFTP connection. Although it's not explicitly mentioned in the error message, the absence of SSL certificates could indeed be a potential cause for this issue.

SFTP connections often require SSL certificates for secure authentication and data transfer. Without the proper SSL certificates, the connection might fail to authenticate successfully, resulting in the error you encountered.

Kindly refer the below documentation for further details 

https://docs.saviyntcloud.com/bundle/SFTP-Certified-v23x/page/Content/Configuring-the-Integration-fo... 

https://docs.saviyntcloud.com/bundle/SFTP-Certified-v23x/page/Content/SFTP-File-Transfer-Integration... 

Please validate and let us know if further details are needed on this.

adityachadde
New Contributor III
New Contributor III

Thank you, @DixshantValecha 

Hi @DixshantValecha,

 

we are getting below error in logs while transferring the files

2023-06-12T11:54:23+05:30-connectorms-{"log":"2023-06-12 06:24:23.081 DEBUG [] 7 --- [http-nio-8980-exec-9] c.s.s.s.service.SFTPConnectorService : Entered in validateFile \n","stream":"stdout","time":"2023-06-12T06:24:23.081676449Z"}
 
2023-06-12T11:54:23+05:30-connectorms-{"log":"2023-06-12 06:24:23.081 DEBUG [] 7 --- [http-nio-8980-exec-9] c.s.s.s.service.SFTPConnectorService : File Name : DeciseoFREMEA \n","stream":"stdout","time":"2023-06-12T06:24:23.081706828Z"}
 
2023-06-12T11:54:23+05:30-connectorms-{"log":"2023-06-12 06:24:23.081 DEBUG [] 7 --- [http-nio-8980-exec-9] c.s.s.s.service.SFTPConnectorService : File Size (In MB) : 0 \n","stream":"stdout","time":"2023-06-12T06:24:23.081712375Z"}
 
2023-06-12T11:54:23+05:30-connectorms-{"log":"2023-06-12 06:24:23.081 DEBUG [] 7 --- [http-nio-8980-exec-9] c.s.s.s.service.SFTPConnectorService : File Extension is not supported for DeciseoFREMEA \n","stream":"stdout","time":"2023-06-12T06:24:23.081755766Z"}
 
2023-06-12T11:54:23+05:30-connectorms-{"log":"2023-06-12 06:24:23.081 DEBUG [] 7 --- [http-nio-8980-exec-9] c.s.s.s.service.SFTPConnectorService : Exit from validateFile \n","stream":"stdout","time":"2023-06-12T06:24:23.081766721Z"}
 
2023-06-12T11:54:23+05:30-connectorms-{"log":"2023-06-12 06:24:23.082 DEBUG [] 7 --- [http-nio-8980-exec-9] c.s.s.s.service.SFTPConnectorService : Files failed to upload with detailed error message : {\"/saviynt_shared/reports/admin/DeciseoFREMEA\":\"Blocked due to Guardrail\"} \n","stream":"stdout","time":"2023-06-12T06:24:23.082083126Z"}
 
2023-06-12T11:54:23+05:30-connectorms-{"log":"2023-06-12 06:24:23.082 DEBUG [] 7 --- [http-nio-8980-exec-9] c.s.s.s.service.SFTPConnectorService : Exit from uploadFile \n","stream":"stdout","time":"2023-06-12T06:24:23.082437099Z"}
 
2023-06-12T11:54:23+05:30-connectorms-{"log":"2023-06-12 06:24:23.082 DEBUG [] 7 --- [http-nio-8980-exec-9] c.s.s.s.service.SFTPConnectorService : Exit from putFilesInDirectory \n","stream":"stdout","time":"2023-06-12T06:24:23.082451276Z"}
 
 
2023-06-12T11:54:23+05:30-connectorms-{"log":"2023-06-12 06:24:23.082 DEBUG [] 7 --- [http-nio-8980-exec-9] c.s.s.s.service.SFTPConnectorService : Exit from putFilesInTarget \n","stream":"stdout","time":"2023-06-12T06:24:23.082455152Z"}
 
2023-06-12T11:54:23+05:30-connectorms-{"log":"2023-06-12 06:24:23.082 DEBUG [] 7 --- [http-nio-8980-exec-9] c.s.s.c.c.FileTransferController : Exit putFiles \n","stream":"stdout","time":"2023-06-12T06:24:23.082490599Z"}
 
we tried using different different file formats like csv,xlsx zip. it is not working. 

\"Blocked due to Guardrail\ error.

when we are trying with different file formats it is showing file not found error.

java.io.FileNotFoundException: /saviynt_shared/reports/admin/DeciseoFREMEA.csv (No such file or directory).

please help us with this issue.

 
what could be the issue?
 
best regards,
Aditya Chadde

DixshantValecha
Saviynt Employee
Saviynt Employee

Hi,

Based on the provided logs, it appears that you are encountering two different issues when transferring files via SFTP:

  1. "File Extension is not supported" error: This error suggests that the file extension of the file you are trying to upload is not supported. The log entry indicates that the file name is "DeciseoFREMEA," but it does not specify the file extension. Make sure that the file extension is included and that it is supported.

  2. "Blocked due to Guardrail" error: This error indicates that the file upload is being blocked due to a guardrail restriction. The detailed error message in the log entry shows that the file "/saviynt_shared/reports/admin/DeciseoFREMEA" is blocked. This suggests that there might be certain security or compliance measures in place that prevent the upload of specific files. 

Regarding the "java.io.FileNotFoundException: /saviynt_shared/reports/admin/DeciseoFREMEA.csv" error, it seems that the system is looking for a file with the .csv extension, but it is unable to find it at the specified location. This error typically occurs when the file path or filename is incorrect, or the file does not exist in the specified directory. Double-check the file path and make sure the file exists at the expected location. Ensure that the file name and extension match exactly what is being referenced in your code or configuration.

In summary, to resolve these issues:

  1. Ensure that the file extension you are using is supported .
  2. Investigate the guardrail restrictions that are blocking the file upload.
  3. Double-check the file path and verify that the file with the correct name and extension exists at the specified location to resolve the "FileNotFoundException" error.

If the issues persist or you need further assistance, consider providing more details about your SFTP configuration, code, or any additional error messages for a more specific solution.

Hi @DixshantValecha,

Is it possible to check the file in Saviynt in  /saviynt_shared/reports/admin/ location.

Do we have access to this folder?

We are struggling to find this location.

Could you help us with this?

Best Regards,

Aditya Chadde

Hi @DixshantValecha,

The file is created in the mentioned folder with the name

DeciseoFREMEATest/DeciseoFREMEATest_HKey4024f81e63cc474bb4a5c20a1af3e633_2023-06-14_13-44-39(UTC).csv

but when we are trying to reconcile it we are getting the same error as java.io.FileNotFoundException.

Could you help us with this?

Best Regards,

Aditya Chadde

DixshantValecha
Saviynt Employee
Saviynt Employee

Thanks for the details our team is checking on this.

Another issue we found is whenever we are generating the file by running the report one folder is created with the same name as report name example DeciseoFREMEATest/ and in this folder csv file is getting generated.

but in documentation nothing is mentioned related to this. In document it is suggested to use file name directly  as below

adityachadde_0-1686753988063.png

   "file_list":["file1.csv","file2.xlsx"]

and we also tried another option of using regular expression.

"regex_list":["*.zip"]  when we are using this job is getting completed successfully but no file is getting transferred.

This is a blocker for our development. Please help us with this.

Best Regards,

Aditya Chadde

Hi @DixshantValecha,

Do you have any updates on this issue?

It's causing significant issues for our progress.

Best Regards,

Aditya Chadde

adityachadde
New Contributor III
New Contributor III

Hi Team,

Would it be possible to receive any updates on this issue?

This is a blocker for our development.

Best Regards,

Aditya Chadde

DixshantValecha
Saviynt Employee
Saviynt Employee

Hi,

#Please review the following configuration for validation on the SFTP file transfer connection:

PUT_FILES JSON
[
{
"eic_src_dir":"Reports",
"target_dir":"/home/reports4/",
"regex_list":["Users3*.zip"]
}
]

#Please note that you should adjust the file name according to your specific configuration.

========================

The updated configuration for PUT_FILES JSON is as follows:
[
{
"eic_src_dir":"Reports",
"target_dir":"/ab_Receive/",
"regex_list":["^Users3.*\.zip"]
}
]

=================================================

[{"eic_src_dir":"Reports",
"target_dir":"/ap_Receive/",
"regex_list":["^Users2.*\\.csv"]
}
]

 

adityachadde
New Contributor III
New Contributor III

Hi @DixshantValecha ,

We have tried in below formats


DeciseoFREMEATest.*\\.csv
^DeciseoFREMEATest.*\\.csv
^DeciseoFREMEATest.*\.csv
DeciseoFREMEATest*.csv

Job is getting completed no error is there in the job logs.

and there is no error in application logs. 

2023-06-19T19:37:14+05:30-connectorms-{"log":"2023-06-19 14:07:13.579 DEBUG [] 7 --- [http-nio-8980-exec-4] c.s.s.s.service.SFTPConnectorService : Entered in putFilesInTarget \n","stream":"stdout","time":"2023-06-19T14:07:13.579551424Z"}
 
2023-06-19T19:37:14+05:30-connectorms-{"log":"2023-06-19 14:07:13.579 DEBUG [] 7 --- [http-nio-8980-exec-4] c.s.s.s.service.SFTPConnectorService : Entered in generateInputAttrsforPush \n","stream":"stdout","time":"2023-06-19T14:07:13.579691033Z"}
 
2023-06-19T19:37:14+05:30-connectorms-{"log":"2023-06-19 14:07:13.579 DEBUG [] 7 --- [http-nio-8980-exec-4] c.s.s.s.service.SFTPConnectorService : Exit from generateInputAttrsforPush \n","stream":"stdout","time":"2023-06-19T14:07:13.579703247Z"}
 
2023-06-19T19:37:14+05:30-connectorms-{"log":"2023-06-19 14:07:13.579 DEBUG [] 7 --- [http-nio-8980-exec-4] c.s.s.s.service.SFTPConnectorService : Entered in putFilesInDirectory \n","stream":"stdout","time":"2023-06-19T14:07:13.579708895Z"}
 
2023-06-19T19:37:14+05:30-connectorms-{"log":"2023-06-19 14:07:13.579 DEBUG [] 7 --- [http-nio-8980-exec-4] c.s.s.s.service.SFTPConnectorService : List of files are not defined checking for regex \n","stream":"stdout","time":"2023-06-19T14:07:13.579743714Z"}
 
2023-06-19T19:37:14+05:30-connectorms-{"log":"2023-06-19 14:07:13.579 DEBUG [] 7 --- [http-nio-8980-exec-4] c.s.s.s.service.SFTPConnectorService : Entered in getFilesUsingRegexFromEIC \n","stream":"stdout","time":"2023-06-19T14:07:13.579756978Z"}
 
2023-06-19T19:37:14+05:30-connectorms-{"log":"2023-06-19 14:07:13.587 DEBUG [] 7 --- [http-nio-8980-exec-4] c.s.s.s.service.SFTPConnectorService : Exit from getFilesUsingRegexFromEIC \n","stream":"stdout","time":"2023-06-19T14:07:13.587226151Z"}
 
2023-06-19T19:37:14+05:30-connectorms-{"log":"2023-06-19 14:07:13.587 DEBUG [] 7 --- [http-nio-8980-exec-4] c.s.s.s.service.SFTPConnectorService : Exit from putFilesInDirectory \n","stream":"stdout","time":"2023-06-19T14:07:13.587248527Z"}
 
2023-06-19T19:37:14+05:30-connectorms-{"log":"2023-06-19 14:07:13.587 DEBUG [] 7 --- [http-nio-8980-exec-4] c.s.s.s.service.SFTPConnectorService : Exit from putFilesInTarget \n","stream":"stdout","time":"2023-06-19T14:07:13.587266287Z"}
 
2023-06-19T19:37:14+05:30-connectorms-{"log":"2023-06-19 14:07:13.587 DEBUG [] 7 --- [http-nio-8980-exec-4] c.s.s.c.c.FileTransferController : Exit putFiles \n","stream":"stdout","time":"2023-06-19T14:07:13.587280772Z"}
 
file is generated in the below folder as csv with below name.
/saviynt_shared/reports/admin/DeciseoFREMEATest/DeciseoFREMEATest_HKeyc24352a3d93c466284c985e9b4cf73df_2023-06-19_13-52-37(UTC).csv\n","stream":"stdout","time":"2023-06-19T13:52:43.41115942Z"
 
if we use  "file_list":[""] in JSON we are getting the same error as java.io.FileNotFoundException.

It is very difficult to trace the issue if we use "regex_list". currently we are using below json

[
{
"eic_src_dir": "Reports",
"target_dir": "/cdio/in/DECISEO/SAVDAT01",
"regex_list": ["DeciseoFREMEATest.*\\.csv"]
}
]

Kindly look into this issue.

Let us know if we should raise a saviynt ticket for this?

Best Regards,

Aditya Chadde

 

DixshantValecha
Saviynt Employee
Saviynt Employee

Hi @adityachadde ,

Thank you for the update. It appears that the issue you mentioned is already known to our team, and they are actively working on resolving it. However, in the interim, we can provide you with an alternative solution.

We recommend utilizing the out-of-the-box SFTP (Secure File Transfer Protocol) solution available on Saviynt Exchange (https://saviynt.com/integrations/#integrations). This solution offers a reliable and secure method for transferring files.

To assist you further, I have attached a comprehensive documentation for reference, which provides detailed instructions on utilizing the SFTP integration. You can access it through the following link: https://docs-be.saviyntcloud.com/bundle/EIC-Connectors/page/Content/Resources/Attachments/SFTPIntegr...

Please follow the provided steps in the documentation, and if you require any additional assistance, please let us know.

adityachadde
New Contributor III
New Contributor III

Hi @DixshantValecha,

We have tried transferring the file from Saviynt to the SFTP Folder. When we use extension as CSV we are getting below message in log.

Jun 22, 2023 6:02:13 PM com.saviynt.connector.SFTPConnector.FileTransferUtilitywithargs saviyntFileTransfer_SFTP
INFO: 9470 :: Files with extension .csv...
Jun 22, 2023 6:02:13 PM com.saviynt.connector.SFTPConnector.FileTransferUtilitywithargs saviyntFileTransfer_SFTP
INFO: 9470 :: Zero files found to upload::0

it is showing zero files found.

but when we see in log file is present with the extension as .csv. Please find the below screenshot for more details.

adityachadde_0-1687457277198.png

If we add the extension as .zip in json then we are able to transfer the file from Saviynt successfully.

but we have the requirement to transfer csv files from Saviynt to the sftp. 

what could be the issue?

In logs we can see the file is present as .csv as below format

 saviynt_shared/reports/saviynt_shared/reports/admin/DeciseoFREMEATest/DeciseoFREMEATest_HKey49e038992f0c4936a2b85d98ed5698a5_2023-06-22_17-53-23(UTC).csv

but we are unable to transfer the csv file. Kindly look into this issue. SFTP Jar connector is also not working as expected for us. if we see the flow in the application logs first csv file is getting created after this zip file is created. 

Is transferring the csv file which is generated after running report is supported in Saviynt?

Best Regards,

Aditya Chadde

DixshantValecha
Saviynt Employee
Saviynt Employee

Hi @adityachadde 

As discussed it appears that the issue you mentioned is already known to our team, and they are actively working on resolving it. However, in the interim, we can provide you with an alternative solution.

We recommend utilizing the out-of-the-box SFTP (Secure File Transfer Protocol) solution available on Saviynt Exchange (https://saviynt.com/integrations/#integrations). This solution offers a reliable and secure method for transferring files.

To assist you further, I have attached a comprehensive documentation for reference, which provides detailed instructions on utilizing the SFTP integration. You can access it through the following link: https://docs-be.saviyntcloud.com/bundle/EIC-Connectors/page/Content/Resources/Attachments/SFTPIntegr...

Please follow the provided steps in the documentation, and if you require any additional assistance, please let us know.

adityachadde
New Contributor III
New Contributor III

Hi @DixshantValecha,

We tried uploading the file using the alternate method jar approach. We are successfully able to transfer the zip file.

But the file which we are transferring has the long name so we are facing an issue while extracting the file from the zip file. 

File name is too long to perform unzip directly from the server.

We have 2 options to fulfill the requirement either we need to reduce the file name length or we need to send the file in csv format.

Please help us with this.

Best Regards,

Aditya Chadde