MID Server Remote File Import

Filip Laznicka
Tera Guru

Hello,

I'm using OOTB MID Server Script Include called MIDServerRemoteFileImport to get a file from a MID Server and I'm getting this error in ECC queue result:

<results error="HTTP response 403 (script_include:MIDServerRemoteFileImport; line 24)" probe_time="12703" result_code="900000">

<result error="HTTP response 403 (script_include:MIDServerRemoteFileImport; line 24)">

<output>Evaluation error: HTTP response 403 (script_include:MIDServerRemoteFileImport; line 24)</output>

The code in the script include:

    getRemoteFileAndUploadToInstance: function() {

          var url = this._getInstanceConnectionURL();

          var conn = this._getURLConnection(url);

          var file = this._getFile();

          var response = this._writeFile(conn, file);

          if (response != 200)

                throw "HTTP response " + response;         /////LINE 24

          this.logMsg("HTTP response " + response, "debug");

         

          ms.log("Completed MID Server File Transfer");

          return response;

    },

It works on dev environment but it doesn't work on test or production.

Has anyone got a clue what is wrong?

Thanks

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Filip,



Are you using same mid server for Dev and Production?


Can you check you have access to that script include because error 403 means forbidden and comes if you don't have access to the page etc



Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.


Thanks


Ankur


Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

View solution in original post

13 REPLIES 13

Hi Steve,

no, it is not OOTB.

It is part of Remote File Importer from Snow share. 

https://developer.servicenow.com/app.do#!/share/contents/2271821_remote_file_importer_import_files_f...

donaldbatesjr
Tera Contributor

Note I too received the error 403.
This is the midserver trying to send a file to https://instance/sys_import.do?sysparm_import_set_tablename=imp_user&sysparm_transform_after_load=true+

 

From an incognito mode browser you'll be prompted for credentials. Using admin credentials it says file couldn't be imported. Using midserver credentials you might receive 'User Not Authorized'.

 

Adding the role 'import_admin' to the midserver resolved issue when I had it. If it's not the username, ensure you can reach your ServiceNow instance when logged into midserver.

hiranmayeesahoo
Kilo Expert

I am unable to see the script include "MIDServerRemoteFileImport" under Mid server 

After committing the update set for the Remote File Importer, the MID Server Script Include "CSMIDServerRemoteFileImport" can be found in the table "ecc_agent_script_include".