Settings/email SocketTimeoutException: Read timed out

你正在运行的Metabase 0.33.4是最新版本的。

11-11 10:34:57 e[1mINFO metabase.coree[0m :: System info:
{“java.runtime.name” “OpenJDK Runtime Environment”,
“java.runtime.version” “1.8.0_232-b09”,
“java.vendor” “Oracle Corporation”,
“java.vendor.url” “http://java.oracle.com/”,
“java.version” “1.8.0_232”,
“java.vm.name” “OpenJDK 64-Bit Server VM”,
“java.vm.version” “25.232-b09”,
“os.name” “Linux”,
“os.version” “3.10.0-862.11.6.el7.x86_64”,
“user.language” “en”,
“user.timezone” “Asia/Shanghai”}

11-11 10:43:53 e[1mERROR metabase.emaile[0m :: 测试SMTP连接错误

javax.mail.MessagingException: Could not connect to SMTP host: smtp3.xx.com, port: 25;

nested exception is:

java.net.SocketTimeoutException: Read timed out

at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:2102)

at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:699)

at javax.mail.Service.connect(Service.java:366)

at metabase.email$run_smtp_test$fn__18701.invoke(email.clj:141)

at metabase.email$run_smtp_test.invokeStatic(email.clj:140)

at metabase.email$run_smtp_test.invoke(email.clj:124)

at metabase.email$guess_smtp_security.invokeStatic(email.clj:158)

at metabase.email$guess_smtp_security.invoke(email.clj:151)

at metabase.email$test_smtp_connection.invokeStatic(email.clj:179)

at metabase.email$test_smtp_connection.invoke(email.clj:165)

at metabase.api.email$fn__62098.invokeStatic(email.clj:82)

at metabase.api.email$fn__62098.invoke(email.clj:70)

at compojure.core$wrap_response$fn__22518.invoke(core.clj:160)

at compojure.core$wrap_route_middleware$fn__22502.invoke(core.clj:132)

at compojure.core$wrap_route_info$fn__22507.invoke(core.clj:139)

at compojure.core$wrap_route_matches$fn__22511.invoke(core.clj:151)

at compojure.core$routes$fn__22530$f__22531.invoke(core.clj:198)

at compojure.core$routes$fn__22530$f__22531$respond_SINGLEQUOTE___22532.invoke(core.clj:197)

at compojure.core$wrap_route_matches$fn__22511.invoke(core.clj:153)

at compojure.core$routes$fn__22530$f__22531.invoke(core.clj:198)

at compojure.core$routes$fn__22530.invoke(core.clj:200)

at metabase.middleware.auth$enforce_authentication$fn__47314.invoke(auth.clj:14)

at compojure.core$routes$fn__22530$f__22531.invoke(core.clj:198)

at compojure.core$routes$fn__22530.invoke(core.clj:200)

at compojure.core$make_context$handler__22558.invoke(core.clj:287)

at compojure.core$make_context$fn__22560.invoke(core.clj:296)

at compojure.core$routes$fn__22530$f__22531.invoke(core.clj:198)

at compojure.core$routes$fn__22530$f__22531$respond_SINGLEQUOTE___22532.invoke(core.clj:197)

at compojure.core$make_context$fn__22560.invoke(core.clj:297)

at compojure.core$routes$fn__22530$f__22531.invoke(core.clj:198)

at compojure.core$routes$fn__22530$f__22531$respond_SINGLEQUOTE___22532.invoke(core.clj:197)

at compojure.core$make_context$fn__22560.invoke(core.clj:297)

at compojure.core$routes$fn__22530$f__22531.invoke(core.clj:198)

at compojure.core$routes$fn__22530$f__22531$respond_SINGLEQUOTE___22532.invoke(core.clj:197)

at compojure.core$make_context$fn__22560.invoke(core.clj:297)

at compojure.core$routes$fn__22530$f__22531.invoke(core.clj:198)

at compojure.core$routes$fn__22530$f__22531$respond_SINGLEQUOTE___22532.invoke(core.clj:197)

at compojure.core$make_context$fn__22560.invoke(core.clj:297)

at compojure.core$routes$fn__22530$f__22531.invoke(core.clj:198)

at compojure.core$routes$fn__22530$f__22531$respond_SINGLEQUOTE___22532.invoke(core.clj:197)

at compojure.core$make_context$fn__22560.invoke(core.clj:297)

at compojure.core$routes$fn__22530$f__22531.invoke(core.clj:198)

at compojure.core$routes$fn__22530$f__22531$respond_SINGLEQUOTE___22532.invoke(core.clj:197)

at compojure.core$make_context$fn__22560.invoke(core.clj:297)

at compojure.core$routes$fn__22530$f__22531.invoke(core.clj:198)

at compojure.core$routes$fn__22530$f__22531$respond_SINGLEQUOTE___22532.invoke(core.clj:197)

at compojure.core$make_context$fn__22560.invoke(core.clj:297)

at compojure.core$routes$fn__22530$f__22531.invoke(core.clj:198)

at compojure.core$routes$fn__22530$f__22531$respond_SINGLEQUOTE___22532.invoke(core.clj:197)

at compojure.core$make_context$fn__22560.invoke(core.clj:297)

at compojure.core$routes$fn__22530$f__22531.invoke(core.clj:198)

at compojure.core$routes$fn__22530.invoke(core.clj:200)

at clojure.lang.AFn.applyToHelper(AFn.java:160)

at clojure.lang.AFn.applyTo(AFn.java:144)

at clojure.core$apply.invokeStatic(core.clj:665)

at clojure.core$apply.invoke(core.clj:660)

at metabase.routes$fn__66170$fn__66171.doInvoke(routes.clj:56)

at clojure.lang.RestFn.invoke(RestFn.java:436)

at compojure.core$routes$fn__22530$f__22531.invoke(core.clj:198)

at compojure.core$routes$fn__22530.invoke(core.clj:200)

at compojure.core$make_context$handler__22558.invoke(core.clj:287)

at compojure.core$make_context$fn__22560.invoke(core.clj:296)

at compojure.core$routes$fn__22530$f__22531.invoke(core.clj:198)

at compojure.core$routes$fn__22530$f__22531$respond_SINGLEQUOTE___22532.invoke(core.clj:197)

at compojure.core$wrap_route_matches$fn__22511.invoke(core.clj:153)

at compojure.core$routes$fn__22530$f__22531.invoke(core.clj:198)

at compojure.core$routes$fn__22530$f__22531$respond_SINGLEQUOTE___22532.invoke(core.clj:197)

at compojure.core$wrap_route_matches$fn__22511.invoke(core.clj:153)

at compojure.core$routes$fn__22530$f__22531.invoke(core.clj:198)

at compojure.core$routes$fn__22530$f__22531$respond_SINGLEQUOTE___22532.invoke(core.clj:197)

at compojure.core$wrap_route_matches$fn__22511.invoke(core.clj:153)

at compojure.core$routes$fn__22530$f__22531.invoke(core.clj:198)

at compojure.core$routes$fn__22530.invoke(core.clj:200)

at metabase.middleware.exceptions$catch_uncaught_exceptions$fn__47270.invoke(exceptions.clj:104)

at metabase.middleware.exceptions$catch_api_exceptions$fn__47267.invoke(exceptions.clj:92)

at metabase.middleware.log$log_api_call$fn__47180$fn__47181.invoke(log.clj:170)

at toucan.db$_do_with_call_counting.invokeStatic(db.clj:213)

at toucan.db$_do_with_call_counting.invoke(db.clj:206)

at metabase.middleware.log$log_api_call$fn__47180.invoke(log.clj:164)

at metabase.middleware.security$add_security_headers$fn__47231.invoke(security.clj:122)

at metabase.middleware.json$wrap_json_body$fn__47397.invoke(json.clj:61)

at metabase.middleware.json$wrap_streamed_json_response$fn__47415.invoke(json.clj:97)

at ring.middleware.keyword_params$wrap_keyword_params$fn__67815.invoke(keyword_params.clj:55)

at ring.middleware.params$wrap_params$fn__67863.invoke(params.clj:69)

at metabase.middleware.session$bind_current_user$fn__47529$fn__47530.invoke(session.clj:193)

at metabase.middleware.session$do_with_current_user.invokeStatic(session.clj:176)

at metabase.middleware.session$do_with_current_user.invoke(session.clj:170)

at metabase.middleware.session$bind_current_user$fn__47529.invoke(session.clj:192)

at metabase.middleware.session$wrap_current_user_id$fn__47518.invoke(session.clj:161)

at metabase.middleware.session$wrap_session_id$fn__47503.invoke(session.clj:123)

at metabase.middleware.auth$wrap_api_key$fn__47322.invoke(auth.clj:27)

at metabase.middleware.misc$maybe_set_site_url$fn__47295.invoke(misc.clj:56)

at metabase.middleware.misc$bind_user_locale$fn__47298.invoke(misc.clj:72)

at ring.middleware.cookies$wrap_cookies$fn__67735.invoke(cookies.clj:177)

at metabase.middleware.misc$add_content_type$fn__47283.invoke(misc.clj:28)

at metabase.middleware.misc$disable_streaming_buffering$fn__47306.invoke(misc.clj:87)

at ring.middleware.gzip$wrap_gzip$fn__67777.invoke(gzip.clj:86)

at ring.adapter.jetty$async_proxy_handler$fn__46964.invoke(jetty.clj:35)

at ring.adapter.jetty.proxy$org.eclipse.jetty.server.handler.AbstractHandler$ff19274a.handle(Unknown Source)

at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)

at org.eclipse.jetty.server.Server.handle(Server.java:502)

at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:370)

at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:267)

at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:305)

at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)

at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117)

at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333)

at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310)

at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168)

at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126)

at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366)

at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:765)

at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:683)

at java.lang.Thread.run(Thread.java:748)

Caused by: java.net.SocketTimeoutException: Read timed out

at java.net.SocketInputStream.socketRead0(Native Method)

at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)

at java.net.SocketInputStream.read(SocketInputStream.java:171)

at java.net.SocketInputStream.read(SocketInputStream.java:141)

at sun.security.ssl.InputRecord.readFully(InputRecord.java:465)

at sun.security.ssl.InputRecord.read(InputRecord.java:503)

at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:975)

at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1367)

at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1395)

at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1379)

at com.sun.mail.util.SocketFetcher.configureSSLSocket(SocketFetcher.java:598)

at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:372)

at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:238)

at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:2066)

… 113 more

11-11 10:43:54 e[1mWARN api.emaile[0m :: Problem connecting to mail server: Exception reading response

11-11 10:43:54 e[1mERROR middleware.loge[0m :: e[31mPUT /api/email 500 18.5 s (0 DB calls)

{:message “Sorry, something went wrong. Please try again.”}

e[0m

Hi @gaojinfang
Are you trying to telnet from the same server as Metabase is running on?
Do you have a software firewall/antivirus that might be doing something?
Does your provider support TLS? Then try that instead.

1 Like

It is the same machine, it has been tested by telnet, it is through. TLS is not supported. You can send mail by setting xwiki on the same machine.

@gaojinfang I’m not sure I understand your reply. Did you get it to work?
What do you mean by “You can send mail by setting xwiki on the same machine” ? What is xwiki?