Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't setup SSL connection on server; did not find expected key #527

Closed
masscream opened this issue Apr 9, 2015 · 5 comments
Closed

Can't setup SSL connection on server; did not find expected key #527

masscream opened this issue Apr 9, 2015 · 5 comments
Assignees

Comments

@masscream
Copy link

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 ?

@cromain
Copy link
Contributor

cromain commented 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 as completed Apr 9, 2015
@masscream
Copy link
Author

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
Copy link
Member

prefiks commented 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
Copy link
Author

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 Nov 7, 2015
Add xmerl otp lib for json encode/decode functions
@lock
Copy link

lock bot commented Jun 12, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants