• Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
v3.5.2 Latest
Buy Hosting

"Connection has been lost" error after update to v1.4.4

Scheduled Pinned Locked Moved Technical Support
23 Posts 10 Posters 7.0k Views
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    btw6391
    wrote on last edited by
    #1

    Updated to v1.4.4 yesterday and while the site works, I constantly received the "lost connection" popup and pinwheel in the navigation bar.

    This problem only seems to occur when I run the app using "./nodebb start" but not when I run "./nodebb dev". It doesn't seem like the console is outputting or detecting any error.

    Anyone else experiencing this issue?

    PitaJP 1 Reply Last reply
    0
  • PitaJP Offline
    PitaJP Offline
    PitaJ Global Moderator Plugin & Theme Dev
    replied to btw6391 on last edited by
    #2

    @btw6391 looks to be related to this maybe https://github.com/NodeBB/NodeBB/issues/5486

    1 Reply Last reply
    0
  • B Offline
    B Offline
    btw6391
    wrote on last edited by
    #3

    Interesting, thanks! I had my forum set up on a subdomain; decided to try changing my config.json file back to it's original version and the error seems to be cleared up.

    I'll be sure to monitor this error if I want to change back to the subdomain.

    1 Reply Last reply
    0
  • S Offline
    S Offline
    Simon Even
    wrote on last edited by
    #4

    I'm getting the same issue on 1.4.4. Ho did you solve this?

    1 Reply Last reply
    0
  • S Offline
    S Offline
    Simon Even
    wrote on last edited by
    #5

    @btw6391 ^^

    1 Reply Last reply
    0
  • S Offline
    S Offline
    sharonyue
    wrote on last edited by
    #6

    @btw6391
    I am getting the same issue for 1.4.5.

    1 Reply Last reply
    0
  • teh_gT Offline
    teh_gT Offline
    teh_g
    wrote on last edited by
    #7

    I was seeing this error for users that were using "www.gamingexodus.com" since my config was for "gamingexodus.com". I lazily setup a forward to send the www address to just gamingexodus.com

    1 Reply Last reply
    0
  • S Offline
    S Offline
    sharonyue
    wrote on last edited by sharonyue
    #8

    I did not try xxx.com instead of www.xxx.com, but it is fixed by ./nodebb dev. However, I dont think it is a good way to fix this problem. This is a serious problem, imagine you have 1000 new threads per day, suddenly your new threads drops to 10 per day.

    The wired thing is that not all users suffer this problem, but 80% of them do.

    PitaJP 1 Reply Last reply
    0
  • PitaJP Offline
    PitaJP Offline
    PitaJ Global Moderator Plugin & Theme Dev
    replied to sharonyue on last edited by PitaJ
    #9

    @sharonyue This bug occurs if the url defined in config.json is different from the url which users access your site from.

    Edit: the reason for this is a security measure.

    S 1 Reply Last reply
    0
  • S Offline
    S Offline
    sharonyue
    replied to PitaJ on last edited by
    #10

    Hi @PitaJ

    Thanks for your reply.

    My setting is "url": "http://xxx.com",so if users use www.xxx.com, they have problems. If I modify my setting to "url": "http://www.xxx.com", I guess those users using xxx.com will have this problem?

    PitaJP 1 Reply Last reply
    0
  • PitaJP Offline
    PitaJP Offline
    PitaJ Global Moderator Plugin & Theme Dev
    replied to sharonyue on last edited by
    #11

    @sharonyue yes. Just forward users from www.example.com to example.com with your reverse proxy. The www subdomain has been long defunct.

    1 Reply Last reply
    0
  • J Offline
    J Offline
    joyhope
    wrote on last edited by
    #12

    I meet the problem in v.1.4.5

    config.json
    {
    "url": "http://localhost:4567",
    ..

    nginx is used for proxy.

    How to solve this problem?

    PitaJP 1 Reply Last reply
    0
  • PitaJP Offline
    PitaJP Offline
    PitaJ Global Moderator Plugin & Theme Dev
    replied to joyhope on last edited by
    #13

    @joyhope the url field in config.json should be set to the URL at which you visit your forum. So if you go to https://example.com to visit your site, then you should have http://example.com:4567 as the URL field.

    A 1 Reply Last reply
    2
  • J Offline
    J Offline
    joyhope
    wrote on last edited by
    #14

    I changed as your suggest. The problem was gone.

    Thank you.

    1 Reply Last reply
    0
  • A Offline
    A Offline
    Adam Poniatowski
    replied to PitaJ on last edited by
    #15

    @PitaJ Hi PitaJ, I am also experiencing this issue. I tried as you suggested and I have tried it by removing the port number at the end of the url. Still it tells me that the connection has been lost.

    Is this issue resolved in v1.4.6?

    I will try and update it and report back.

    PitaJP 1 Reply Last reply
    0
  • PitaJP Offline
    PitaJP Offline
    PitaJ Global Moderator Plugin & Theme Dev
    replied to Adam Poniatowski on last edited by
    #16

    @teh_g post your config.json and Nginx config, please. Redact any URLs with example.com if you must.

    A 1 Reply Last reply
    0
  • A Offline
    A Offline
    Adam Poniatowski
    replied to PitaJ on last edited by
    #17

    @PitaJ ROFL... I feel like an idiot... I missed the .com part in the config.json. My bad, sorry for wasting your time

    1 Reply Last reply
    0
  • N Offline
    N Offline
    newnodebbuser
    wrote on last edited by
    #18

    @PitaJ , is an IP address something that can be used as the URL?

    My original config.json file used http://localhost:4567, but to test access from external hosts, I tried using the IP address of the nodebb server. As others above have found, this doesn't work because the URLs must match.

    How then can I configure the config.json file to use an IP address, temporarily? This is only for internal testing, so I'm not using a webserver or proxy yet.

    My goal is to use my nodebb server IP address as the URL value and navigate to that from other hosts.

    However, when I try to use the IP address, both the Nodebb server and other hosts receive the connection lost error message.

    config.json:

    {
    "url": "192.168.1.148:4567",
    "secret": "NULL",
    "database": "mongo",
    "mongo": {
    "host": "127.0.0.1",
    "port": "27017",
    "username": "nodebb",
    "password": "NULL",
    "database": "nodebb"
    }
    }

    PitaJP 1 Reply Last reply
    0
  • PitaJP Offline
    PitaJP Offline
    PitaJ Global Moderator Plugin & Theme Dev
    replied to newnodebbuser on last edited by
    #19

    @Alex-Fiala yes you should be able to use IP addresses. However, you still need to have the protocol in there (http://). Copy the address at which you access your NodeBB server and paste it into the config.json

    1 Reply Last reply
    0
  • J Offline
    J Offline
    Julien008
    wrote on last edited by Julien008
    #20

    Archeology level up, I know, I'm sorry

    I get the same problem with the forum configured to be accessible via a subfolder. It is a fresh installation

    HTTP is fine (the forum loads fine) but WebSocket is not ("Looks like your connection to NodeBB was lost, please wait while we try to reconnect." message in the bottom right corner)

    If I start the forum in development mode, everything runs fine (both HTTP and WS)

    Nginx version: 1.10.3
    NodeJS version: 8.6.0
    NodeBB version: 1.6.0

    nginx configuration

    server {
    	listen 80;
    	listen [::]:80;
    
    	server_name example.com;
    
    	return 302 https://$server_name$request_uri;
    }
    
    server {
    	listen 443 ssl;
    	listen [::]:443 ssl;
    
    	server_name example.com;
    
    	index index.html;
    	root /var/www/html/example;
    
    	ssl_certificate /etc/letsencrypt/live/example.com/cert.pem;
    	ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;
    
    	location / {
    		try_files $uri $uri/ =404;
    	}
    
    	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_pass http://localhost:4567;
    		proxy_redirect off;
    
    		proxy_http_version 1.1;
    		proxy_set_header Upgrade $http_upgrade;
    		proxy_set_header Connection "upgrade";
    	}
    }
    

    config.json

    {
        "url": "https://example.com/forum/",
        "secret": -not shown-,
        "database": "mongo",
        "mongo": {-not shown-},
        "bind_address": "127.0.0.1"
    }
    

    NodeBB logs

    6/10 15:12:55 [5514] - info: Initializing NodeBB v1.6.0 https://example.com/forum/
    6/10 15:12:56 [5514] - info: [socket.io] Restricting access to origin: https://example.com:*
    6/10 15:12:57 [5514] - info: Routes added
    6/10 15:12:57 [5514] - info: NodeBB Ready
    6/10 15:12:57 [5514] - info: Enabling 'trust proxy'
    6/10 15:12:57 [5514] - info: NodeBB is now listening on: 127.0.0.1:4567
    

    nginx access log:

    my.ip.v4.address - - [06/Oct/2017:15:27:55 +0200] "GET /forum/socket.io/?EIO=3&transport=polling&t=LxntlbI HTTP/1.1" 403 43 "https://example.com/forum/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:56.0) Gecko/20100101 Firefox/56.0"
    

    nginx error.log:

    2017/10/06 15:12:55 [error] 4221#4221: *494 connect() failed (111: Connection refused) while connecting to upstream, client: my.ip.v4.address, server: example.com, request: "GET /forum/socket.io/?EIO=3&transport=polling&t=LxnqJud HTTP/1.1", upstream: "http://127.0.0.1:4567/forum/socket.io/?EIO=3&transport=polling&t=LxnqJud", host: "example.com", referrer: "https://example.com/forum/"
    
    1 Reply Last reply
    0

Copyright © 2023 NodeBB | Contributors
  • Login

  • Don't have an account? Register

  • Login or register to search.
Powered by NodeBB Contributors
  • First post
    Last post
0
  • Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development