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

Visit share to get the information about remote file import


ServiceNow Share



Thanks,


Jagarnath


florianwallrodt
Tera Contributor

Hello,

are there any updates on that issue? We actually have the same problem. Are there any solutions for it?

I find a workarround:

For MID Server File import, running transfom maps and Import sets etc. you normally using a special user. When this MID Server user get's the admin role, then there will be no "HTTP response 403" error. Looks like that there are some access and security issues.

 

Regards

Florian

Fabian10
Tera Guru

Hi Community,

I ran in the same issue and with this thread I was able to get it to work by assigning admin to the MID Server user. But because this seams to be a big security risk, I investigated some more to find a prettier and saver solution:

Resolution: Just grant the import_set_loader and import_transformer role to your MID Server user. This will resolve the issue.

If this helps, please mark this answer as helpful and as answer of this thread.

Best regards,

Fabian

Hi All,

 

I am running this in Kingston and I found that once the Packages.java issues (found that it's still missing in two places) have been corrected with the CSMIDServerRemoteFileImport script include, once you assign the two roles mentioned above to your MID server user account, the import will be successful.

All credit to Fabien 🙂

thanks,

Chris.

 

stevejarman
Giga Guru

Hey guys - is this something that's been deprecated? I can't locate any OOB script include called MIDServerRemoteFileImport