ether/pad — Issue #314: Unknown Error when trying to send email via external SMTP server
Author: amki
Created: 2012-01-25 01:01:52+00:00
State: open

When trying to send email via an external SMTP server using this config:

alwaysHttps = false
ajstdlibHome = ../infrastructure/framework-src/modules
appjetHome = ./data/appjet
devMode = true
etherpad.adminPass = hodenkrebs
etherpad.fakeProduction = false
etherpad.isProduction = false
etherpad.proAccounts = true
etherpad.SQL_JDBC_DRIVER = com.mysql.jdbc.Driver
etherpad.SQL_JDBC_URL = jdbc:mysql://localhost:3306/etherpad
etherpad.SQL_PASSWORD = tre34tgs324
etherpad.SQL_USERNAME = etherpad
hidePorts = false
listen = 9000
logDir = ./data/logs
modulePath = ./src
motdPage = /ep/pad/view/ro.3PfHCD0ApLc/latest?fullScreen=1&slider=0&sidebar=0
topdomains = localhost,localbox.info,etherpad.b02.a01.ca
transportPrefix = /comet
transportUseWildcardSubdomains = true
useHttpsUrls = false
useVirtualFileRoot = ./src
theme = default
etherpad.soffice = /usr/bin/soffice
customBrandingName = Etherpad v1.1
customEmailAddress = support@etherpad.org
showLinkandLicense = true
smtpServer = 192.168.122.101
smtpPort = 25
smtpUser = *****
smtpPass = *****
smtpStartTls = true

Where 192.168.122.101 is another VM, which is perfectly reachable on port 25

etherpad@web:~/pad/etherpad/etc$ ping 192.168.122.101
PING 192.168.122.101 (192.168.122.101) 56(84) bytes of data.
64 bytes from 192.168.122.101: icmp_req=1 ttl=64 time=0.311 ms
64 bytes from 192.168.122.101: icmp_req=2 ttl=64 time=0.263 ms
^C
--- 192.168.122.101 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.263/0.287/0.311/0.024 ms
etherpad@web:~/pad/etherpad/etc$ nc 192.168.122.101 25
220 b02.a01.ca ESMTP Postfix

I get this error, when I try to email a password for a lost account using the Recover lost password function.

net.appjet.bodylock.JSRuntimeException: Error: Unknown error.
at net.appjet.bodylock.BodyLock$.unwrapExceptionIfNecessary(bodylock.scala:160)
at net.appjet.bodylock.InnerExecutable.execute(bodylock.scala:80)
at net.appjet.oui.execution$$anonfun$execute$4.apply(execution.scala:508)
at net.appjet.oui.NoninheritedDynamicVariable.withValue(dynamicvar.scala:38)
at net.appjet.oui.ExecutionContextUtils$.withContext(execution.scala:334)
at net.appjet.oui.execution$.execute(execution.scala:504)
at net.appjet.oui.execution$.execute(execution.scala:483)
at net.appjet.oui.OuiServlet.execute(execution.scala:413)
at net.appjet.oui.OuiServlet.doPost(execution.scala:364)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:502)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:390)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
at org.mortbay.jetty.handler.HandlerList.handle(HandlerList.java:49)
at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:536)
at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:928)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:747)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:405)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
Caused by: org.mozilla.javascript.JavaScriptException: Error: Unknown error. (module email.js#51)
at JS$module$email$js$21._c1(module email.js:51)
at JS$module$email$js$21.call(module email.js)
at org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:97)
at JS$module$etherpad$control$pro$account$control$js$20._c35(module etherpad/control/pro/account_control.js:465)
at JS$module$etherpad$control$pro$account$control$js$20.call(module etherpad/control/pro/account_control.js)
at org.mozilla.javascript.optimizer.OptRuntime.call0(OptRuntime.java:57)
at JS$module$dispatch$js$9._c11(module dispatch.js:142)
at JS$module$dispatch$js$9.call(module dispatch.js)
at org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:2348)
at org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.java:272)
at org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:127)
at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:76)
at JS$module$dispatch$js$9._c9(module dispatch.js:96)
at JS$module$dispatch$js$9.call(module dispatch.js)
at org.mozilla.javascript.optimizer.OptRuntime.callProp0(OptRuntime.java:119)
at JS$module$etherpad$control$pro$pro$main$control$js$73._c1(module etherpad/control/pro/pro_main_control.js:49)
at JS$module$etherpad$control$pro$pro$main$control$js$73.call(module etherpad/control/pro/pro_main_control.js)
at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:66)
at JS$module$dispatch$js$9._c11(module dispatch.js:123)
at JS$module$dispatch$js$9.call(module dispatch.js)
at org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:2348)
at org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.java:272)
at org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:127)
at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:76)
at JS$module$dispatch$js$9._c9(module dispatch.js:96)
at JS$module$dispatch$js$9.call(module dispatch.js)
at org.mozilla.javascript.optimizer.OptRuntime.callProp0(OptRuntime.java:119)
at JS$module$main$js$8._c24(module main.js:419)
at JS$module$main$js$8.call(module main.js)
at org.mozilla.javascript.optimizer.OptRuntime.callName0(OptRuntime.java:108)
at JS$module$main$js$8._c5(module main.js:123)
at JS$module$main$js$8.call(module main.js)
at org.mozilla.javascript.optimizer.OptRuntime.callProp0(OptRuntime.java:119)
at JS$module$onrequest$js$250._c0(module onrequest.js:24)
at JS$module$onrequest$js$250.call(module onrequest.js)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:401)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3004)
at JS$module$onrequest$js$250.call(module onrequest.js)
at JS$module$onrequest$js$250.exec(module onrequest.js)
at net.appjet.bodylock.InnerExecutable$$anonfun$execute$1.apply(bodylock.scala:76)
at net.appjet.bodylock.InnerExecutable$$anonfun$execute$1.apply(bodylock.scala:75)
at net.appjet.bodylock.BodyLock$.runInContext(bodylock.scala:111)
at net.appjet.bodylock.InnerExecutable.execute(bodylock.scala:75)
... 23 more