Ruby/Sinatra calling Powershell scripts - pipe errors
4 posts
• Page 1 of 1
Ruby/Sinatra calling Powershell scripts - pipe errors
I am wanting to use the Ruby Hosting Package to host a Sinatra app on IIS. I got everything installed and a basic "hello world" site working. My next step was to call a local powershell script. This test script simply creates a folder, a text file, and puts a line into the text file. When I call the powershell from sinatra, the script executes successfully. It creates the folder, file, and line in the text file. However I'm getting a 500 error:
Error
Helicon Zoo module has caught up an error. Please see the details below.
Worker Status
The process was created
Windows error
The pipe has been ended. (ERROR CODE: 109)
Internal module error
message: Application backend read Error.
type: ZooException
file: App\Jobs\JobBase.cpp
line: 531
version: 3.1.98.538
STDERR
I'm not sure what to make of that error or what's going on. My ruby code is simple:
Any idea what's going on here?
Error
Helicon Zoo module has caught up an error. Please see the details below.
Worker Status
The process was created
Windows error
The pipe has been ended. (ERROR CODE: 109)
Internal module error
message: Application backend read Error.
type: ZooException
file: App\Jobs\JobBase.cpp
line: 531
version: 3.1.98.538
STDERR
I'm not sure what to make of that error or what's going on. My ruby code is simple:
- Code: Select all
get '/' do
exec "powershell -command c:/temp/test.ps1"
return [200, settings.client_headers, {:message => msg}.to_json]
end
Any idea what's going on here?
Re: Ruby/Sinatra calling Powershell scripts - pipe errors
I enabled logging in the web.config. Here are the results:
[25.02.2015 14:49:58.622363] [v 3.1.98.538] [tid 0x0000126c] [sev 2] # 960241232768 Application has been started
[25.02.2015 14:50:03.861896] [v 3.1.98.538] [tid 0x000010e4] [sev 2] WorkersManager - OnProcessExit()
[25.02.2015 14:50:03.861896] [v 3.1.98.538] [tid 0x000010e4] [sev 2] WorkersManager - Worker shutdown. #1 - [pid:4120] "C:\Ruby19\bin\ruby.exe" C:\Zoo\Workers\ruby\zoorack.rb
[25.02.2015 14:49:58.622363] [v 3.1.98.538] [tid 0x0000126c] [sev 2] # 960241232768 Application has been started
[25.02.2015 14:50:03.861896] [v 3.1.98.538] [tid 0x000010e4] [sev 2] WorkersManager - OnProcessExit()
[25.02.2015 14:50:03.861896] [v 3.1.98.538] [tid 0x000010e4] [sev 2] WorkersManager - Worker shutdown. #1 - [pid:4120] "C:\Ruby19\bin\ruby.exe" C:\Zoo\Workers\ruby\zoorack.rb
Re: Ruby/Sinatra calling Powershell scripts - pipe errors
Hello!
What if you change ruby.1.9.rack engine to ruby.1.9.http engine. Try to create new project and follow instructions from http Thin section (you may use another http backend server but the idea is the same). With backend running as http server it would be easier to troubleshoot issue because you will be able to connect to backend locally bypassing Zoo proxy.
What if you change ruby.1.9.rack engine to ruby.1.9.http engine. Try to create new project and follow instructions from http Thin section (you may use another http backend server but the idea is the same). With backend running as http server it would be easier to troubleshoot issue because you will be able to connect to backend locally bypassing Zoo proxy.
4 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 0 guests