Installation error with SMTP password

(Luca) #1

When I try and run the discourse setup I get this error:

sed: -e expression #1, char 91: unknown option to `s’

Unfortunately, there was an error changing containers/app.yml

What’s going on?

(Rafael dos Santos Silva) #2

Are you running Ubuntu 16.04? Does your password have special characters?

(Matt Palmer) #3

Your password has a forward slash in it. Oddly, I thought I fixed that problem some time ago, though.

(Jay Pfaffman) #4

I just ran ./discourse_setup and made the password: this/testfun.! and it worked.

@tipyn, are you somehow not running the latest discourse_docker?

(Jay Pfaffman) #5

Oh. But it looks like & causes problems, though it didn’t generate an error.

(Luca) #6

It’s a brand new 14.04 server. As far as having the latest discourse_docker, I just followed the installation instructions here: discourse/ at master · discourse/discourse · GitHub.


sudo -s
mkdir /var/discourse
git clone /var/discourse
cd /var/discourse

…the only difference being I made my discourse folder under /srv instead of /var.

The password also doesn’t have an & in it, this is the password:


(Jeff Atwood) #7

It does have a slash in it, though. Can you generate one that does not have a slash?

(Jay Pfaffman) #8

You should probably generate a new password now that you have shown us yours. :slight_smile:

The simplest solution is likely to do something like this:

cd /var/discourse
nano containers/app.yml

Then scroll down to where DISCOURSE_SMTP_PASSWORD is and enter your password with quotes around it. Type control-x to quit nano and try to answer the “do you want to save it” questions in an appropriate manner.

(Karuppiah) #9

My passwords are self generated. And I wonder why the password can’t have slashes? :thinking: Is there any other workaround ?

(Karuppiah) #10

I use Amazon SES for mails. And I see slashes a lot of times while generating the password. But I will try one more time to see if I can get a no slashes password

(Karuppiah) #11

Finally, after two tries, I got a no slashes password.
But guys, please fix the bug. There are so many people who use complex auto generated passwords with slashes and other special characters!

By the way, I just noticed that my password is stored within quotes. I guess I should have used the latest version of Discourse already with just a one click Docker Droplet, instead of trying out one click Discourse Droplet

(Graham Chiu) #12

AWS had its own problems with its own passwords. The command line AWS tool could also not login when the passwords had slashes and + chars in them so the advice was to keep generating new passwords until you got one that didn’t have one.

(Matt Palmer) #13

Quoting and escaping is hard. PRs welcome.

(Karuppiah) #14

Yeah, makes sense. You create awesome software, of course you would have tried to fix all this.
And uh, I have no idea how to code in ruby and how to write yml. I am just learning to code in JavaScript. But I will surely try to contribute to Discourse in the future. It’s such an awesome software :slight_smile: