Quantcast

[JIRA] [subversion] (JENKINS-17443) 'connection refused by the server' causes NullPointerException

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[JIRA] [subversion] (JENKINS-17443) 'connection refused by the server' causes NullPointerException

JIRA noreply@jenkins-ci.org
Issue Type: Bug Bug
Assignee: Unassigned
Components: subversion
Created: 03/Apr/13 7:09 AM
Description:

Job fails with NPE when connection is refused by server.

ERROR: Failed to check out svn://SOME_REPO/XXXXXXXXXXXXXXXX
org.tmatesoft.svn.core.SVNException: svn: E210003: connection refused by the server
	at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:85)
	at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:69)
	at org.tmatesoft.svn.core.internal.io.svn.SVNPlainConnector.open(SVNPlainConnector.java:62)
	at org.tmatesoft.svn.core.internal.io.svn.SVNConnection.open(SVNConnection.java:77)
	at org.tmatesoft.svn.core.internal.io.svn.SVNRepositoryImpl.openConnection(SVNRepositoryImpl.java:1252)
	at org.tmatesoft.svn.core.internal.io.svn.SVNRepositoryImpl.getLatestRevision(SVNRepositoryImpl.java:168)
	at org.tmatesoft.svn.core.internal.wc16.SVNBasicDelegate.getRevisionNumber(SVNBasicDelegate.java:480)
	at org.tmatesoft.svn.core.internal.wc16.SVNBasicDelegate.getLocations(SVNBasicDelegate.java:833)
	at org.tmatesoft.svn.core.internal.wc16.SVNBasicDelegate.createRepository(SVNBasicDelegate.java:527)
	at org.tmatesoft.svn.core.internal.wc16.SVNUpdateClient16.doCheckout(SVNUpdateClient16.java:875)
	at org.tmatesoft.svn.core.internal.wc2.old.SvnOldCheckout.run(SvnOldCheckout.java:19)
	at org.tmatesoft.svn.core.internal.wc2.old.SvnOldCheckout.run(SvnOldCheckout.java:8)
	at org.tmatesoft.svn.core.internal.wc2.SvnOperationRunner.run(SvnOperationRunner.java:20)
	at org.tmatesoft.svn.core.wc2.SvnOperationFactory.run(SvnOperationFactory.java:1235)
	at org.tmatesoft.svn.core.wc2.SvnOperation.run(SvnOperation.java:291)
	at org.tmatesoft.svn.core.wc.SVNUpdateClient.doCheckout(SVNUpdateClient.java:777)
	at hudson.scm.subversion.CheckoutUpdater$1.perform(CheckoutUpdater.java:99)
	at hudson.scm.subversion.WorkspaceUpdater$UpdateTask.delegateTo(WorkspaceUpdater.java:153)
	at hudson.scm.SubversionSCM$CheckOutTask.perform(SubversionSCM.java:903)
	at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:884)
	at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:867)
	at hudson.FilePath.act(FilePath.java:865)
	at hudson.FilePath.act(FilePath.java:838)
	at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:843)
	at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:781)
	at hudson.model.AbstractProject.checkout(AbstractProject.java:1364)
	at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:670)
	at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:575)
	at hudson.model.Run.execute(Run.java:1575)
	at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:477)
	at hudson.model.ResourceController.execute(ResourceController.java:88)
	at hudson.model.Executor.run(Executor.java:237)
Caused by: java.net.ConnectException: Przekroczony czas oczekiwania na połączenie
	at java.net.PlainSocketImpl.socketConnect(Native Method)
	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:391)
	at java.net.Socket.connect(Socket.java:579)
	at org.tmatesoft.svn.core.internal.util.SVNSocketConnection.run(SVNSocketConnection.java:57)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
	at java.util.concurrent.FutureTask.run(FutureTask.java:166)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:722)
FATAL: null
java.lang.NullPointerException
	at java.util.ArrayList.addAll(ArrayList.java:530)
	at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:843)
	at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:781)
	at hudson.model.AbstractProject.checkout(AbstractProject.java:1364)
	at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:670)
	at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:575)
	at hudson.model.Run.execute(Run.java:1575)
	at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:477)
	at hudson.model.ResourceController.execute(ResourceController.java:88)
	at hudson.model.Executor.run(Executor.java:237)
Project: Jenkins
Priority: Major Major
Reporter: Mirek Hankus
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[JIRA] [subversion] (JENKINS-17443) 'connection refused by the server' causes NullPointerException

JIRA noreply@jenkins-ci.org
 
Chris Z edited a comment on Bug JENKINS-17443

In general error handling in Subversion plugin is not on the same level as svnkit's. Currently I'm working on the externals proper handling. And new feture to fail build whenever error occurs.

For your problem this should help:

src/main/java/hudson/scm/subversion/CheckoutUpdater.java

index d6f36c3..44fb04e 100755
— a/src/main/java/hudson/scm/subversion/CheckoutUpdater.java
+++ b/src/main/java/hudson/scm/subversion/CheckoutUpdater.java
@@ -34,6 +34,7 @@ import hudson.util.StreamCopyThread;

import org.apache.commons.lang.time.FastDateFormat;
import org.kohsuke.stapler.DataBoundConstructor;
+import org.tmatesoft.svn.core.SVNErrorCode;
import org.tmatesoft.svn.core.SVNCancelException;
import org.tmatesoft.svn.core.SVNDepth;
import org.tmatesoft.svn.core.SVNException;
@@ -90,7 +91,7 @@ public class CheckoutUpdater extends WorkspaceUpdater {
listener.getLogger().println("Checking out " + location.remote + " at revision " + revisionName);

File local = new File(ws, location.getLocalDir());
SubversionUpdateEventHandler eventHandler = new SubversionUpdateEventHandler(new PrintStream(pos), externals, local, location.getLocalDir());
svnuc.setEventHandler(eventHandler);
svnuc.setExternalsHandler(eventHandler);
svnuc.setIgnoreExternals(location.isIgnoreExternalsOption());
@@ -106,8 +107,15 @@ public class CheckoutUpdater extends WorkspaceUpdater { throw (InterruptedException)new InterruptedException().initCause(e); }
} catch (SVNException e) {

  • e.printStackTrace(listener.error("Failed to check out " + location.remote));
  • return null;
    + if(e.getErrorMessage().getErrorCode() == SVNErrorCode.CL_ERROR_PROCESSING_EXTERNALS){ + listener.getLogger().println(e.getMessage()); + listener.getLogger().println("Checkout failed due to the error in external !"); + throw (IOException) new IOException().initCause(new UpdaterException("failed to perform svn checkout", e)); + }
    + else{ + e.printStackTrace(listener.error("Failed to check out " + location.remote)); + return null; + }
    } finally {
    try {
    pos.close();
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[JIRA] [subversion] (JENKINS-17443) 'connection refused by the server' causes NullPointerException

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org
Chris Z commented on Bug JENKINS-17443

In general error handling in Subversion plugin is not on the same level as svnkit's. Currently I'm working on the externals proper handling. And new feture to fail build whenever error occurs.

For your problem this should help:

src/main/java/hudson/scm/subversion/CheckoutUpdater.java

index d6f36c3..44fb04e 100755
— a/src/main/java/hudson/scm/subversion/CheckoutUpdater.java
+++ b/src/main/java/hudson/scm/subversion/CheckoutUpdater.java
@@ -34,6 +34,7 @@ import hudson.util.StreamCopyThread;

import org.apache.commons.lang.time.FastDateFormat;
import org.kohsuke.stapler.DataBoundConstructor;
+import org.tmatesoft.svn.core.SVNErrorCode;
import org.tmatesoft.svn.core.SVNCancelException;
import org.tmatesoft.svn.core.SVNDepth;
import org.tmatesoft.svn.core.SVNException;
@@ -90,7 +91,7 @@ public class CheckoutUpdater extends WorkspaceUpdater {
listener.getLogger().println("Checking out " + location.remote + " at revision " + revisionName);

File local = new File(ws, location.getLocalDir());

  • SubversionUpdateEventHandler eventHandler = new SubversionUpdateEventHandler(new PrintStream(pos), externals, local, location.getLocalDir());
    + SubversionUpdateEventHandler eventHandler = new SubversionUpdateEventHandler(new PrintStream(pos), externals, local, location.getLocalDir(),location.isExternalFailOption());
    svnuc.setEventHandler(eventHandler);
    svnuc.setExternalsHandler(eventHandler);
    svnuc.setIgnoreExternals(location.isIgnoreExternalsOption());
    @@ -106,8 +107,15 @@ public class CheckoutUpdater extends WorkspaceUpdater { throw (InterruptedException)new InterruptedException().initCause(e); }
    } catch (SVNException e) {
  • e.printStackTrace(listener.error("Failed to check out " + location.remote));
  • return null;
    + if(e.getErrorMessage().getErrorCode() == SVNErrorCode.CL_ERROR_PROCESSING_EXTERNALS){ + listener.getLogger().println(e.getMessage()); + listener.getLogger().println("Checkout failed due to the error in external !"); + throw (IOException) new IOException().initCause(new UpdaterException("failed to perform svn checkout", e)); + }
    + else{ + e.printStackTrace(listener.error("Failed to check out " + location.remote)); + return null; + }
    } finally {
    try {
    pos.close();
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[JIRA] [subversion] (JENKINS-17443) 'connection refused by the server' causes NullPointerException

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org
 
Chris Z edited a comment on Bug JENKINS-17443

In general error handling in Subversion plugin is not on the same level as svnkit's. Currently I'm working on the externals proper handling. And new feature to fail build whenever error occurs.

For your problem this should help:

src/main/java/hudson/scm/subversion/CheckoutUpdater.java

index d6f36c3..44fb04e 100755
--- a/src/main/java/hudson/scm/subversion/CheckoutUpdater.java
+++ b/src/main/java/hudson/scm/subversion/CheckoutUpdater.java
@@ -34,6 +34,7 @@ import hudson.util.StreamCopyThread;
 
 import org.apache.commons.lang.time.FastDateFormat;
 import org.kohsuke.stapler.DataBoundConstructor;
+import org.tmatesoft.svn.core.SVNErrorCode;
 import org.tmatesoft.svn.core.SVNCancelException;
 import org.tmatesoft.svn.core.SVNDepth;
 import org.tmatesoft.svn.core.SVNException;
@@ -90,7 +91,7 @@ public class CheckoutUpdater extends WorkspaceUpdater {
                     listener.getLogger().println("Checking out " + location.remote + " at revision " + revisionName);
 
                     File local = new File(ws, location.getLocalDir());
                     SubversionUpdateEventHandler eventHandler = new SubversionUpdateEventHandler(new PrintStream(pos), externals, local, location.getLocalDir());
                     svnuc.setEventHandler(eventHandler);
                     svnuc.setExternalsHandler(eventHandler);
                     svnuc.setIgnoreExternals(location.isIgnoreExternalsOption());
@@ -106,8 +107,15 @@ public class CheckoutUpdater extends WorkspaceUpdater {
                         throw (InterruptedException)new InterruptedException().initCause(e);
                     }
                 } catch (SVNException e) {
-                    e.printStackTrace(listener.error("Failed to check out " + location.remote));
-                    return null;
+                    if(e.getErrorMessage().getErrorCode() == SVNErrorCode.CL_ERROR_PROCESSING_EXTERNALS){   
+                        listener.getLogger().println(e.getMessage());
+                        listener.getLogger().println("Checkout failed due to the error in external !");
+                        throw (IOException) new IOException().initCause(new UpdaterException("failed to perform svn checkout", e));   
+                    }
+                    else{
+                        e.printStackTrace(listener.error("Failed to check out " + location.remote));
+                        return null;
+                    }
                 } finally {
                     try {
                         pos.close();
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[JIRA] [subversion] (JENKINS-17443) 'connection refused by the server' causes NullPointerException

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org
 
Chris Z edited a comment on Bug JENKINS-17443

Answer deleted as it don't repairs your problem. I will try to prepare fix for that.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[JIRA] [subversion] (JENKINS-17443) 'connection refused by the server' causes NullPointerException

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org
 
Chris Z edited a comment on Bug JENKINS-17443

Answer deleted as it don't repairs your problem. I will try to prepare fix for that.

in src/main/java/hudson/scm/subversion/CheckoutUpdater.java

+import org.tmatesoft.svn.core.SVNErrorCode;

 } catch (SVNException e) {
                    if(e.getErrorMessage().getErrorCode() == SVNErrorCode.CL_ERROR_PROCESSING_EXTERNALS){   
                        listener.getLogger().println(e.getMessage());
                        throw (IOException) new IOException().initCause(new UpdaterException("failed to perform svn checkout", e));   
                    }
                    else if(e.getErrorMessage().getErrorCode() == SVNErrorCode.RA_DAV_REQUEST_FAILED){
                        listener.getLogger().println(e.getMessage());
                        throw (IOException) new IOException().initCause(new UpdaterException("failed to perform svn checkout", e)); 
                    }

this is fast fix

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[JIRA] [subversion] (JENKINS-17443) 'connection refused by the server' causes NullPointerException

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org
 
Chris Z edited a comment on Bug JENKINS-17443
in src/main/java/hudson/scm/subversion/CheckoutUpdater.java

+import org.tmatesoft.svn.core.SVNErrorCode;

 } catch (SVNException e) {
                    if(e.getErrorMessage().getErrorCode() == SVNErrorCode.CL_ERROR_PROCESSING_EXTERNALS){   
                        listener.getLogger().println(e.getMessage());
                        throw (IOException) new IOException().initCause(new UpdaterException("failed to perform svn checkout", e));   
                    }
                    else if(e.getErrorMessage().getErrorCode() == SVNErrorCode.RA_DAV_REQUEST_FAILED){
                        listener.getLogger().println(e.getMessage());
                        throw (IOException) new IOException().initCause(new UpdaterException("failed to perform svn checkout", e)); 
                    }

this is fast fix

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Loading...