Importing a repository from an external source fails due to java.net.ConnectException
プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Fisheye および Crucible は除く
問題
When importing a repository into Bitbucket Server from existing Git projects hosted with Bitbucket Cloud, GitHub, GitHub Enterprise, or a standalone Git repository using the web interface, the import does not start and the following is displayed in the Bitbucket Server user interface:
Unable to reach server.
The following appears in the atlassian-bitbucket.log:
[httpclient-callbacks:thread-1] <username> XYS1Q7x561x9182x0 <id> <ip address> "POST /rest/importer/latest/external-source/missing-oauth-scopes HTTP/1.1" c.a.b.i.i.DefaultExternalRequestExecutor External request failed
java.lang.RuntimeException: java.net.ConnectException
at com.google.common.base.Throwables.propagate(Throwables.java:160) ~[guava-18.0.jar:na]
...
java.net.ConnectException: null
at org.apache.http.nio.pool.RouteSpecificPool.timeout(RouteSpecificPool.java:170) ~[na:na]
原因
An outbound proxy is configured for connecting to the externally hosted repository web site.
ソリューション
Follow the steps on the configure an outbound HTTP and HTTPS proxy for Bitbucket Server page and restart Bitbucket Server.