I have an issue connecting to slack from elasticsearch action notifications.
to access https from the node, I need to use a proxy i.e.
if I do a
[]# curl -v https://hooks.slack.com -x http://proxy.domain.com:5050
* About to connect() to proxy proxy.domain.com port 5050 (#0)
* Trying (IP)
* Connected to proxy.domain.com (ip) port 5050 (#0)
* Establish HHTP proxy tunnel to hooks.slack.co:443
> CONNECT hooks.slack.com:443
It says HTTP/1.1 200 Connection Established
In my Action I specify the proxy:
"actions":{
"slack_1": {
"slack":{
"proxy":{
"host": "http://proxy.domain.com"
"port": 5050
}
}
}
}
}
But I get the following error:
[2020-07-24T18:33:17,736][ERROR][o.e.x.w.n.s.SlackService ] [elastic] failed to execute slack api http request
java.net.UnknownHostException: http://proxy.domain.com: Name or service not known
at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) ~[?:?]
at java.net.InetAddress$PlatformNameService.lookupAllHostAddr(InetAddress.java:930) ~[?:?]
at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1499) ~[?:?]
at java.net.InetAddress$NameServiceAddresses.get(InetAddress.java:849) ~[?:?]
at java.net.InetAddress.getAllByName0(InetAddress.java:1489) ~[?:?]
at java.net.InetAddress.getAllByName(InetAddress.java:1348) ~[?:?]
at java.net.InetAddress.getAllByName(InetAddress.java:1282) ~[?:?]
at org.apache.http.impl.conn.SystemDefaultDnsResolver.resolve(SystemDefaultDnsResolver.java:45) ~[httpclient-4.5.10.jar:4.5.10]
at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:112) ~[httpclient-4.5.10.jar:4.5.10]
at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:374) ~[httpclient-4.5.10.jar:4.5.10]
at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:401) ~[httpclient-4.5.10.jar:4.5.10]
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236) ~[httpclient-4.5.10.jar:4.5.10]
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:186) ~[httpclient-4.5.10.jar:4.5.10]
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89) ~[httpclient-4.5.10.jar:4.5.10]
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110) ~[httpclient-4.5.10.jar:4.5.10]
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185) ~[httpclient-4.5.10.jar:4.5.10]
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:72) ~[httpclient-4.5.10.jar:4.5.10]
Looks to me that is not even trying the port. my web hook I'm specifying it in the key store.
Any ideas what is wrong?