Can't Save Slack Integration

Hi all,
I follow all steps to integrate Metabase with Slack. I’m able to configure the Bot and to get an API Key. When I try to save i get a connect time out error.
Can anybody tell me if I miss something?

Thanks
Bruno

This is a detailed error: (using 0.33.6 on mysql)

11-25 14:43:50 ?[1mERROR middleware.log?[0m :: PUT /api/slack/settings 500 1.1 s
(0 DB calls)
{:message “connect timed out”,
:type java.net.SocketTimeoutException,
:stacktrace
(“java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)”
“java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)”
“java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)”
“java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)”
“java.net.AbstractPlainSocketImpl.connect(Unknown Source)”
“java.net.PlainSocketImpl.connect(Unknown Source)”
“java.net.SocksSocketImpl.connect(Unknown Source)”
“java.net.Socket.connect(Unknown Source)”
“org.apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnecti
onSocketFactory.java:339)”
“org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(Default
HttpClientConnectionOperator.java:142)”
“org.apache.http.impl.conn.BasicHttpClientConnectionManager.connect(BasicHttpC
lientConnectionManager.java:325)”
“org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.j
ava:381)”
“org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:237
)”
“org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:185)”
“org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89)”
“org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:111)”
“org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.j
ava:185)”
“org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.j
ava:83)”
“clj_http.core$request.invokeStatic(core.clj:626)”
“clj_http.core$request.invoke(core.clj:554)”
“clj_http.core$request.invokeStatic(core.clj:555)”
“clj_http.core$request.invoke(core.clj:554)”
“clojure.lang.Var.invoke(Var.java:384)”
“clj_http.client$wrap_request_timing$fn__55236.invoke(client.clj:1085)”
“clj_http.headers$wrap_header_map$fn__54383.invoke(headers.clj:147)”
“clj_http.client$wrap_query_params$fn__55126.invoke(client.clj:819)”
“clj_http.client$wrap_basic_auth$fn__55132.invoke(client.clj:842)”
“clj_http.client$wrap_oauth$fn__55137.invoke(client.clj:859)”
“clj_http.client$wrap_user_info$fn__55146.invoke(client.clj:879)”
“clj_http.client$wrap_url$fn__55218.invoke(client.clj:1037)”
“clj_http.client$wrap_decompression$fn__54935.invoke(client.clj:420)”
“clj_http.client$wrap_input_coercion$fn__55050.invoke(client.clj:639)”
“clj_http.client$wrap_additional_header_parsing$fn__55075.invoke(client.clj:69
4)”
“clj_http.client$wrap_output_coercion$fn__55037.invoke(client.clj:583)”
“clj_http.client$wrap_exceptions$fn__54887.invoke(client.clj:254)”
“clj_http.client$wrap_accept$fn__55090.invoke(client.clj:737)”
“clj_http.client$wrap_accept_encoding$fn__55097.invoke(client.clj:759)”
“clj_http.client$wrap_content_type$fn__55084.invoke(client.clj:720)”
“clj_http.client$wrap_form_params$fn__55183.invoke(client.clj:961)”
“clj_http.client$wrap_nested_params$fn__55204.invoke(client.clj:995)”
“clj_http.client$wrap_flatten_nested_params$fn__55213.invoke(client.clj:1019)”

“clj_http.client$wrap_method$fn__55151.invoke(client.clj:895)”
“clj_http.cookies$wrap_cookies$fn__53920.invoke(cookies.clj:131)”
“clj_http.links$wrap_links$fn__54715.invoke(links.clj:63)”
“clj_http.client$wrap_unknown_host$fn__55221.invoke(client.clj:1048)”
“clj_http.client$request_STAR_.invokeStatic(client.clj:1176)”
“clj_http.client$request_STAR_.invoke(client.clj:1169)”
“clj_http.client$get.invokeStatic(client.clj:1182)”
“clj_http.client$get.doInvoke(client.clj:1178)”
“clojure.lang.RestFn.invoke(RestFn.java:423)”
“–> integrations.slack$do_slack_request.invokeStatic(slack.clj:40)”
“integrations.slack$do_slack_request.doInvoke(slack.clj:38)”
“api.slack$fn__62515$fn__62518.invoke(slack.clj:22)”
“api.slack$fn__62515.invokeStatic(slack.clj:19)”
“api.slack$fn__62515.invoke(slack.clj:11)”
“middleware.auth$enforce_authentication$fn__64168.invoke(auth.clj:14)”
“routes$fn__65545$fn__65546.doInvoke(routes.clj:56)”
“middleware.exceptions$catch_uncaught_exceptions$fn__64267.invoke(exceptions.c
lj:104)”
“middleware.exceptions$catch_api_exceptions$fn__64264.invoke(exceptions.clj:92
)”
“middleware.log$log_api_call$fn__65919$fn__65920.invoke(log.clj:170)”
“middleware.log$log_api_call$fn__65919.invoke(log.clj:164)”
“middleware.security$add_security_headers$fn__64230.invoke(security.clj:122)”
“middleware.json$wrap_json_body$fn__65624.invoke(json.clj:61)”
“middleware.json$wrap_streamed_json_response$fn__65642.invoke(json.clj:97)”
“middleware.session$bind_current_user$fn__60792$fn__60793.invoke(session.clj:2
09)”
“middleware.session$do_with_current_user.invokeStatic(session.clj:184)”
“middleware.session$do_with_current_user.invoke(session.clj:177)”
“middleware.session$bind_current_user$fn__60792.invoke(session.clj:208)”
“middleware.session$wrap_current_user_id$fn__60777.invoke(session.clj:161)”
“middleware.session$wrap_session_id$fn__60762.invoke(session.clj:123)”
“middleware.auth$wrap_api_key$fn__64176.invoke(auth.clj:27)”
“middleware.misc$maybe_set_site_url$fn__65946.invoke(misc.clj:56)”
“middleware.misc$bind_user_locale$fn__65949.invoke(misc.clj:72)”
“middleware.misc$add_content_type$fn__65934.invoke(misc.clj:28)”
“middleware.misc$disable_streaming_buffering$fn__65957.invoke(misc.clj:87)”)}

Hi @Bruno
How are you running Metabase - JAR, Docker, EBS, …?
Are you able to connect to https://slack.com/ from the same machine/container?
Do you have a software firewall that might be blocking something?
Or are you using an outgoing proxy? Or perhaps using AWS ELB?

Hi @flamber,

Thanks for your reply!
I’m running JAR file on a Windows machine and I am able to connect https://slack.com/.
I am not sure on firewall or proxy: do you know the exact url to check if something is blocking me?

Thanks,
Bruno

@Bruno
Please post Diagnostic Info from Admin > Troubleshooting.

Do you work in a corporate environment, then there might be an outgoing proxy and firewalls/antivirus.
If not, then you are probably using some type of antivirus, so you can try disabling that as a test.

I don’t have Windows, but NirSoft has created a bunch of small tools to monitor network activity, so you can try one of those (example SmartSniff) to see if you can see the connection to Slack is successful:
https://www.nirsoft.net/network_tools.html

Hi @flamber,

below Diagnostic Info.
I’ll check ASAP my network configuration.
Thanks
Bruno

{
“browser-info”: {
“language”: “it-IT”,
“platform”: “Win32”,
“userAgent”: “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36”,
“vendor”: “Google Inc.”
},
“system-info”: {
“java.runtime.name”: “Java™ SE Runtime Environment”,
“java.runtime.version”: “1.8.0_74-b02”,
“java.vendor”: “Oracle Corporation”,
“java.vendor.url”: “http://java.oracle.com/”,
“java.version”: “1.8.0_74”,
“java.vm.name”: “Java HotSpot™ Client VM”,
“java.vm.version”: “25.74-b02”,
“os.name”: “Windows Server 2008 R2”,
“os.version”: “6.1”,
“user.language”: “en”,
“user.timezone”: “Europe/Berlin”
},
“metabase-info”: {
“databases”: [
“oracle”,
“sqlserver”,
“mysql”
],
“hosting-env”: “unknown”,
“application-database”: “mysql”,
“run-mode”: “prod”,
“version”: {
“tag”: “v0.33.6”,
“date”: “2019-11-19”,
“branch”: “release-0.33.x”,
“hash”: “be1e0e1”
},
“settings”: {
“report-timezone”: “Europe/Berlin”
}
}
}

@Bruno Uhhh, I think the problem is that your Java is very old, so maybe it doesn’t support the latest TLS protocols, which Slack (and most other services in the world) now uses.
Try upgrading to the latest version of Java 8 or 11.

Hi @flamber,

I double checked my java version from control panel (see attachment)…and it seems OK, inst’it?
I think that I have to investigate on firewall config.
Thanks
bruno

@Bruno Then you have multiple Java versions installed. And Metabase is being started with version 1.8.0_74

Hi @flamber

now I run JAR with a specific java.exe, and the version used by Metabase is updatad.
However this not solve my issue…

bruno

{
“browser-info”: {
“language”: “it-IT”,
“platform”: “Win32”,
“userAgent”: “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36”,
“vendor”: “Google Inc.”
},
“system-info”: {
“java.runtime.name”: “Java™ SE Runtime Environment”,
“java.runtime.version”: “1.8.0_231-b11”,
“java.vendor”: “Oracle Corporation”,
“java.vendor.url”: “http://java.oracle.com/”,
“java.version”: “1.8.0_231”,
“java.vm.name”: “Java HotSpot™ 64-Bit Server VM”,
“java.vm.version”: “25.231-b11”,
“os.name”: “Windows Server 2008 R2”,
“os.version”: “6.1”,
“user.language”: “en”,
“user.timezone”: “Europe/Berlin”
},
“metabase-info”: {
“databases”: [
“oracle”,
“sqlserver”,
“mysql”
],
“hosting-env”: “unknown”,
“application-database”: “mysql”,
“run-mode”: “prod”,
“version”: {
“tag”: “v0.33.6”,
“date”: “2019-11-19”,
“branch”: “release-0.33.x”,
“hash”: “be1e0e1”
},
“settings”: {
“report-timezone”: “Europe/Berlin”
}
}
}

@Bruno Okay, I would look into whatever antivirus/firewall that might be blocking. Otherwise try running in Docker instead, maybe it’s something on Windows.