jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Continuum
  • CONTINUUM-2041

Master should be able to detect an incorrect master url in a build agent's config file

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Major 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

Improvement - An improvement or enhancement to an existing feature or task. CONTINUUM-2131 An unconfigured build agent should not be enabled

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Wendy Smoak added a comment - 19/Jan/09 9:26 AM

> 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.)

Show
Wendy Smoak added a comment - 19/Jan/09 9:26 AM > 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.)
Hide
Permalink
Wendy Smoak added a comment - 19/Jan/09 9:30 AM

I added a component to JIRA for Distributed Build and edited the subject.

Show
Wendy Smoak added a comment - 19/Jan/09 9:30 AM I added a component to JIRA for Distributed Build and edited the subject.
Hide
Permalink
Brett Porter added a comment - 21/Apr/09 9:58 PM

is this required for GA or can we bump back to 1.4.x?

Show
Brett Porter added a comment - 21/Apr/09 9:58 PM is this required for GA or can we bump back to 1.4.x?
Hide
Permalink
Maria Odea Ching added a comment - 09/Aug/09 8:23 PM

I think we can bump this back to 1.4.x

Show
Maria Odea Ching added a comment - 09/Aug/09 8:23 PM I think we can bump this back to 1.4.x

People

  • Assignee:
    Unassigned
    Reporter:
    Maria Odea Ching
Vote (0)
Watch (2)

Dates

  • Created:
    19/Jan/09 12:54 AM
    Updated:
    30/Aug/11 5:55 AM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.