Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 1.3.1 (Alpha)
-
Fix Version/s: 1.4.2 (Beta)
-
Component/s: Distributed Builds
-
Labels:None
-
Complexity:Intermediate
Description
There's no way for the master in knowing that there was a problem in building the project in the build agent, if the master's url wasn't configured in the build agent's config file
In the build agent, I forgot to configure the master in the continuum-buildagent.xml. When I tried to build a project on that build agent from the master, the following error was displayed in the build agent's logs:
2009-01-19 14:29:14,236 [btpool0-3] ERROR org.apache.continuum.distributed.transport.slave.SlaveBuildAgentTransportServer - Failed to build projects.
org.apache.continuum.buildagent.ContinuumBuildAgentException: Invalid continuum server URL 'null'
at org.apache.continuum.buildagent.ContinuumBuildAgentServiceImpl.buildProjects(ContinuumBuildAgentServiceImpl.java:84)
at org.apache.continuum.distributed.transport.slave.SlaveBuildAgentTransportServer.buildProjects(SlaveBuildAgentTransportServer.java:53)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.xmlrpc.server.ReflectiveXmlRpcHandler.invoke(ReflectiveXmlRpcHandler.java:112)
at org.apache.xmlrpc.server.ReflectiveXmlRpcHandler.execute(ReflectiveXmlRpcHandler.java:103)
at org.apache.xmlrpc.server.XmlRpcServerWorker.execute(XmlRpcServerWorker.java:43)
at org.apache.xmlrpc.server.XmlRpcServer.execute(XmlRpcServer.java:83)
at org.apache.xmlrpc.server.XmlRpcStreamServer.execute(XmlRpcStreamServer.java:191)
at org.apache.xmlrpc.webserver.XmlRpcServletServer.execute(XmlRpcServletServer.java:104)
at org.apache.xmlrpc.webserver.XmlRpcServlet.doPost(XmlRpcServlet.java:191)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)
at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:324)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:843)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:647)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:205)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)
Caused by: org.apache.maven.continuum.ContinuumException: Invalid continuum server URL 'null'
at org.apache.continuum.buildagent.manager.DefaultBuildAgentManager.startPrepareBuild(DefaultBuildAgentManager.java:210)
at org.apache.continuum.buildagent.manager.DefaultBuildAgentManager.prepareBuildProjects(DefaultBuildAgentManager.java:92)
at org.apache.continuum.buildagent.ContinuumBuildAgentServiceImpl.buildProjects(ContinuumBuildAgentServiceImpl.java:80)
... 31 more
Caused by: java.net.MalformedURLException
at java.net.URL.<init>(URL.java:601)
at java.net.URL.<init>(URL.java:464)
at java.net.URL.<init>(URL.java:413)
at org.apache.continuum.buildagent.manager.DefaultBuildAgentManager.startPrepareBuild(DefaultBuildAgentManager.java:203)
... 33 more
If I look at the master's logs, only these appear:
2009-01-19 14:29:14,014 [pool-12-thread-1] INFO org.apache.continuum.builder.distributed.executor.DistributedBuildProjectTaskExecutor - initializing buildContext
2009-01-19 14:29:14,308 [pool-12-thread-1] INFO org.apache.continuum.distributed.transport.slave.SlaveBuildAgentTransportClient - Building projects.
And in the Queues page, it just shows that there are no tasks queued or currently building.
I'm not sure if this is the right approach to this based on the implementation..
Since the master url isn't configured in the build agent's config file, maybe the build-agent could send back an error to the master by getting the master's url from the request?
Issue Links
- is related to
-
CONTINUUM-2131
An unconfigured build agent should not be enabled
-
> In the build agent, I forgot to configure the master in the continuum-buildagent.xml.
This should probably cause an error at the time you add the agent to the master. Looks like there's an outbound ping at this time, but we don't check that the agent can send a response.
> Since the master url isn't configured in the build agent's config file, maybe the build-agent could send back an error to the master by getting the master's url from the request?
Yes, it could check the request url against its configuration at build time and send back an error saying that the url doesn't match and the agent won't accept the command.
(I think the agent should only send "real" responses to the master url in its configuration file. It should also only accept commands from its master, but I'm not sure checking the url is enough to confirm that it's really the master sending the request.)