Hello Milan and List,<div><br></div><div>I was being stupid there for a few. I had the output of systemgroup.listActiveSystemsInGroup going to @PROXY_SERVERS instead of $PROXY_SERVERS. I then had @PROXY_SERVERS instead of @$PROXY_SERVERS in the system.scheduleScriptRun API call. After changing that everything started to work. Sorry about the waste of time on this. I should have caught that sooner. Thank you Milan for your help. It forced me to have another look at the script. Thank you for your time and have a great day!</div>
<div><br><div class="gmail_quote">On Wed, May 30, 2012 at 10:59 AM, Milan Zazrivec <span dir="ltr"><<a href="mailto:mzazrivec@redhat.com" target="_blank">mzazrivec@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">> Hello Milan,<br>
><br>
> I used the systemgroup.listActiveSystemsInGroup and assigned the output to<br>
> an array. Based on the documentation of the<br>
> systemgroup.listActiveSystemsInGroup that it provides you an array of<br>
> integers of system ids. Is this correct or do I need to change a couple of<br>
> thing. I am using perl for this script.<br>
<br>
</div>Hard to tell like this. What does your code look like (or the relevant /<br>
important part of it)?<br>
<span class="HOEnZb"><font color="#888888"><br>
-MZ<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
> On Wed, May 30, 2012 at 12:39 AM, Milan Zazrivec<br>
<<a href="mailto:mzazrivec@redhat.com">mzazrivec@redhat.com</a>>wrote:<br>
> > > Hello List,<br>
> > ><br>
> > > I am trying to use the system.scheduleScriptRun API call that takes an<br>
> > > array of Spacewalk system IDs (obtained by the api call<br>
> > > systemgroup.listActiveSystemsInGroup) to run a script on some servers.<br>
> > > I get the following error when I call the API to run.<br>
> > ><br>
> > > CALL: system.scheduleScriptRun(78649xba40408a720cb82ea3d3de7ab3a8398e,<br>
> > > [[1000010065], [1000010285]], root, root, 60, #!/bin/sh<br>
> > > <removed for security, Tue May 29 15:02:34 MST 2012) CALLER: (removed<br>
> > > for security) TIME: 0.006 seconds<br>
> > > redstone.xmlrpc.XmlRpcFault: unhandled internal exception:<br>
> > > redstone.xmlrpc.XmlRpcArray cannot be cast to java.lang.Integer<br>
> ><br>
> > Shouldn't the second function argument (array of System IDs of the<br>
> > servers to<br>
> > run the script on) be an array of integers?<br>
> ><br>
> > What you're showing above would lead me to believe you're passing the<br>
> > function<br>
> > an array of arrays.<br>
> ><br>
> > -Milan Zázrivec<br>
> ><br>
> > > at<br>
> ><br>
> > com.redhat.rhn.frontend.xmlrpc.BaseHandler.invoke(BaseHandler.java:131)<br>
> ><br>
> > > at redstone.xmlrpc.XmlRpcDispatcher.dispatch(XmlRpcDispatcher.java:123)<br>
> > > at<br>
> ><br>
> > com.redhat.rhn.frontend.xmlrpc.RhnXmlRpcServer.execute(RhnXmlRpcServer.ja<br>
> > va<br>
> ><br>
> > > :54) at<br>
> ><br>
> > com.redhat.rhn.frontend.xmlrpc.XmlRpcServlet.doPost(XmlRpcServlet.java:16<br>
> > 2)<br>
> ><br>
> > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)<br>
> > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)<br>
> > > at<br>
> ><br>
> > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicat<br>
> > io<br>
> ><br>
> > > nFilterChain.java:269) at<br>
> ><br>
> > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilte<br>
> > rC<br>
> ><br>
> > > hain.java:188) at<br>
> ><br>
> > com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.j<br>
> > av<br>
> ><br>
> > > a:142) at<br>
> ><br>
> > com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.ja<br>
> > va<br>
> ><br>
> > > :58) at<br>
> ><br>
> > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicat<br>
> > io<br>
> ><br>
> > > nFilterChain.java:215) at<br>
> ><br>
> > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilte<br>
> > rC<br>
> ><br>
> > > hain.java:188) at<br>
> ><br>
> > com.redhat.rhn.frontend.servlets.LocalizedEnvironmentFilter.doFilter(Loca<br>
> > li<br>
> ><br>
> > > zedEnvironmentFilter.java:67) at<br>
> ><br>
> > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicat<br>
> > io<br>
> ><br>
> > > nFilterChain.java:215) at<br>
> ><br>
> > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilte<br>
> > rC<br>
> ><br>
> > > hain.java:188) at<br>
> ><br>
> > com.redhat.rhn.frontend.servlets.EnvironmentFilter.doFilter(EnvironmentFi<br>
> > lt<br>
> ><br>
> > > er.java:108) at<br>
> ><br>
> > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicat<br>
> > io<br>
> ><br>
> > > nFilterChain.java:215) at<br>
> ><br>
> > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilte<br>
> > rC<br>
> ><br>
> > > hain.java:188) at<br>
> ><br>
> ><br>
com.redhat.rhn.frontend.servlets.SessionFilter.doFilter(SessionFilter.java:<br>
> > > 55) at<br>
> ><br>
> > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicat<br>
> > io<br>
> ><br>
> > > nFilterChain.java:215) at<br>
> ><br>
> > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilte<br>
> > rC<br>
> ><br>
> > > hain.java:188) at<br>
> ><br>
> > com.redhat.rhn.frontend.servlets.SetCharacterEncodingFilter.doFilter(SetC<br>
> > ha<br>
> ><br>
> > > racterEncodingFilter.java:97) at<br>
> ><br>
> > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicat<br>
> > io<br>
> ><br>
> > > nFilterChain.java:215) at<br>
> ><br>
> > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilte<br>
> > rC<br>
> ><br>
> > > hain.java:188) at<br>
> ><br>
> > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve<br>
> > .j<br>
> ><br>
> > > ava:210) at<br>
> ><br>
> > org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve<br>
> > .j<br>
> ><br>
> > > ava:172) at<br>
> ><br>
> > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:<br>
> > 12<br>
> ><br>
> > > 7) at<br>
> ><br>
> > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:<br>
> > 11<br>
> ><br>
> > > 7) at<br>
> ><br>
> > org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.j<br>
> > av<br>
> ><br>
> > > a:108) at<br>
> ><br>
> > org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:15<br>
> > 1)<br>
> ><br>
> > > at<br>
> > > org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:200)<br>
> > > at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)<br>
> > > at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:775)<br>
> > > at<br>
> ><br>
> > org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:7<br>
> > 04<br>
> ><br>
> > > ) at<br>
> ><br>
> > org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.j<br>
> > av<br>
> ><br>
> > > a:897) at<br>
> ><br>
> > org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.<br>
> > ja<br>
> ><br>
> > > va:685) at java.lang.Thread.run(Thread.java:679)<br>
> > ><br>
> > > Based on the API docs provided with Spacewalk there are two API calls<br>
> > > for system.scheduleScriptRun. One takes an array of system ids. The<br>
> > > other<br>
> ><br>
> > just<br>
> ><br>
> > > takes a system id. What could I be doing wrong? Below you will find the<br>
> > > code that calls the system.scheduleScriptRun API.<br>
> > ><br>
> > > my $OSAD_ID = $SPACEWALK_API_CLIENT->call('system.scheduleScriptRun',<br>
> > > $SPACEWALK_API_SESSION, \@PROXY_SERVERS, 'root', 'root', 60, $SCRIPT,<br>
> > > $SPACEWALK_TIME);<br>
> > ><br>
> > > Thank you for your time and have a great day!<br>
> > ><br>
> > > Regards,<br>
> > > Jeremy<br>
> ><br>
> > _______________________________________________<br>
> > Spacewalk-list mailing list<br>
> > <a href="mailto:Spacewalk-list@redhat.com">Spacewalk-list@redhat.com</a><br>
> > <a href="https://www.redhat.com/mailman/listinfo/spacewalk-list" target="_blank">https://www.redhat.com/mailman/listinfo/spacewalk-list</a><br>
<br>
_______________________________________________<br>
Spacewalk-list mailing list<br>
<a href="mailto:Spacewalk-list@redhat.com">Spacewalk-list@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/spacewalk-list" target="_blank">https://www.redhat.com/mailman/listinfo/spacewalk-list</a><br>
</div></div></blockquote></div><br></div>