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