0

Yes, I know the subject has been covered many time but I'm facing a strange behaviour of WSO2EMM.

I'm currently installing WSO2EMM on a Linux CentOS 6.5 and it seems to work correctly.

I configured the EMAIL section in emm/config/config.json, replacing smtp.google.com by smtp.gmail.com, as shown below:

"EMAIL": {

"SMTPHOST": "smtp.gmail.com",

"SMTPPORT": "25",

"USERNAME": "renelco.mobility@gmail.com",

"PASSWORD": mypassword,

"SENDERADDRESS": "hellcat@localhost",

"TEMPLATE": "You have been registered to the WSO2 EMM. Below is the link to enroll."

}

While smtp.gmail.com is working correctly when I test it using telnet, wso2emm is completely unable to send an invite and returns me the following error :

[2014-10-06 18:01:44,689] INFO {JAGGERY.modules.common:js} - New connection was taken [2014-10-06 18:02:01,046] INFO {JAGGERY.modules.user:js} - Email sent to -> pascal.curdy@renelco.com [2014-10-06 18:02:01,094] ERROR {JAGGERY.modules.user:js} - org.mozilla.javascript.WrappedException: Wrapped org.jaggeryjs.scriptengine.exceptions.ScriptException: javax.mail.MessagingException: Unknown SMTP host: smtp.google.com; nested exception is: java.net.UnknownHostException: smtp.google.com (/emm/modules/user.js#883) at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1754) at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:148) at org.mozilla.javascript.FunctionObject.call(FunctionObject.java:449) at org.mozilla.javascript.optimizer.OptRuntime.callProp0(OptRuntime.java:85) at org.jaggeryjs.rhino.emm.modules.c7._c_anonymous_38(/emm/modules/user.js:883) at org.jaggeryjs.rhino.emm.modules.c7.call(/emm/modules/user.js) at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32) at org.jaggeryjs.rhino.emm.api.c0._c_anonymous_17(/emm/api/userRouter.js:192) at org.jaggeryjs.rhino.emm.api.c0.call(/emm/api/userRouter.js) at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32) at org.jaggeryjs.rhino.emm.modules.c5._c_anonymous_13(/emm/modules/goose.js:174) at org.jaggeryjs.rhino.emm.modules.c5.call(/emm/modules/goose.js) at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32) at org.jaggeryjs.rhino.emm.modules.c3._c_callAPI_12(/emm/modules/absolute.js:171) at org.jaggeryjs.rhino.emm.modules.c3.call(/emm/modules/absolute.js)

etc, etc ...

Actually, the server doesn't seem to care about the SMTPHOST parameter defined in config.json.

I searched into the file system to see if smtp.google.com was referenced somewhere else, but found nothing.

I performed a hardware reset of my server, but without any effect.

What's wrong with this, did I missed something in the installation guide ?

Thanks in advance for your help.

I just discover what may cause my problems. When I open the emm web console and click Configurations->Settings I have the following settings:

![WSO2EMM Web Console- Configuration][1]

with Host set as smtp.gmail.com

Now, if I open the file emm/config/config.json, I have the following setting: ![WSO2EMM config.json][2]

You can see that the SMTPHOST parameter is set to smtp.google.com which is unknown host.

My question is: Why is there a difference between what I can see in the web console and what I have in config.json ?

Could you tell me where are stored the information entered from the web console ?

Setting smtp.gmail.com from the web console solved my problem ...

Unfortunately, you'll have to read this without the screenshots. Too bad I have not enough good reputation to post images (damned stupid ...)

Community
  • 1
  • 1
hellcat
  • 31
  • 5

2 Answers2

0

smtp.gmail.com should work with either port number 25 or 465 with SSL. If this is throwing errors please double check whether those ports are blocked by your firewall.

Dilshan
  • 3,231
  • 4
  • 39
  • 50
0

You have to enter all the configuration data related to email from the web console, and it is stored in the server registry. You can browse the registry by login to carbon console as admin user.

Chatura Dilan
  • 1,502
  • 1
  • 16
  • 29
  • OK, no problem, I found the parameters in the Carbon Console. I may be noob but I like to understand ;-) So what the use of mail parameters stored in emm/config/config.json, if they are stored in registry (I guess it's in Carbon Database)? – hellcat Oct 07 '14 at 13:47
  • I think that is not necessary, should be removed from config.json file – Chatura Dilan Oct 07 '14 at 13:52
  • Ok, I see, you have migrated to a new version and change how things are managed but I think that this should be mentionned in the install documentation. Now I'm facing a problem with enrollment I don't know if I can put this here . – hellcat Oct 07 '14 at 14:39
  • Add it as a new question, if you cannot find it in Stackoverflow – Chatura Dilan Oct 07 '14 at 14:52
  • I have opened a the following new question:Unable to enroll an android device from the agent: Fail at “Set Pin” – hellcat Oct 08 '14 at 10:59