Keeps losing connection


  • Gamers

    I started my NodeBB forum. Logged in then tried to make a topic. But I only got a "+" thing in the bottom right. I didnt get a text box. When this happened I got a notification saying my forum had lost connection.
    However I check my nodebb log, and it seems fine. Im not sure what is causing it to lose connection, but I need to be able to fix it asap.

    My log shows:

    "root@nodebb:~/nodebb# ./nodebb log

    Hit Ctrl-C to exit

    24/5 20:29:26 [11475] - info: [app] Web server closed to connections.
    24/5 20:29:26 [11475] - info: [app] Shutdown complete.
    [cluster] Child Process (11475) has exited (code: 1, signal: null)
    [cluster] Spinning up another process...
    24/5 20:29:28 [11487] - info: Initializing NodeBB v1.5.0
    24/5 20:29:31 [11487] - info: [socket.io] Restricting access to origin: http://localhost:*
    24/5 20:29:32 [11487] - info: Routes added
    24/5 20:29:32 [11487] - info: NodeBB Ready
    24/5 20:29:32 [11487] - info: Enabling 'trust proxy'
    24/5 20:29:32 [11487] - info: NodeBB is now listening on: 0.0.0.0:4567"

    Thanks!



  • I think it is time for a bot to run here looking for these types of questions and offer up a canned response.

    Anyway, post your config.json file. You most likely do not have the URL configured correctly.


  • Gamers

    @rod said in Keeps losing connection:

    I think it is time for a bot to run here looking for these types of questions and offer up a canned response.

    Anyway, post your config.json file. You most likely do not have the URL configured correctly.

    {
    "url": "http://localhost:4567",
    "secret": "bcd245ec-2cb4-465c-b5a0-18d4e61523f6",
    "database": "mongo",
    "port": 4567,
    "mongo": {
    "host": "127.0.0.1",
    "port": "27017",
    "username": "MyDBUser",
    "password": "MyDBPass",
    "database": "MyDBname"
    }
    }

    obviously changed my db shit for that. But there it is.



  • Change your URL to the domain it is running on. Something like:

    "url": "http://mydomain.com",
    "port": "4567",

    It is a good idea to add the following entry to allow traffic to NodeBB only from your localhost, that being your webserver.

    "bind_address": "127.0.0.1",

    Let your webserver control the traffic to NodeBB.


  • Gamers

    I would have posted earlier, but I dont have 3 rep.

    Jesus im stupid. I just realised Im running "localhost" whilst trying to access it from an external PC. Changed it and it worked......

    And also the bind address part. I wanna access it from other places aswell. But I got it sorted now. Thanks for your help!


Log in to reply
 


Looks like your connection to NodeBB was lost, please wait while we try to reconnect.