AntonShuvaev / elasticsearch4idea

Elasticsearch Plugin for JetBrains IDEs
https://plugins.jetbrains.com/plugin/14512-elasticsearch
59 stars 8 forks source link

Fatal Error on invalid HTTP host #10

Closed Clanver closed 4 years ago

Clanver commented 4 years ago

Hi again, thx for your last fix! It worked well =).

Today, the server my elastic search service is running on was down and i got some Fatal Errors in PHPstorm, 2020-2 from your plugin. Maybe you can catch the error before the fatal error? Thx in advance!

Heres the stackstrace

java.lang.IllegalArgumentException: Invalid HTTP host: {webserver ip placeholder}:9200/ at org.apache.http.HttpHost.create(HttpHost.java:122) at org.elasticsearch4idea.model.ClusterConfiguration.getHttpHost(ClusterConfiguration.kt:32) at org.elasticsearch4idea.rest.ElasticsearchClient.(ElasticsearchClient.kt:46) at org.elasticsearch4idea.service.ElasticsearchManager.getClient(ElasticsearchManager.kt:360) at org.elasticsearch4idea.service.ElasticsearchManager.getClient(ElasticsearchManager.kt:354) at org.elasticsearch4idea.service.ElasticsearchManager.prepareFetchCluster(ElasticsearchManager.kt:86) at org.elasticsearch4idea.service.ElasticsearchManager.prepareFetchCluster(ElasticsearchManager.kt:65) at org.elasticsearch4idea.ui.explorer.ElasticsearchExplorer$treeNodeAction$1.invoke(ElasticsearchExplorer.kt:305) at org.elasticsearch4idea.ui.explorer.ElasticsearchExplorer$treeNodeAction$1.invoke(ElasticsearchExplorer.kt:67) at org.elasticsearch4idea.utils.TaskUtils$runBackgroundTask$1.run(TaskUtils.kt:32) at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:935) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressAsync$5(CoreProgressManager.java:442) at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$3(ProgressRunner.java:235) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:170) at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:629) at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:581) at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60) at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:157)

AntonShuvaev commented 4 years ago

Hi,

Thanks for reporting the issue. The fix is released with 0.2.3.