Connection Refused error when committing on Git side

We are running subgit on Gitlab to mirror our svn repo as the 1st step to migration to git. Commits, new branches etc on svn side come over to git without problem, but when trying to commit from git, it seems there is a problem pushing changes back to the svn side.

Error from pre-receive-hook log file
[2020-11-09 15:44:37.566][pre-receive] SubGit version 3.3.9 (‘Bobique’)

[2020-11-09 15:44:37.566][pre-receive] Command name: pre-receive.

[2020-11-09 15:44:37.566][pre-receive] Current user: git.

[2020-11-09 15:44:37.566][pre-receive] SVN/SubGit repository path is resolved to ‘/var/opt/gitlab/git-data/repositories/hms/hms-jhs.git/.’

[2020-11-09 15:44:37.566][pre-receive] Git repository path is resolved to ‘/var/opt/gitlab/git-data/repositories/hms/hms-jhs.git’

[2020-11-09 15:44:37.566][pre-receive] Checking hook input, input size = 104

[2020-11-09 15:44:37.566][pre-receive] Hook input: 0000000000000000000000000000000000000000 5d5b40aa4ec205861b3fd1f1907e78180ec81d27 refs/heads/2.0_nellie

[2020-11-09 15:44:37.566][pre-receive] The input doesn’t contain forbidden references.

[2020-11-09 15:44:37.566][pre-receive] Loading repository options for path: ‘/var/opt/gitlab/git-data/repositories/hms/hms-jhs.git/.’

[2020-11-09 15:44:37.566][pre-receive] Loaded config option daemon.pidFile = ‘subgit/daemon.pid’

[2020-11-09 15:44:37.566][pre-receive] Loaded config option daemon.classpath = ‘subgit/lib’

[2020-11-09 15:44:37.566][pre-receive] Loaded config option daemon.javaOptions = ‘null’

[2020-11-09 15:44:37.566][pre-receive] Loaded config option core.logs = ‘subgit/logs’

[2020-11-09 15:44:37.566][pre-receive] Loaded config option core.errorReport = ‘null’

[2020-11-09 15:44:37.566][pre-receive] Loaded config option core.javaHome = ‘null’

[2020-11-09 15:44:37.566][pre-receive] Loaded config option daemon.javaHome = ‘null’

[2020-11-09 15:44:37.566][pre-receive] Loaded config option core.logLevel = ‘null’

[2020-11-09 15:44:37.567][pre-receive] Checking Gitlab-specific environment variables.

[2020-11-09 15:44:37.567][pre-receive] Environment variable GL_ID = ‘user-9’.

[2020-11-09 15:44:37.567][pre-receive] Environment variable GL_REPOSITORY = ‘project-23’

[2020-11-09 15:44:37.567][pre-receive] Checking whether ‘/var/opt/gitlab/git-data/repositories/hms/hms-jhs.git/.’ is ASCII

[2020-11-09 15:44:37.567][pre-receive] Checking whether ‘/var/opt/gitlab/git-data/repositories/hms/hms-jhs.git’ is ASCII

[2020-11-09 15:44:37.567][pre-receive] GIT_QUARANTINE_PATH environment variable: /var/opt/gitlab/git-data/repositories/hms/hms-jhs.git/./objects/incoming-JDTfZ8

[2020-11-09 15:44:37.567][pre-receive] No error report file found.

[2020-11-09 15:44:37.567][pre-receive] Creating packet for sending to daemon, estimated size = 466.

[2020-11-09 15:44:37.567][pre-receive] Calculating classpath for repository: ‘/var/opt/gitlab/git-data/repositories/hms/hms-jhs.git/.’.

[2020-11-09 15:44:37.567][pre-receive] Resolved classpath: ‘/var/opt/gitlab/git-data/repositories/hms/hms-jhs.git/./subgit/lib/subgit-3.3.9_4351_fat.jar’.

[2020-11-09 15:44:37.567][pre-receive] Environment variable JAVA_HOME = ‘/usr/java/jre1.8.0_211’

[2020-11-09 15:44:37.568][pre-receive] Obtaining file lock on ‘/var/opt/gitlab/git-data/repositories/hms/hms-jhs.git/./subgit/daemon.pid’.

[2020-11-09 15:44:37.568][pre-receive] Obtained file lock on ‘/var/opt/gitlab/git-data/repositories/hms/hms-jhs.git/./subgit/daemon.pid’.

[2020-11-09 15:44:37.568][pre-receive] Daemon info (1049,46559,127.0.0.1) from file ‘/var/opt/gitlab/git-data/repositories/hms/hms-jhs.git/./subgit/daemon.pid’.
[2020-11-09 15:44:37.568][pre-receive] Checking whether daemon is running.
[2020-11-09 15:44:37.568][pre-receive] Daemon process is running, pid = 1049.
[2020-11-09 15:44:37.568][pre-receive] Daemon is running.
[2020-11-09 15:44:37.568][pre-receive] Trying to connect to daemon 127.0.0.1:46559.
[2020-11-09 15:44:37.569][pre-receive] Read ‘(version (3.3.9 4351 ))’.
[2020-11-09 15:44:37.569][pre-receive] Daemon version is ‘3.3.9-4351’.
[2020-11-09 15:44:37.569][pre-receive] Trying to release lock ‘/var/opt/gitlab/git-data/repositories/hms/hms-jhs.git/./subgit/daemon.lock’.
[2020-11-09 15:44:37.569][pre-receive] Released lock ‘/var/opt/gitlab/git-data/repositories/hms/hms-jhs.git/./subgit/daemon.lock’.
[2020-11-09 15:44:37.569][pre-receive] Sent ‘(pre-receive (/var/opt/gitlab/git-data/repositories/hms/hms-jhs.git/. /var/opt/gitlab/git-data/repositories/hms/hms-jhs.git )104:0000000000000000000000000000000000000000 5d5b40aa4ec205861b3fd1f1907e78180ec81d27 refs/heads/2.0_nellie
((19:GIT_QUARANTINE_PATH /var/opt/gitlab/git-data/repositories/hms/hms-jhs.git/./objects/incoming-JDTfZ8 )))’.
[2020-11-09 15:44:37.632][pre-receive] Received ‘(message (39:Fetching revisions from SVN repository: ))’.
[2020-11-09 15:44:37.633][pre-receive] Received ‘(error (138:Failed to push some refs to Subversion repository.
svn: E210003: connection refused by the server
Connection refused (Connection refused)
2832:org.tmatesoft.translator.util.f: Failed to push some refs to Subversion repository.
at org.tmatesoft.translator.util.f.c(SourceFile:109)
at org.tmatesoft.translator.daemon.E.a(SourceFile:88)
at org.tmatesoft.translator.daemon.C.c(SourceFile:103)
at org.tmatesoft.translator.daemon.g.a(SourceFile:337)
at org.tmatesoft.translator.daemon.g.a(SourceFile:45)
at org.tmatesoft.translator.daemon.g$1.run(SourceFile:308)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.tmatesoft.translator.util.f: svn: E210003: connection refused by the server
at org.tmatesoft.translator.util.f.c(SourceFile:109)
at org.tmatesoft.translator.util.f.b(SourceFile:75)
at org.tmatesoft.translator.k.aj.a(SourceFile:1328)
at org.tmatesoft.translator.k.aj.a(SourceFile:919)
at org.tmatesoft.translator.k.d.h.a(SourceFile:237)
at org.tmatesoft.translator.k.d.h.a(SourceFile:148)
at org.tmatesoft.translator.daemon.G.a(SourceFile:493)
at org.tmatesoft.translator.daemon.G.call(SourceFile:475)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at org.tmatesoft.translator.daemon.L.a(SourceFile:436)
at org.tmatesoft.translator.daemon.E.run(SourceFile:261)
Caused by: org.tmatesoft.svn.core.SVNException: svn: E210003: connection refused by the server
at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:91)
at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:75)
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:79)
at org.tmatesoft.svn.core.internal.io.svn.SVNRepositoryImpl.openConnection(SVNRepositoryImpl.java:1282)
at org.tmatesoft.svn.core.internal.io.svn.SVNRepositoryImpl.info(SVNRepositoryImpl.java:1225)
at org.tmatesoft.translator.k.aj.a(SourceFile:1316)
… 8 more
Caused by: java.net.ConnectException: Connection refused (Connection refused)
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at org.tmatesoft.svn.core.internal.util.SVNSocketFactory.connect(SVNSocketFactory.java:165)
at org.tmatesoft.svn.core.internal.util.SVNSocketFactory.createPlainSocket(SVNSocketFactory.java:76)
at org.tmatesoft.svn.core.internal.io.svn.SVNPlainConnector.open(SVNPlainConnector.java:53)
… 12 more
))’.
[2020-11-09 15:44:37.633][pre-receive] No error report file found.
[2020-11-09 15:44:37.633][pre-receive] Failed to push some refs to Subversion repository.
svn: E210003: connection refused by the server
Connection refused (Connection refused)

What could be the reason and how to fix?

Hi Gavin,

judging from the log you sent, SubGit is able to get data from SVN, but fails to write data to SVN, so I’m wondering is the SVN user that is set in SubGit configuration has permissions to write to the SVN repository? If yes, is the user allowed to write all the paths and if all operations are allowed for that user?

This problem has been resolved. Was a problem with the SVN service