Rebooted server, site stuck in read-only mode

(ncl) #1

Hi there!

After I’ve restored my backup to another server, It’s readonly mode, once I logged-out then I can’t login anymore, nothing happened even I’ve typed many times id/psw…

and then I tried to sign up , it shows :

We cannot detect if your account was created, please ensure you have cookies enabled.

Already tried this

cd /var/discourse ./launcher enter app
rails c


(Jay Pfaffman) #2

The problem is that the site continues to say that it’s in read only mode? (If that’s not the problem, then I made a mistake editing this topic title), you might search for topics about read only mode.

If the host name is different on the new site, then you probably can’t deliver mail, so you’d not receive reset password messages.

If you can’t log in, and want to reset your password manually, then you can try doing

./launcher enter app
rake admin:create

In the container.

(Jeff Atwood) #3

My Ubuntu filesystem got stuck in read only mode once when I upgraded from Ubuntu 14.04 to 16.04 on a DO droplet. I don’t remember the exact fix but Googling around I found a way to pull it out of read only mode and I was off and running.

(Jay Pfaffman) #4

I think he’s saying that the site is in read-only mode and then he logged out and couldn’t log back in again because it was in read-only mode, in spite of trying to turn off read only mode in the Rails console.

I didn’t think it was an OS thing.

(ncl) #5

The site didn’t show “it’s read only mode” once I did this
and I’ve tried this,too

./launcher enter app
rake admin:create

now the issue is
click Log In -> Enter id(email) /psw -> click Log In button -> redirect the page to unlogin situation, no any error

(ncl) #6

Hi there
Just figured it out what might be the issue
here is my steps:

-create new server
-install docker and discourse (follow the instruction discourse/ at master · discourse/discourse · GitHub)
-make an admin log in
-go to old server “Enable read only mode”
-go to new server login as Admin
-upload backup
-use ssh to change the setting
set the root passwd
nano /etc/hostname
nano /etc/hosts
vi /etc/ssh/sshd_config
PermitRootLogin YES
PasswordAuthentication YES
service sshd restart

Once I did reboot then I can’t login anymore
tested other servers , if I don’t do reboot then there’s no and problem

Not sure if it’s a bug, but I’ll avoid reboot from now :slight_smile: thanks!

(Felix Freiberger) #7

@sam, did logging in require a write to the database before? I’m pretty sure it does now, per your recent token changes.