<div dir="ltr">I'm trying to connect to the API for our Satellite server. According to everything I've read it should be at <a href="https://satellite.example.com/rpc/api">https://satellite.example.com/rpc/api</a>. I've tried this using both Ruby and Perl and have received one of two errors repeatedly. The first is 404 Not Found and the other is Connection refused.<div>

<br></div><div>I'm not entirely sure how I'm supposed to connect with the xmlrpc/client gem in Ruby. This is my code:</div><div><br></div><div><div>#!/usr/bin/ruby</div><div><br></div><div>require "xmlrpc/client"</div>

<div><br></div><div>host = "<a href="https://10.153.156.10">https://10.153.156.10</a>"</div><div>hostpath = "<a href="https://10.153.156.10/rpc/api">https://10.153.156.10/rpc/api</a>"</div><div>path = "rpc/api"</div>

<div>username = "ecapsupport"</div><div>pass = "r310ADed"</div><div><br></div><div>params = {</div><div>  "host" => "<a href="https://REDACTED">https://REDACTED</a>",</div><div>
  "path" => "rpc/api",</div>
<div>  "port" => "443",</div><div>  "proxy_host" => "",</div><div>  "proxy_port" => "",</div><div>  "user" => "REDACTED",</div><div>

  "password" => "REDACTED",</div><div>  "use_ssl" => "true",</div><div>  "timeout" => "300",</div><div>}</div><div><br></div><div>client = XMLRPC::Client.new3(params)</div>

<div>client.instance_variable_get(:@http).instance_variable_set(:@verify_mode, OpenSSL::SSL::VERIFY_NONE)<br></div><div><br></div><div>session = client.call('auth.login', username, pass)</div><div><br></div><div>
sys_ver = session.call('api.systemVersion')</div>
<div>users = session.call("user.listUsers", session)</div><div><br></div><div style>puts sys_ver</div><div style>users.each { |user| puts user }</div><div style><br></div><div style>This results in</div><div style>

<div>/usr/lib/ruby/1.9.1/net/http.rb:762:in `initialize': Connection refused - connect(2) (Errno::ECONNREFUSED)</div><div><span class="" style="white-space:pre">       </span>from /usr/lib/ruby/1.9.1/net/http.rb:762:in `open'</div>

<div><span class="" style="white-space:pre">    </span>from /usr/lib/ruby/1.9.1/net/http.rb:762:in `block in connect'</div><div><span class="" style="white-space:pre"> </span>from /usr/lib/ruby/1.9.1/timeout.rb:68:in `timeout'</div>

<div><span class="" style="white-space:pre">    </span>from /usr/lib/ruby/1.9.1/timeout.rb:99:in `timeout'</div><div><span class="" style="white-space:pre">    </span>from /usr/lib/ruby/1.9.1/net/http.rb:762:in `connect'</div>

<div><span class="" style="white-space:pre">    </span>from /usr/lib/ruby/1.9.1/net/http.rb:755:in `do_start'</div><div><span class="" style="white-space:pre"> </span>from /usr/lib/ruby/1.9.1/net/http.rb:750:in `start'</div>

<div><span class="" style="white-space:pre">    </span>from /usr/lib/ruby/1.9.1/xmlrpc/client.rb:535:in `do_rpc'</div><div><span class="" style="white-space:pre">      </span>from /usr/lib/ruby/1.9.1/xmlrpc/client.rb:420:in `call2'</div>

<div><span class="" style="white-space:pre">    </span>from /usr/lib/ruby/1.9.1/xmlrpc/client.rb:410:in `call'</div><div><span class="" style="white-space:pre">        </span>from sat_test.rb:29:in `<main>'</div></div>

<div style><br></div><div style>I've ensured that the server is accessible both from the workstation I'm on as well as from servers on the same subnet (got the same error from those).</div><div style><br></div><div style>

I copied the example Perl script in the API documentation tweaking. That one gave me the 404.</div><div style><br></div><div style>I've found that if I point my browser to <a href="https://REDACTED/rpc/api">https://REDACTED/rpc/api</a> it also shows up as 404 Error - File Not Found</div>

<div style><br></div><div style>Is there something I'm missing? Was I supposed to install something additional?</div><div style><br></div><div>-Mathew<br><br>"When you do things right, people won't be sure you've done anything at all." - God; Futurama<div>

<br></div><div>"<span style="background-color:rgb(255,255,255);font-family:arial,sans-serif;font-size:13px;line-height:18px">We'll get along much better once you accept that you're wrong and neither am I." - Me</span></div>

</div>
</div></div>