Can't setup SSL connection on server; did not find expected key
Hello, I've installed latest version of ejabberd (15.03) and trying to configure secured connection. Without it I can normally connect with my user and communicate. For setting the ssl up I followed the manual (https://www.ejabberd.im/tuto-install-ejabberd) and created a ssl key, then I made active following lines in the module listen:
port: 5222 module: ejabberd_c2s
certfile: "/etc/ejabberd/server.pem" starttls_required: true ..........
but then, after saving, anytime I try to start the server up I can't and get following error from the log:
2015-04-09 15:47:00.716 [error] <0.38.0>@ejabberd_config:get_plain_terms_file:211 Cannot load //etc/ejabberd/ejabberd.yml: Syntax error on line 114 at position 8: did not find expected key
I really don't know what he is unable to find when the file is really there and was generated by the instructions from the official manual. I also tried changing the path of certfile to "server.pem" or "//etc/ejabberd/server.pem" because I've seen such syntax in some of the manuals of ejabberd but with no positive result. Changing rights for the file server.pem to ejabberd:ejabberd / 777 did not help too. Does anybody have the same experience, please ? @mremond mremond assigned badlop on Apr 9, 2015 @cromain Owner cromain commented on Apr 9, 2015
ejabberd.yml is a yaml file. the message is quite clear: Syntax error on line 114 at position 8
please check the indentation of the line you added, it must be the same as your section here it seems certfile instruction is not indented the same way. @cromain cromain closed this on Apr 9, 2015 @masscream masscream commented on Apr 9, 2015
But what is wrong there? I put it exactly the way it was before I deleted ## chars. I did not know that the number of the spaces before the code matters (certfile begins at 8 position). But as I am saying, I did not change it, just uncommented it. http://i57.tinypic.com/sce0wk.png @prefiks Member prefiks commented on Apr 9, 2015
You must align certfile: line with all other options (you need to delete spaces until it's aligned to module, port, etc column) @masscream masscream commented on Apr 9, 2015
Thank you guys! You have just resolved a problem I had been working on more than 5 hours. I tried almost all I found in relation, all but that little detail.... erszcz pushed a commit to erszcz/ejabberd that referenced this issue on Nov 7, 2015 @michalwski Merge pull request #527 from esl/add-xmelr-to-rel