Skip to main content
Solved

Orchestration powershell app returns URI Too Long error

  • March 21, 2025
  • 1 reply
  • 11 views

Forum|alt.badge.img+1

I’m trying to execute a fairly simple powershell script with a very long input … it works in microsoft powershell ise but not in Freshservice automation.  The error reads like

400

completed_with_errors

false

Failed to decode:Unexpected character ('<' (code 60)): expected a valid value (number, String, array, object, 'true', 'false' or 'null') at [Source:

Request-URI Too Large

WEBrick::HTTPStatus::RequestURITooLarge

WEBrick/1.6.0 (Ruby/2.7.2/2020-10-01) at TPVSINFPFS01.ad.toddenergy.co.nz:4567

; line: 1, column: 2]

 

AND the script is like:

ConvertFrom-Json -InputObject @" 
{{P5.root.results.results_object}}
"@ | Format-List
 

where {{P5.root.results.results_object}} is very long, about 12K characters. Yes it is valid json, microsoft powershell ise has no trouble with what I am testing.

 

I’d rather not write the contents of {{P5.root.results.results_object}} to a file.

 

Any other options?

 

Best answer by Doug_in_Wellington_NZ

There was a fix for this one.

From Jonah in support:

 

Error: "Request-URI Too Large"

This issue occurs due to the default character limit of 1000 characters provided by the WinRM library we are using. To solve this follow the below steps in the customer Orchestration Server:

  • Go to  C:\Program Files\Freshworks\Orchestration Server\Resources\RUBY\Ruby27-x64\lib\ruby\2.7.0\webrick\httprequest.rb on customer Orchestration server.
  • Change MAX_URI_LENGTH = 20830 inside httprequest.rb file.

 

Note: Once the change has been made please make sure to have the Orchestration server re-started

This actually fixed the issue.

View original
Did this topic help you find an answer to your question?

1 reply

Forum|alt.badge.img+1

There was a fix for this one.

From Jonah in support:

 

Error: "Request-URI Too Large"

This issue occurs due to the default character limit of 1000 characters provided by the WinRM library we are using. To solve this follow the below steps in the customer Orchestration Server:

  • Go to  C:\Program Files\Freshworks\Orchestration Server\Resources\RUBY\Ruby27-x64\lib\ruby\2.7.0\webrick\httprequest.rb on customer Orchestration server.
  • Change MAX_URI_LENGTH = 20830 inside httprequest.rb file.

 

Note: Once the change has been made please make sure to have the Orchestration server re-started

This actually fixed the issue.


Reply