[Solved]Looks like your connection to NodeBB was lost, please wait while we try to reconnect.
-
I have standard error "Looks like your connection to NodeBB was lost, please wait while we try to reconnect.", I've read couple of similar topics on forum but whiteout results.
NodeBB is hosted on the same physical server as nginx server.
Here is my dump.
cat /etc/-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.5 LTS"
NAME="Ubuntu"
VERSION="16.04.5 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.5 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenialnpm -v
5.6.0node -v
v8.11.3mongod --version
db version v3.6.6nginx -v
nginx version: nginx/1.14.0cat /etc/nginx/sites-available/domain
server {
listen 80;
server_name www.domain domain xxx.xxx.xxx;location / { proxy_pass http://localhost:4567; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Night-Proxy true; proxy_redirect off; proxy_buffering off; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; }
}
cat config.json
{
"url": "http://domain",
"secret": "secret***************************",
"database": "mongo",
"mongo": {
"host": "localhost",
"port": "27017",
"username": "name",
"password": "passwd",
"database": "db",
"uri": ""
},
"port": "4567"
}./nodebb log
Hit Ctrl-C to exit
For the full license, please visit: http://www.gnu.org/copyleft/gpl.html
Clustering enabled: Spinning up 1 process(es).
2018-07-22T06:39:05.193Z [8471] - info: Initializing NodeBB v1.10.1 http://domain
2018-07-22T06:39:07.899Z [8471] - info: [socket.io] Restricting access to origin: http://domain: *
2018-07-22T06:39:08.292Z [8471] - info: Routes added
2018-07-22T06:39:08.296Z [8471] - info: NodeBB Ready
2018-07-22T06:39:08.303Z [8471] - info: Enabling 'trust proxy'
2018-07-22T06:39:08.308Z [8471] - info: NodeBB is now listening on: 0.0.0.0:4567sudo /etc/init.d/nginx status
● nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: active (running) since Sun 2018-07-22 08:45:01 CEST; 1s ago
Docs: man:nginx(8)
Process: 8592 ExecStop=/sbin/start-stop-daemon --quiet --stop --retry QUIT/5 --pidfile /run/nginx.pid (code=exited, status=0/SUCCESS)
Process: 8601 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
Process: 8598 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
Main PID: 8605 (nginx)
Tasks: 2
Memory: 1.9M
CPU: 36ms
CGroup: /system.slice/nginx.service
├─8605 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
└─8611 nginx: worker processJul 22 08:45:01 Web systemd[1]: Stopped A high performance web server and a reverse proxy server.
Jul 22 08:45:01 Web systemd[1]: Starting A high performance web server and a reverse proxy server...
Jul 22 08:45:01 Web systemd[1]: nginx.service: Failed to read PID from file /run/nginx.pid: Invalid argument
Jul 22 08:45:01 Web systemd[1]: Started A high performance web server and a reverse proxy server.sudo iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destinationChain FORWARD (policy ACCEPT)
target prot opt source destination
ACCEPT all -- anywhere anywhere
ACCEPT all -- anywhere anywhereChain OUTPUT (policy ACCEPT)
target prot opt source destinationChain syn-flood (0 references)
target prot opt source destination -
@Konrad-Janczarek said in Looks like your connection to NodeBB was lost, please wait while we try to reconnect.:
cat config.json{
"url": "http://domain",
"secret": "secret***************************",
"database": "mongo",
"mongo": {
"host": "localhost",
"port": "27017",
"username": "name",
"password": "passwd",
"database": "db",
"uri": ""
},
"port": "4567"
}Changed to
cat config.json
{
"url": "http://domain:4567",
"secret": "secret***************************",
"database": "mongo",
"mongo": {
"host": "localhost",
"port": "27017",
"username": "name",
"password": "passwd",
"database": "db",
"uri": ""
},
"port": "4567"
}and it's works.
Sorry for same additional topic.
-
That's not actually what's wrong, your config.json was correct. The problem is your nginx config is wrong. Follow the docs here.
https://docs.nodebb.org/installing/os/ubuntu/#configuring-nginx