RocketChat / server-snap

Rocket.Chat server snap
MIT License
18 stars 17 forks source link

Grey screen snap first install 4.1.2 / ARM64 #44

Open pjft opened 2 years ago

pjft commented 2 years ago

Hi. I am terribly sorry for opening an issue, but I am completely at a loss.

I've searched everywhere and couldn't find much that matched my issue.

I just installed RocketChat via the snap instructions. I have SSH access to the device - a Raspberry Pi 4 where I also run NextCloud - but it isn't connected to any screen.

As such, when I try to go through the first setup, I am not accessing it via localhost. All I get is a grey screen, after a small animation. Google Chrome developer tools suggest a failure in loading a resource at "http://localhost:3000/__meteor__/dynamic-import/fetch" - ERR CONNECTION REFUSED .

From reading other posts, everyone seems to suggest that I'd do well in changing my siteurl, but no matter what I do, sudo journalctl -u snap.rocketchat-server.rocketchat-server always shows localhost:3000 .

                SERVER RUNNING               
---------------------------------------------

  Rocket.Chat Version: 4.1.2                 
       NodeJS Version: 12.22.7 - arm64       
      MongoDB Version: 3.6.23                
       MongoDB Engine: wiredTiger            
             Platform: linux                 
         Process Port: 3000                  
             Site URL: http://localhost:3000 
     ReplicaSet OpLog: Enabled               
          Commit Hash: 2aba8d2d82            
        Commit Branch: HEAD                  
---------------------------------------------

When I run sudo snap get rocketchat-server siteurl it does show the value I entered. But no matter whether I enter the actual IP address or the network name, journalctl always shows localhost.

I also tried to follow https://www.ryadel.com/en/rocket-chat-change-root_url-site-url-rocketchat/ but there seems to be no rocketchat db at this stage as I haven't yet gone through the first setup, unless I'm doing something wrong?

Running curl http://localhost:3000/api/info from the ssh console returns {"version":"4.1","success":true}.

Any guidance would be very much appreciated.

Thank you.

pjft commented 2 years ago

Ok, so after finding out in a separate site that the db is parties, I was able to run the instructions in https://www.ryadel.com/en/rocket-chat-change-root_url-site-url-rocketchat/ to actually fix this directly on mongodb.

Surely it isn't supposed to be this hard?

Plorenzo commented 2 years ago

@pjft have you tried with snap set?

sudo snap set rocketchat-server siteurl=http://example.com

you can see the setted properties with snap get

sudo snap get rocketchat-server

pjft commented 2 years ago

Apologies, I can't quite recall for sure if I tried it with snap set, but I am under the impression that that's what I did. snap get showed the property I had set, but it didn't affect what was displayed in sudo journalctl -u snap.rocketchat-server.rocketchat-server

xalt7x commented 2 years ago

Faced such issue today. Remotely after login I've got the same grey screen. But on a localhost page rendered normally and I was asked to switch site url. After switching siteurl

sudo snap set rocketchat-server siteurl=http://example.com

first try to restart Rocket.Chat server
sudo snap restart rocketchat-server
(or even whole machine)

On the worst case install x2goserver + firefox on localhost and switch site url On a server:

sudo apt install --no-install-recommends x2goserver-xsession
sudo apt install --no-install-recommends firefox

On your machine: 1) start "x2goclient" and new session (connection) 2) select "Single application" with /usr/bin/firefox 3) start session with your SSH credentials

pjft commented 2 years ago

Just to confirm, as I had to reinstall RocketChat today for database corruption, and snap set doesn't work indeed.