The connection is cached in the connection pool, not until JVM restart but still in the lifetime of the connection pool, which can be pretty long.
‘myRevStub’ comes from “SVN-Rev-Stub” header (DAVConnection.java:813) and is saved for the connection/connection pool lifetime. This happens on any HTTP request during “exchangeCapabilities()” phase, so during the first request all the data is cached.
Now I wonder what could the Apache server return in response to that first request. Clearly it wasn’t the case that Apache wasn’t listening the port, otherwise “Connection refused” would happen.
Do you have an ability to reproduce/debug the problem?
First connect attempts exchangeCapabilities. Fails.
Second connect skips excangeCapabilities and goes directly to doPropfind (despite having many null fields)
2021-08-31T21:37:36,225 [main] WARN se.repos.indexing.standalone.IndexingDaemon - Repository connection failed: Connection refused (Connection refused)
se.simonsoft.cms.item.info.CmsConnectionException: Connection refused (Connection refused)
at se.simonsoft.cms.backend.svnkit.errors.SvnkitErrorAnalyzerApacheSvn17.analyze(SvnkitErrorAnalyzerApacheSvn17.java:138) ~[repos-indexing-standalone-jar-with-dependencies-2.0.3-SNAPSHOT.jar:2.0.3-SNAPSHOT]
at se.simonsoft.cms.backend.svnkit.errors.SvnkitErrorAnalyzerApacheSvn17.analyze(SvnkitErrorAnalyzerApacheSvn17.java:60) ~[repos-indexing-standalone-jar-with-dependencies-2.0.3-SNAPSHOT.jar:2.0.3-SNAPSHOT]
at se.simonsoft.cms.backend.svnkit.info.change.CmsContentsReaderSvnkit.getRevisionProperties(CmsContentsReaderSvnkit.java:127) ~[repos-indexing-standalone-jar-with-dependencies-2.0.3-SNAPSHOT.jar:2.0.3-SNAPSHOT]
at se.repos.indexing.standalone.IndexingDaemon.getRepoConfig(IndexingDaemon.java:258) [repos-indexing-standalone-jar-with-dependencies-2.0.3-SNAPSHOT.jar:2.0.3-SNAPSHOT]
at se.repos.indexing.standalone.IndexingDaemon.indexingEnabled(IndexingDaemon.java:230) [repos-indexing-standalone-jar-with-dependencies-2.0.3-SNAPSHOT.jar:2.0.3-SNAPSHOT]
at se.repos.indexing.standalone.IndexingDaemonPubSub.run(IndexingDaemonPubSub.java:136) [repos-indexing-standalone-jar-with-dependencies-2.0.3-SNAPSHOT.jar:2.0.3-SNAPSHOT]
at se.repos.indexing.standalone.CommandLine.runDaemonPubSub(CommandLine.java:186) [repos-indexing-standalone-jar-with-dependencies-2.0.3-SNAPSHOT.jar:2.0.3-SNAPSHOT]
at se.repos.indexing.standalone.CommandLine.main(CommandLine.java:99) [repos-indexing-standalone-jar-with-dependencies-2.0.3-SNAPSHOT.jar:2.0.3-SNAPSHOT]
Caused by: java.net.ConnectException: Connection refused (Connection refused)
at java.net.PlainSocketImpl.socketConnect(Native Method) ~[?:?]
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:399) ~[?:?]
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:242) ~[?:?]
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:224) ~[?:?]
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[?:?]
at java.net.Socket.connect(Socket.java:609) ~[?:?]
at org.tmatesoft.svn.core.internal.util.SVNSocketFactory.connect(SVNSocketFactory.java:195) ~[repos-indexing-standalone-jar-with-dependencies-2.0.3-SNAPSHOT.jar:2.0.3-SNAPSHOT]
at org.tmatesoft.svn.core.internal.util.SVNSocketFactory.createPlainSocket(SVNSocketFactory.java:90) ~[repos-indexing-standalone-jar-with-dependencies-2.0.3-SNAPSHOT.jar:2.0.3-SNAPSHOT]
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.connect(HTTPConnection.java:238) ~[repos-indexing-standalone-jar-with-dependencies-2.0.3-SNAPSHOT.jar:2.0.3-SNAPSHOT]
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:415) ~[repos-indexing-standalone-jar-with-dependencies-2.0.3-SNAPSHOT.jar:2.0.3-SNAPSHOT]
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:352) ~[repos-indexing-standalone-jar-with-dependencies-2.0.3-SNAPSHOT.jar:2.0.3-SNAPSHOT]
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:340) ~[repos-indexing-standalone-jar-with-dependencies-2.0.3-SNAPSHOT.jar:2.0.3-SNAPSHOT]
at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.performHttpRequest(DAVConnection.java:914) ~[repos-indexing-standalone-jar-with-dependencies-2.0.3-SNAPSHOT.jar:2.0.3-SNAPSHOT]
at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.exchangeCapabilities(DAVConnection.java:706) ~[repos-indexing-standalone-jar-with-dependencies-2.0.3-SNAPSHOT.jar:2.0.3-SNAPSHOT]
at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.open(DAVConnection.java:114) ~[repos-indexing-standalone-jar-with-dependencies-2.0.3-SNAPSHOT.jar:2.0.3-SNAPSHOT]
at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.openConnection(DAVRepository.java:1047) ~[repos-indexing-standalone-jar-with-dependencies-2.0.3-SNAPSHOT.jar:2.0.3-SNAPSHOT]
at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.getRevisionProperties(DAVRepository.java:241) ~[repos-indexing-standalone-jar-with-dependencies-2.0.3-SNAPSHOT.jar:2.0.3-SNAPSHOT]
at se.simonsoft.cms.backend.svnkit.info.change.CmsContentsReaderSvnkit.getRevisionProperties(CmsContentsReaderSvnkit.java:125) ~[repos-indexing-standalone-jar-with-dependencies-2.0.3-SNAPSHOT.jar:2.0.3-SNAPSHOT]
... 5 more
2021-08-31T21:37:38,236 [main] WARN se.repos.indexing.standalone.IndexingDaemon - Repository connection failed (backoff 6000ms) to http://demo.simonsoftcms.se/svn/demo: Connection refused (Connection refused)
2021-08-31T21:37:38,236 [main] WARN se.repos.indexing.standalone.IndexingDaemon - Repository connection failed: Connection refused (Connection refused)
se.simonsoft.cms.item.info.CmsConnectionException: Connection refused (Connection refused)
at se.simonsoft.cms.backend.svnkit.errors.SvnkitErrorAnalyzerApacheSvn17.analyze(SvnkitErrorAnalyzerApacheSvn17.java:138) ~[repos-indexing-standalone-jar-with-dependencies-2.0.3-SNAPSHOT.jar:2.0.3-SNAPSHOT]
at se.simonsoft.cms.backend.svnkit.errors.SvnkitErrorAnalyzerApacheSvn17.analyze(SvnkitErrorAnalyzerApacheSvn17.java:60) ~[repos-indexing-standalone-jar-with-dependencies-2.0.3-SNAPSHOT.jar:2.0.3-SNAPSHOT]
at se.simonsoft.cms.backend.svnkit.info.change.CmsContentsReaderSvnkit.getRevisionProperties(CmsContentsReaderSvnkit.java:127) ~[repos-indexing-standalone-jar-with-dependencies-2.0.3-SNAPSHOT.jar:2.0.3-SNAPSHOT]
at se.repos.indexing.standalone.IndexingDaemon.getRepoConfig(IndexingDaemon.java:258) [repos-indexing-standalone-jar-with-dependencies-2.0.3-SNAPSHOT.jar:2.0.3-SNAPSHOT]
at se.repos.indexing.standalone.IndexingDaemon.indexingEnabled(IndexingDaemon.java:230) [repos-indexing-standalone-jar-with-dependencies-2.0.3-SNAPSHOT.jar:2.0.3-SNAPSHOT]
at se.repos.indexing.standalone.IndexingDaemonPubSub.run(IndexingDaemonPubSub.java:136) [repos-indexing-standalone-jar-with-dependencies-2.0.3-SNAPSHOT.jar:2.0.3-SNAPSHOT]
at se.repos.indexing.standalone.CommandLine.runDaemonPubSub(CommandLine.java:186) [repos-indexing-standalone-jar-with-dependencies-2.0.3-SNAPSHOT.jar:2.0.3-SNAPSHOT]
at se.repos.indexing.standalone.CommandLine.main(CommandLine.java:99) [repos-indexing-standalone-jar-with-dependencies-2.0.3-SNAPSHOT.jar:2.0.3-SNAPSHOT]
Caused by: java.net.ConnectException: Connection refused (Connection refused)
at java.net.PlainSocketImpl.socketConnect(Native Method) ~[?:?]
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:399) ~[?:?]
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:242) ~[?:?]
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:224) ~[?:?]
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[?:?]
at java.net.Socket.connect(Socket.java:609) ~[?:?]
at org.tmatesoft.svn.core.internal.util.SVNSocketFactory.connect(SVNSocketFactory.java:195) ~[repos-indexing-standalone-jar-with-dependencies-2.0.3-SNAPSHOT.jar:2.0.3-SNAPSHOT]
at org.tmatesoft.svn.core.internal.util.SVNSocketFactory.createPlainSocket(SVNSocketFactory.java:90) ~[repos-indexing-standalone-jar-with-dependencies-2.0.3-SNAPSHOT.jar:2.0.3-SNAPSHOT]
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.connect(HTTPConnection.java:238) ~[repos-indexing-standalone-jar-with-dependencies-2.0.3-SNAPSHOT.jar:2.0.3-SNAPSHOT]
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:415) ~[repos-indexing-standalone-jar-with-dependencies-2.0.3-SNAPSHOT.jar:2.0.3-SNAPSHOT]
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:352) ~[repos-indexing-standalone-jar-with-dependencies-2.0.3-SNAPSHOT.jar:2.0.3-SNAPSHOT]
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:340) ~[repos-indexing-standalone-jar-with-dependencies-2.0.3-SNAPSHOT.jar:2.0.3-SNAPSHOT]
at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.performHttpRequest(DAVConnection.java:914) ~[repos-indexing-standalone-jar-with-dependencies-2.0.3-SNAPSHOT.jar:2.0.3-SNAPSHOT]
at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.doPropfind(DAVConnection.java:147) ~[repos-indexing-standalone-jar-with-dependencies-2.0.3-SNAPSHOT.jar:2.0.3-SNAPSHOT]
at org.tmatesoft.svn.core.internal.io.dav.DAVUtil.getProperties(DAVUtil.java:71) ~[repos-indexing-standalone-jar-with-dependencies-2.0.3-SNAPSHOT.jar:2.0.3-SNAPSHOT]
at org.tmatesoft.svn.core.internal.io.dav.DAVUtil.getResourceProperties(DAVUtil.java:77) ~[repos-indexing-standalone-jar-with-dependencies-2.0.3-SNAPSHOT.jar:2.0.3-SNAPSHOT]
at org.tmatesoft.svn.core.internal.io.dav.DAVUtil.getBaselineProperties(DAVUtil.java:248) ~[repos-indexing-standalone-jar-with-dependencies-2.0.3-SNAPSHOT.jar:2.0.3-SNAPSHOT]
at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.getRevisionProperties(DAVRepository.java:245) ~[repos-indexing-standalone-jar-with-dependencies-2.0.3-SNAPSHOT.jar:2.0.3-SNAPSHOT]
at se.simonsoft.cms.backend.svnkit.info.change.CmsContentsReaderSvnkit.getRevisionProperties(CmsContentsReaderSvnkit.java:125) ~[repos-indexing-standalone-jar-with-dependencies-2.0.3-SNAPSHOT.jar:2.0.3-SNAPSHOT]
... 5 more
Could it be that openConnection should not set ‘myConnection’ until reaching the end of what it is supposed to achieve? When exiting via exception it leaves an ‘myConnection’ variable with a partially initialized instance.
I am trying to get an SVNKit build into a Maven repo in order to successfully build the whole artifact required to perform a real-world test.
It seems difficult to build SVNKit when the Tmatesoft Maven repo is inaccessible. Running the gradlew command above fails to retrieve javahl stuff from the Tmatesoft Maven repo.