Installation Failed GCS Repo, Exception in thread "main" java.net.ConnectException: Connection timed out

Hello,
I am getting below error while installing Elasticsearch GCS plugin

I am running the following command
sudo ES_JAVA_OPTS="-Dhttp.proxyHost=**** -Dhttp.proxyPort=9200 Dhttps.proxyHost=**** -Dhttps.proxyPort=9200" /usr/share/elasticsearch/bin/elasticsearch-plugin install https://artifacts.elastic.co/downloads/elasticsearch-plugins/repository-gcs/repository-gcs-7.17.5.zip

-> Installing https://artifacts.elastic.co/downloads/elasticsearch-plugins/repository-gcs/repository-gcs-7.17.5.zip
-> Downloading https://artifacts.elastic.co/downloads/elasticsearch-plugins/repository-gcs/repository-gcs-7.17.5.zip
-> Failed installing https://artifacts.elastic.co/downloads/elasticsearch-plugins/repository-gcs/repository-gcs-7.17.5.zip
-> Rolling back https://artifacts.elastic.co/downloads/elasticsearch-plugins/repository-gcs/repository-gcs-7.17.5.zip
-> Rolled back https://artifacts.elastic.co/downloads/elasticsearch-plugins/repository-gcs/repository-gcs-7.17.5.zip
Exception in thread "main" java.net.ConnectException: Connection timed out
at java.base/sun.nio.ch.Net.connect0(Native Method)
at java.base/sun.nio.ch.Net.connect(Net.java:579)
at java.base/sun.nio.ch.Net.connect(Net.java:568)
at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:585)
at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327)
at java.base/java.net.Socket.connect(Socket.java:633)
at java.base/sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:299)
at java.base/sun.security.ssl.BaseSSLSocketImpl.connect(BaseSSLSocketImpl.java:174)
at java.base/sun.net.NetworkClient.doConnect(NetworkClient.java:183)
at java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:498)
at java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:603)
at java.base/sun.net.www.protocol.https.HttpsClient.(HttpsClient.java:264)
at java.base/sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:378)
at java.base/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:189)
at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1242)
at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1128)
at java.base/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:175)
at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1665)
at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1589)
at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:224)
at org.elasticsearch.plugins.cli.InstallPluginAction.downloadZip(InstallPluginAction.java:478)
at org.elasticsearch.plugins.cli.InstallPluginAction.download(InstallPluginAction.java:342)
at org.elasticsearch.plugins.cli.InstallPluginAction.execute(InstallPluginAction.java:242)
at org.elasticsearch.plugins.cli.InstallPluginCommand.execute(InstallPluginCommand.java:88)
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:77)
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:112)
at org.elasticsearch.cli.MultiCommand.execute(MultiCommand.java:95)
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:112)
at org.elasticsearch.cli.Command.main(Command.java:77)
at org.elasticsearch.plugins.cli.PluginCli.main(PluginCli.java:36)

Please can someone help

1 Like

Welcome to our community! :smiley:
Please format your code/logs/config using the </> button, or markdown style back ticks. It helps to make things easy to read which helps us help you.

Have you tried this a few times to see if it always times out?

Hi there,

I also ran into this issue installing on Elasticsearch 8.3.0.

My question is that if I paste the "discovery-ec2-linux-x86_64-8.3.0.zip" into my browser it doesn't work. But "discovery-ec2--8.3.0.zip" does.

I understand there was some substitution of this platform URL but if this is out of my control, how can I fix it?

sudo ES_JAVA_OPTS="-Dhttps.proxyHost=<proxy-host> -Dhttps.proxyPort=<proxy-port>" /usr/share/elasticsearch/bin/elasticsearch-plugin install --verbose discovery-ec2
-> Installing discovery-ec2
Checking if url exists: https://artifacts.elastic.co/downloads/elasticsearch-plugins/discovery-ec2/discovery-ec2-linux-x86_64-8.3.0.zip
-> Failed installing discovery-ec2
-> Rolling back discovery-ec2
-> Rolled back discovery-ec2
Exception in thread "main" java.net.ConnectException: Connection timed out
	at java.base/sun.nio.ch.Net.connect0(Native Method)
	at java.base/sun.nio.ch.Net.connect(Net.java:579)
	at java.base/sun.nio.ch.Net.connect(Net.java:568)
	at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:585)
	at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327)
	at java.base/java.net.Socket.connect(Socket.java:633)
	at java.base/sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:299)
	at java.base/sun.security.ssl.BaseSSLSocketImpl.connect(BaseSSLSocketImpl.java:174)
	at java.base/sun.net.NetworkClient.doConnect(NetworkClient.java:183)
	at java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:498)
	at java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:603)
	at java.base/sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:264)
	at java.base/sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:378)
	at java.base/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:189)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1242)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1128)
	at java.base/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:175)
	at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:142)
	at org.elasticsearch.plugins.cli.InstallPluginAction.urlExists(InstallPluginAction.java:428)
	at org.elasticsearch.plugins.cli.InstallPluginAction.getElasticUrl(InstallPluginAction.java:382)
	at org.elasticsearch.plugins.cli.InstallPluginAction.download(InstallPluginAction.java:298)
	at org.elasticsearch.plugins.cli.InstallPluginAction.execute(InstallPluginAction.java:242)
	at org.elasticsearch.plugins.cli.InstallPluginCommand.execute(InstallPluginCommand.java:89)
	at org.elasticsearch.common.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:54)
	at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:85)
	at org.elasticsearch.cli.MultiCommand.execute(MultiCommand.java:94)
	at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:85)
	at org.elasticsearch.cli.Command.main(Command.java:50)
	at org.elasticsearch.launcher.CliToolLauncher.main(CliToolLauncher.java:64)

I do not think for us this is a proxy issue but rather this architecture additional package simply does not exist.

Thanks in advance.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.