Unable to write the data to the transport connection. An existing connection was forcibly closed by the remote host.

yogesh15dd
Tera Guru

Hi,

We are trying to import user and company data in to our SN instance(Eureka) using another application,     company data gets imported without any issues, but not the data to the users table, as we get the error: Error from logs : Unable to write the data to the transport connection. An existing connection was forcibly closed by the remote host.


Users used to import the data has got the import_transporter role.

Note: this runs fine in calgary, but not in Eureka. we think its eureka's security restriction, might get solved giving SOAP roles, but why it accepts company data without SOAP role??

file : CoreData_User_full.csv using the url:

https://instancename.service-now.com/sys_import.do?sysparm_import_set_tablename=u_user&sysparm_trans...

file :CoreData_Company_full.csv using th eurl

https://instancename.service-now.com/sys_import.do?sysparm_import_set_tablename=u_company&sysparm_tr...

pls suggest.

1 ACCEPTED SOLUTION

solved.



1) Make the authentication "preemptive" in case of Apache HttpClient like below,



client.getParams().setAuthenticationPreemptive(true);


HttpClient - HttpClient Authentication Guide




2) Make the authentication "basic "in case of Microsoft .Net code like below,



Replace this line in your .net codes


request.Credentials = new NetworkCredential(username, password);


With this line:


request.Headers.Add("Authorization", "Basic " + Convert.ToBase64String(new ASCIIEncoding().GetBytes((username + ":" + password))));


View solution in original post

3 REPLIES 3

brian_quinn
ServiceNow Employee
ServiceNow Employee

Yogesh,



When does the error occur?   Immediately after starting the upload or after a period of time?   If it's after a period of time, is it always the same amount of time?



Can you try increasing the import set logging level to see if it adds any additional information to the logs?


Importing Data Using Import Sets - ServiceNow Wiki



Thanks


Brian


Hi Brian,



Erros occurs when SSIS Client (.net firmware code), try to run the importing job from their end to Service Now end. It occurs after some 8 to 10 secs once we run , everytime   the same period. This   erroring out on client side only , i don't   think it writes a logs on SN side, yet i tried setting up this property but no luck, no errors written on SN.



What we have found now is, import is getting successful, only if we try to transfer the data of size less than 780 to 800kb's, more than that will follow the same error pattern explained above.



We tried setting up many properties to increase the pcocessing time, and number of error lines allowed like the below, nothing helped.



any chances that SN have set up some import file size restrictions for Eureka?, even if, it cannot be like limited to 800kb!!!


Properties set up.png




Thanks


Yogesh Dafedar


solved.



1) Make the authentication "preemptive" in case of Apache HttpClient like below,



client.getParams().setAuthenticationPreemptive(true);


HttpClient - HttpClient Authentication Guide




2) Make the authentication "basic "in case of Microsoft .Net code like below,



Replace this line in your .net codes


request.Credentials = new NetworkCredential(username, password);


With this line:


request.Headers.Add("Authorization", "Basic " + Convert.ToBase64String(new ASCIIEncoding().GetBytes((username + ":" + password))));