
Posts made by Pummelchen
-
RE: LetsEncrypt HTTPS w/ NodeBB Forum
I would recommend https://www.sslforfree.com which is LetsEncrypt based and offers DNS verification, then follow standard nginx ssl guidelines to install the certificates.
Once done check your site here:
My score is 100% after some tuning of nginx
-
RE: How To: Let's Encrypt and NodeBB
I'm using a Lets Encrypt based service at https://www.sslforfree.com which allows DNS authentication instead of the two file uploads. Too much hassle to get that directory working ..
-
RE: MongoDB 4.x supported ?
2018-09-09T10:11:48.922Z [9648] - [32minfo[39m: NodeBB is now listening on: 127.0.0.1:4569
2018-09-09T10:16:43.603Z [11388] - [31merror[39m: MongoError: cursor id 27285299524 not found
at X:\NodeBB\node_modules\mongodb\node_modules\mongodb-core\lib\connection\pool.js:598:61
at authenticateStragglers (X:\NodeBB\node_modules\mongodb\node_modules\mongodb-core\lib\connection\pool.js:516:16)
at Connection.messageHandler (X:\NodeBB\node_modules\mongodb\node_modules\mongodb-core\lib\connection\pool.js:552:5)
at emitMessageHandler (X:\NodeBB\node_modules\mongodb\node_modules\mongodb-core\lib\connection\connection.js:309:10)
at Socket.<anonymous> (X:\NodeBB\node_modules\mongodb\node_modules\mongodb-core\lib\connection\connection.js:452:17)
at Socket.emit (events.js:182:13)
at addChunk (_stream_readable.js:283:12)
at readableAddChunk (_stream_readable.js:264:11)
at Socket.Readable.push (_stream_readable.js:219:10)
at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)
2018-09-09T10:16:43.603Z [11388] - [32minfo[39m: [app] Shutdown (SIGTERM/SIGINT) Initialised.
2018-09-09T10:16:43.605Z [11388] - [32minfo[39m: [app] Web server closed to connections.
2018-09-09T10:16:43.606Z [11388] - [32minfo[39m: [app] Database connection closed.
2018-09-09T10:16:43.606Z [11388] - [32minfo[39m: [app] Shutdown complete.
2018-09-09T10:16:43.621Z [5504] - [31merror[39m: MongoError: cursor id 28811112366 not found
at X:\NodeBB\node_modules\mongodb\node_modules\mongodb-core\lib\connection\pool.js:598:61
at authenticateStragglers (X:\NodeBB\node_modules\mongodb\node_modules\mongodb-core\lib\connection\pool.js:516:16)
at Connection.messageHandler (X:\NodeBB\node_modules\mongodb\node_modules\mongodb-core\lib\connection\pool.js:552:5)
at emitMessageHandler (X:\NodeBB\node_modules\mongodb\node_modules\mongodb-core\lib\connection\connection.js:309:10)
at Socket.<anonymous> (X:\NodeBB\node_modules\mongodb\node_modules\mongodb-core\lib\connection\connection.js:452:17)
at Socket.emit (events.js:182:13)
at addChunk (_stream_readable.js:283:12)
at readableAddChunk (_stream_readable.js:264:11)
at Socket.Readable.push (_stream_readable.js:219:10)
at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)
2018-09-09T10:16:43.625Z [5504] - [32minfo[39m: [app] Shutdown (SIGTERM/SIGINT) Initialised.
2018-09-09T10:16:43.627Z [5504] - [32minfo[39m: [app] Web server closed to connections.
2018-09-09T10:16:43.632Z [5504] - [32minfo[39m: [app] Database connection closed.
2018-09-09T10:16:43.632Z [5504] - [32minfo[39m: [app] Shutdown complete.
[cluster] Child Process (11388) has exited (code: 1, signal: null)
[cluster] Spinning up another process...
[cluster] Child Process (5504) has exited (code: 1, signal: null)
[cluster] Spinning up another process...
2018-09-09T10:16:43.723Z [9648] - [31merror[39m: MongoError: cursor id 28796318791 not found
at X:\NodeBB\node_modules\mongodb\node_modules\mongodb-core\lib\connection\pool.js:598:61
at authenticateStragglers (X:\NodeBB\node_modules\mongodb\node_modules\mongodb-core\lib\connection\pool.js:516:16)
at Connection.messageHandler (X:\NodeBB\node_modules\mongodb\node_modules\mongodb-core\lib\connection\pool.js:552:5)
at emitMessageHandler (X:\NodeBB\node_modules\mongodb\node_modules\mongodb-core\lib\connection\connection.js:309:10)
at Socket.<anonymous> (X:\NodeBB\node_modules\mongodb\node_modules\mongodb-core\lib\connection\connection.js:452:17)
at Socket.emit (events.js:182:13)
at addChunk (_stream_readable.js:283:12)
at readableAddChunk (_stream_readable.js:264:11)
at Socket.Readable.push (_stream_readable.js:219:10)
at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)
2018-09-09T10:16:43.724Z [9648] - [32minfo[39m: [app] Shutdown (SIGTERM/SIGINT) Initialised.
2018-09-09T10:16:43.732Z [9648] - [32minfo[39m: [app] Web server closed to connections.
2018-09-09T10:16:43.734Z [9648] - [32minfo[39m: [app] Database connection closed.
2018-09-09T10:16:43.734Z [9648] - [32minfo[39m: [app] Shutdown complete.
[cluster] Child Process (9648) has exited (code: 1, signal: null)
[cluster] Spinning up another process...
2018-09-09T10:16:44.114Z [9396] - [31merror[39m: MongoError: cursor id 28075153536 not found
at X:\NodeBB\node_modules\mongodb\node_modules\mongodb-core\lib\connection\pool.js:598:61
at authenticateStragglers (X:\NodeBB\node_modules\mongodb\node_modules\mongodb-core\lib\connection\pool.js:516:16)
at Connection.messageHandler (X:\NodeBB\node_modules\mongodb\node_modules\mongodb-core\lib\connection\pool.js:552:5)
at emitMessageHandler (X:\NodeBB\node_modules\mongodb\node_modules\mongodb-core\lib\connection\connection.js:309:10)
at Socket.<anonymous> (X:\NodeBB\node_modules\mongodb\node_modules\mongodb-core\lib\connection\connection.js:452:17)
at Socket.emit (events.js:182:13)
at addChunk (_stream_readable.js:283:12)
at readableAddChunk (_stream_readable.js:264:11)
at Socket.Readable.push (_stream_readable.js:219:10)
at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)
2018-09-09T10:16:44.114Z [9396] - [32minfo[39m: [app] Shutdown (SIGTERM/SIGINT) Initialised.
2018-09-09T10:16:44.115Z [9396] - [32minfo[39m: [app] Web server closed to connections.
2018-09-09T10:16:44.118Z [9396] - [32minfo[39m: [app] Database connection closed.
2018-09-09T10:16:44.118Z [9396] - [32minfo[39m: [app] Shutdown complete.
[cluster] Child Process (9396) has exited (code: 1, signal: null)
[cluster] Spinning up another process...
2018-09-09T10:16:45.087Z [12300] - [32minfo[39m: Initializing NodeBB v1.10.1 https://beep.com/forum
2 -
MongoDB 4.x supported ?
Hello,
does NodeBB support MongoDB 4.x ? I did a general server all-app-update and now have some issues with my node.exe instances restarting every couple of minutes and at some point they dont respawn anymore. Not sure yet if the issue is with Node 10.10.0 upgrade
or Mongo 4 upgrade
or nginx 1.53 upgrade
Update: forums works fine, new threads can be created and edited without issues. Just you see connection lost while node.js respawns and it reconnects after some seconds.
-
SQLite Integration
Hello All,
Once Postgresql will be fully implemented, how difficult will it be to also support SQLite ? Reason is that we try to minimize different databases systems to keep server maitenance low.
Many thanks
Pummelchen
-
RE: Problem of Internal Server Error
I have the same if the forum has no traffic for some time. Something inside Node.js timeouts. My fix was to load the forum every x minutes which I do as part of server monitoring anyways. Since then its 100% fine.
-
RE: NodeBB on Windows 10 / 2016
If anyone gets this error having the forum in a subfolder like blabla.com/forum:
forumcategories Not Found
-
RE: Homepage without trailing slash broken (subfolder installation)
I run into the same issue with nginx without any Cloudfare rules set for the forum and without any CDN active, so the webserver serves content directly.
Fix:
NodeBB
config.jsonThere should be no forward slash at the end which complies with the documentation:
"url": "https://blabla.com/forum",
nginx.conf
here note the double slash on the first line /forum/
The double slash solves the issue, at least during initial testing on different browsers and devices.
Not sure if this is a Windows/nginx specific thing as the path's are set a bit different.[...] location /forum/ { 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 Host $http_host; proxy_set_header X-NginX-Proxy true; # proxy_pass http://127.0.0.1:4567; proxy_pass http://io_nodes; proxy_redirect off; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; }
-
RE: NodeBB on Windows 10 / 2016
I guess you use a VPS with low RAM, and Windows needs to swap out to keep going. My VPS has 8GB RAM and 2GB swap with usually 5-6GB RAM free even under stress test.
-
RE: Nginx for SSL in NodeBB
Did you pack the SSL certificate based on the nginx documentation ? I use "Let's Encrypt" and it only worked when I did NOT pack the certificate crt file.
-
RE: Getting a session mismatch every time the page reloads.
- Check in config.json that the url of your forum matches exectly the domain url you are using
- Disable nginx routing for a test and access your forum directly to see if it helps
- If you use Cloudfare disable Cloudfare distribution unless you have a higher plan which allows websockets
- Check with/without firewall
- I did a manual socket.io npm re-install which may have fixed something, too
I have been trough this frustrating experience for days but in the end got it all sorted. Its quite a bit of learning to get it working but in the end it all makes sense.
-
RE: Cant upgrade.
Or backup your nodebb dir and overwrite using the latest Git master zip. They say its not supported but worked several versions for me.
-
RE: Create a hidden Category
Yes by removing permissions from anyone and assign the Mod group only.
-
RE: How to Load Balance for all CPU Cores
Yes, as nginx and node.js are single threaded apps you need to spawn multiple copies of them which match the numbers of CPU cores in order to fully use the power of your server.
One nginx process acts as a controller/watchdog.
I'm no MondoDB expert but I read that it automatically uses multi-threads for read requests but uses a single thread for write operations.
-
RE: How to Load Balance for all CPU Cores
Self-Support ..
So it seems the fix is to add this to config.json:
"bind_address": "127.0.0.1",
and in ngix.conf bind all ports 80 and 433 to the external IP:
listen 195.201.96.256:80;
Now change
worker_processes 4;
And we have a load balancing for ngix and also for node. Missing is load balancing of mongo but I leave that for a snowcheck.
-
RE: How to Load Balance for all CPU Cores
worker_processes 1; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; sendfile on; keepalive_timeout 60; gzip on; upstream io_nodes { ip_hash; server 127.0.0.1:4567; server 127.0.0.1:4568; } server { listen 80; server_name www.test.com test.com; return 301 https://test.com$request_uri; access_log off; } server { listen 443 ssl; server_name www.test.com; ssl_certificate X:/nginx/ssl/test.crt; ssl_certificate_key X:/nginx/ssl/test.key; return 301 https://test.com$request_uri; access_log off; } server { listen 443 ssl; server_name test.com; ssl_certificate X:/nginx/ssl/test.crt; ssl_certificate_key X:/nginx/ssl/test.key; access_log off; server_tokens off; root X:/Web; sendfile on; tcp_nopush on; tcp_nodelay on; # error_page 404 /404.html; # location = /404.html { # root X:/Web; # internal; # } # error_page 500 502 503 504 /50x.html; # # location = /50x.html { # root X:/Web; # } location / { try_files $uri /index.html; index index.html; } location /forum { 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 Host $http_host; proxy_set_header X-NginX-Proxy true; # proxy_pass http://127.0.0.1:4567; proxy_pass http://io_nodes; proxy_redirect off; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; } } }
-
RE: How to Load Balance for all CPU Cores
@pummelchen said in How to Load Balance for all CPU Cores:
worker_processes 2;
I used the fork of @baris and replaced the whole mubsub with it. That finally spawned 2 stable node processes and the forum runs fine.
However I had to change worker_processes from 2 back to 1 to get it working.
With 2 worker processes I got this error:bind() to 0.0.0.0:80 failed (98: Address already in use)
Which is mostly an issue in my ngix.conf as it 1) runs as a webserver:443 but also 2) routes traffic and there is conflict somewhere when two worker processes are active.
The main issue is solved, I post my nginx.conf just in case. Thanks !
-
RE: NodeBB on Windows 10 / 2016
@pummelchen said in NodeBB on Windows 10 / 2016:
Issues: I still investigate a problem with Mongo to cash overnight, will update once I figure that out.
So turned out that when the forum has no traffic, like when it sits idle overnight, something gets a timeout and the forum responds with "Internal Server Error" once you load it in the morning. Need to run nodebb stop/start cycle to fix that.
Since I have a website alive monitor running which loads the forum every x seconds from external also to measure response time for performance monitoring, that issue is gone.
Forum is responsive and stable for many days now without a single failure. Total RAM usuage for mongo/node/ngix is around 360 MB while the website monitor sends one request every 10 seconds to the forum over Cloudfare and the same to the homepage which simulates ca. 20.000 users per month in total.