Skip to content
  • NodeBB 1.11.2 Error Connect EMFILE

    Technical Support
    8
    0 Votes
    8 Posts
    1k Views
    julianJ
    @scottalanmiller Fluentd hosts some nice configs (distilled from a presentation from a Netflix engineer about tuning their servers) https://docs.fluentd.org/v1.0/articles/before-install Perhaps this could help? Also check out ss -s, what is TIMEWAIT?
  • Upgrade from V0.6.0

    Technical Support
    3
    0 Votes
    3 Posts
    840 Views
    julianJ
    Wow, v0.6.0! That's going to be a fun one. What I'd recommend is deploying a copy of your forum to a new environment purely to run the upgrade on it, then you can handle any errors that come up, and we can guide you through the process. Now, of course, ideally, there won't be any errors, but v0.6.0 was a long time ago....
  • Setting up NodeBB with Mongo on Fedora 28

    Tutorials
    10
    0 Votes
    10 Posts
    2k Views
    Arief WijayaA
    @JaredBusch Thanks. Really appreciate it
  • Is the official blog avaible to use?

    NodeBB Plugins
    3
    0 Votes
    3 Posts
    1k Views
    0
    Thank you @baris It's good to know that. Use this together with NodeBB seems awesome.
  • 0 Votes
    1 Posts
    1k Views
    Peter-Zoltan KeresztesP
    Hello, I am trying to setup nodebb with haproxy instead of nginx as frontend. Everything seam to be working however I am getting lots of 403 on /socket.io/ requests. frontend http-in mode http bind 0.0.0.0:80 redirect scheme https code 301 if !{ ssl_fc } frontend https-in bind 0.0.0.0:443 ssl crt /etc/letsencrypt/live/test/test.pem http-response set-header strict-transport-security "max-age=31536000; includeSubDomains" http-response set-header Content-Security-Policy "default-src 'self' wss: https: *.startech-rd.tk/*; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://code.jquery.com; style-src 'self' 'unsafe-inline' https:; img-src 'self' https://casper.ghost.org/ https://www.gravatar.com/ data:; font-src 'self' https:" http-response set-header X-XSS-Protection "1; mode=block" http-response set-header X-Content-Type-Options "nosniff" http-response set-header Referrer-Policy "no-referrer" reqadd X-Forwarded-Proto:\ https acl is_websocket hdr(Upgrade) -i WebSocket acl is_websocket path_sub -i /socket.io/ use_backend bk_ws if is_websocket acl acl_comments path_beg -i /comments use_backend comments if acl_comments backend comments mode http balance leastconn timeout connect 1s timeout server 600s timeout queue 600s option redispatch retries 3 acl is_woff capture.req.uri -m sub .woff acl is_ttf capture.req.uri -m sub .ttf acl is_eot capture.req.uri -m sub .eot http-response set-header Cache-Control public if is_eot or is_woff or is_ttf http-response set-header Expires -1 if is_eot or is_woff or is_ttf http-response set-header Pragma cache if is_eot or is_woff or is_ttf cookie nodebb insert indirect nocache secure server node1 10.160.125.81:4567 cookie nodebb_node1 check inter 1000 fastinter 500 rise 2 fall 1 server node2 10.160.125.82:4567 cookie nodebb_node2 check inter 1000 fastinter 500 rise 2 fall 1 backend bk_ws option redispatch balance roundrobin option forwardfor option httpclose server node1 10.160.125.81:4567 maxconn 30000 weight 10 cookie ws_node1 check server node2 10.160.125.82:4567 maxconn 30000 weight 10 cookie ws_node2 check``` I have tried to connect directly without haproxy and the websockets are connecting correctly. However I've seen that using the haproxy the websocket protocol changed from wss to https. Any suggestions on how to fix this?
  • nodebb not getting started

    Technical Support
    23
    0 Votes
    23 Posts
    7k Views
    ashish deo singhA
    @abhinov-singh @PitaJ have done same things as @abhinov-singh but my forum is working on when writing :4567? how to point it to main domain?
  • Errors on Update to 1.7.1

    Bug Reports
    28
    0 Votes
    28 Posts
    9k Views
    KalbaskinK
    Had the same problem. Many thanks for the solution!
  • 0 Votes
    4 Posts
    4k Views
    julianJ
    The common causes for a session mismatch error are usually one of the following: 1. Mis-configured URL parameter in your config.json file If you have a misconfigured url value in your config.json file, the cookie may be saved incorrectly (or not at all), causing a session mismatch error. Please ensure that the link you are accessing your site with and the url defined match. 2. Improper/malformed cookieDomain set in ACP Sometimes admins set this value without realising that they probably don't need to set it at all. The default is perfectly fine. This is what the config looks like: [image: VEhEQAREQgZgTkGjHvIPVPBEQAREQgfgQ+P8uQ0hcCNBYdwAAAABJRU5ErkJggg==] If this is set, you'll want to revert the setting by editing your database directly: Redis: hdel config cookieDomain MongoDB: db.objects.update({ _key: "config" }, { $set: "cookieDomain": "" }); 3. Missing X-Forwarded-Proto header from nginx/apache If you are using a reverse proxy, you will need to have nginx pass a header through to NodeBB so it correctly determines the correct cookie secure property. In nginx, you will need to add the directive like so: location / { ... proxy_set_header X-Forwarded-Proto $scheme; ... }
  • Converting a topic into twitter timeline

    Tutorials
    1
    1 Votes
    1 Posts
    1k Views
    <baris>B
    This is a simple widget tutorial to turn a topic into a twitter timeline. The end result will look like this. [image: 1qkqhv9.png] First create a topic that will be the home of the twitter widget and record its topic id. Now go to /admin/extend/widgets and place a html widget on topic.tpl/header. The standard twitter timeline widget code only works on cold loads so we have to modify it for NodeBB. You can generate the twitter widget at https://twitter.com/settings/widgets, after you copy that code you have to replace the <script> block with the one provided below. <script> !function(d,s,id){ var js,p=/^http:/.test(d.location)?'http':'https'; var el = d.getElementById(id); if (el) { el.parentNode.removeChild(el); } if (!d.getElementById(id)) { js = d.createElement(s); js.id = id; js.src = p + "://platform.twitter.com/widgets.js"; var fjs = d.getElementsByTagName(s)[0]; fjs.parentNode.insertBefore(js,fjs); } }(document,"script","twitter-wjs"); </script> Here is the full widget code for NodeBB's twitter timeline. You can copy paste it into your HTML widget and replace every <topic_id> with your own topic id. <style> .page-topic-<topic_id> .topic { display: none; } .page-topic .twitter-timeline { display: none !important; width: 100% !important; height: 800px !important; } .page-topic-<topic_id> .twitter-timeline { display: block !important; } </style> <a class="twitter-timeline" href="https://twitter.com/NodeBB" data-widget-id="433016924318883841">Tweets by @NodeBB</a> <script> !function(d,s,id){ var js,p=/^http:/.test(d.location)?'http':'https'; var el = d.getElementById(id); if (el) { el.parentNode.removeChild(el); } if (!d.getElementById(id)) { js = d.createElement(s); js.id = id; js.src = p + "://platform.twitter.com/widgets.js"; var fjs = d.getElementsByTagName(s)[0]; fjs.parentNode.insertBefore(js,fjs); } }(document,"script","twitter-wjs"); </script> Once you have the widget, you can customize it with data attributes, for more info you can read https://dev.twitter.com/web/embedded-timelines
  • 5 Votes
    13 Posts
    3k Views
    D
    But lemmie tell you writing Javascript inside an HTML widget is a Pain In The Neck.
  • I need to remove latest topic

    NodeBB Development
    3
    0 Votes
    3 Posts
    2k Views
    D
    @julian and If I want obtain the latest post's pid , for every "Lastest post" in every categories and sub categories, how can I do that? What is the hook that I have use?
  • How specify dependencies

    NodeBB Development
    2
    0 Votes
    2 Posts
    2k Views
    julianJ
    How did you "install" the plugin? npm install will install dependencies, a simple git clone will not. You will need to run npm install inside the plugin folder.
  • 18 Votes
    36 Posts
    12k Views
    <baris>B
    @dave1904 you should be able to get that data the same way this plugin does. https://github.com/barisusakli/nodebb-plugin-browsing-users/blob/master/index.js#L103-L112 That code gets all the connected sockets that are in the topic. Each socket object has a data.uid field. If it is 0 then it is a guest other wise it is the user id of the logged in user. From that you can get the total number of sockets in the topic or just the guests etc.
  • Replies to this post

    NodeBB Development
    15
    8 Votes
    15 Posts
    9k Views
    PitaJP
    @alff0x1f it's a bug that should be fixed soon.
  • Memory (MongoDB)

    Technical Support
    8
    0 Votes
    8 Posts
    5k Views
    F
    @alff0x1f excellent! Thank you very much for those printouts. Swap it is, then
  • private messaging

    General Discussion
    8
    0 Votes
    8 Posts
    4k Views
    J
    @pichalite I didn't know about this feature! Thank you for pointing that out to me, that is great! I totally agree with your point made above then
  • 0 Votes
    7 Posts
    10k Views
    julianJ
    Thanks @rod and @tqwhite for helping @Cyb3r with this Glad we have you on the community!
  • Group Title Change

    NodeBB Development
    1
    0 Votes
    1 Posts
    2k Views
    <baris>B
    On master the group title setting has moved from the settings page to the profile edit page. In the database the groupTitle property is in the user hash(user:1) now instead of the user settings hash(user:1:settings). Relevant commits https://github.com/NodeBB/NodeBB/commit/e564260650b5ed5191fde1c464fa87c68b3ce78f If you have a custom theme that has a custom edit/settings page you can apply this change https://github.com/NodeBB/nodebb-theme-vanilla/commit/68f6975c404af2b72a937c77659c7d2fec7e116b
  • Does a sample data exists?

    General Discussion
    7
    2 Votes
    7 Posts
    4k Views
    Q
    @charles one can make an import plugin, but an easiest and efficient way for (quick) testings will be just with redis data dump file. First, load redis with data file, and that's it. However, I agree that the importer can be better at some point.
  • RFC re: post composition UX on mobile

    Locked NodeBB Development
    2
    0 Votes
    2 Posts
    2k Views
    julianJ
    Went ahead and made the changes already