HelloZeroNet / ZeroNet

ZeroNet - Decentralized websites using Bitcoin crypto and BitTorrent network
https://zeronet.io
Other
18.39k stars 2.27k forks source link

Connection with UiServer Websocket was lost. Reconnecting... #1077

Open AnimeAnimeAnimeAnimeAnime opened 7 years ago

AnimeAnimeAnimeAnimeAnime commented 7 years ago

I'm running a proxy server and when I try to connect to my server through domain this error is out

nginx conf (part of)

map $http_upgrade $connection_upgrade { default upgrade; '' close; }

upstream zeronet_backend { server (my ip, not localhost):43110; }

server { listen 80; listen [::]:80; server_name (my domain); return 301 https://$host$request_uri; }

server { listen 443; listen [::]:443; server_name (my domain);

SSL

    ssl_certificate /etc/nginx/ssl/server.crt;
    ssl_certificate_key /etc/nginx/ssl/server.key;
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    ssl_prefer_server_ciphers on;
    ssl_ecdh_curve secp384r1;
    ssl_ciphers ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:!aNULL:!eNULL:!EXPORT:!DES:!3DES:!MD5:!PSK:!RC4; # no RC4 and known insecure cipher

LOG

access_log /var/log/nginx/zeronet/default.log;
error_log /var/log/nginx/zeronet/error.log;

LOCATION

    location / {
    proxy_set_header X-Real-IP      $remote_addr;
    proxy_set_header User-Agent     $http_user_agent;
    proxy_set_header Host           $host;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_pass http://zeronet_backend;
    proxy_http_version 1.1;
}
location /Websocket {
    proxy_pass http://zeronet_backend;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection $connection_upgrade;
}

LOCATION END

}

zeronet conf

[global] ui_ip = 0.0.0.0 ui_port = 43110 ui_host = (my domain)

What's the problem?

HelloZeroNet commented 7 years ago

Can you please specify the exact error message that you get?

Hypeouseaus commented 7 years ago

Connection with UiServer Websocket was lost. Reconnecting...

This is all I can gather. What did you mean by 'exact error message'?

Hypeouseaus commented 7 years ago

Well, If you mean nginx error log, here.

#

2017/08/16 21:40:03 [error] 23270#23270: 2708 connect() failed (111: Connection refused) while connecting to upstream, client: 116.126.55.154, server: (MY DOMAIN), request: "GET /Websocket?wrapper_key=c56d60cafbb10910b78b25d8f27f20b96b1f722eac54aec24cc3aa8439cceae4 HTTP/1.1", upstream: "http://(MY SERVER IP):43110/Websocket?wrapper_key=c56d60cafbb10910b78b25d8f27f20b96b1f722eac54aec24cc3aa8439cceae4", host: "(MY DOMAIN)" 2017/08/16 21:40:04 [error] 23270#23270: 2710 connect() failed (111: Connection refused) while connecting to upstream, client: 116.126.55.154, server: (MY DOMAIN), request: "GET /Websocket?wrapper_key=c56d60cafbb10910b78b25d8f27f20b96b1f722eac54aec24cc3aa8439cceae4 HTTP/1.1", upstream: "http://(MY SERVER IP):43110/Websocket?wrapper_key=c56d60cafbb10910b78b25d8f27f20b96b1f722eac54aec24cc3aa8439cceae4", host: "(MY DOMAIN)" 2017/08/16 21:40:15 [error] 23270#23270: 2712 connect() failed (111: Connection refused) while connecting to upstream, client: 116.126.55.154, server: (MY DOMAIN), request: "GET /Websocket?wrapper_key=c56d60cafbb10910b78b25d8f27f20b96b1f722eac54aec24cc3aa8439cceae4 HTTP/1.1", upstream: "http://(MY SERVER IP):43110/Websocket?wrapper_key=c56d60cafbb10910b78b25d8f27f20b96b1f722eac54aec24cc3aa8439cceae4", host: "(MY DOMAIN)" 2017/08/16 21:40:15 [error] 23270#23270: 2701 connect() failed (111: Connection refused) while connecting to upstream, client: 116.126.55.154, server: (MY DOMAIN), request: "GET /Websocket?wrapper_key=c56d60cafbb10910b78b25d8f27f20b96b1f722eac54aec24cc3aa8439cceae4 HTTP/1.1", upstream: "http://(MY SERVER IP):43110/Websocket?wrapper_key=c56d60cafbb10910b78b25d8f27f20b96b1f722eac54aec24cc3aa8439cceae4", host: "(MY DOMAIN)" 2017/08/16 21:40:26 [error] 23270#23270: 2715 connect() failed (111: Connection refused) while connecting to upstream, client: 116.126.55.154, server: (MY DOMAIN), request: "GET /Websocket?wrapper_key=c56d60cafbb10910b78b25d8f27f20b96b1f722eac54aec24cc3aa8439cceae4 HTTP/1.1", upstream: "http://(MY SERVER IP):43110/Websocket?wrapper_key=c56d60cafbb10910b78b25d8f27f20b96b1f722eac54aec24cc3aa8439cceae4", host: "(MY DOMAIN)" 2017/08/16 21:40:27 [error] 23270#23270: 2717 connect() failed (111: Connection refused) while connecting to upstream, client: 116.126.55.154, server: (MY DOMAIN), request: "GET /Websocket?wrapper_key=c56d60cafbb10910b78b25d8f27f20b96b1f722eac54aec24cc3aa8439cceae4 HTTP/1.1", upstream: "http://(MY SERVER IP):43110/Websocket?wrapper_key=c56d60cafbb10910b78b25d8f27f20b96b1f722eac54aec24cc3aa8439cceae4", host: "(MY DOMAIN)" 2017/08/16 21:40:37 [error] 23270#23270: 2719 connect() failed (111: Connection refused) while connecting to upstream, client: 116.126.55.154, server: (MY DOMAIN), request: "GET /Websocket?wrapper_key=c56d60cafbb10910b78b25d8f27f20b96b1f722eac54aec24cc3aa8439cceae4 HTTP/1.1", upstream: "http://(MY SERVER IP):43110/Websocket?wrapper_key=c56d60cafbb10910b78b25d8f27f20b96b1f722eac54aec24cc3aa8439cceae4", host: "(MY DOMAIN)" 2017/08/16 21:40:40 [error] 23270#23270: 2721 connect() failed (111: Connection refused) while connecting to upstream, client: 116.126.55.154, server: (MY DOMAIN), request: "GET /Websocket?wrapper_key=c56d60cafbb10910b78b25d8f27f20b96b1f722eac54aec24cc3aa8439cceae4 HTTP/1.1", upstream: "http://(MY SERVER IP):43110/Websocket?wrapper_key=c56d60cafbb10910b78b25d8f27f20b96b1f722eac54aec24cc3aa8439cceae4", host: "(MY DOMAIN)" 2017/08/16 21:40:48 [error] 23270#23270: 2723 connect() failed (111: Connection refused) while connecting to upstream, client: 116.126.55.154, server: (MY DOMAIN), request: "GET /Websocket?wrapper_key=c56d60cafbb10910b78b25d8f27f20b96b1f722eac54aec24cc3aa8439cceae4 HTTP/1.1", upstream: "http://(MY SERVER IP):43110/Websocket?wrapper_key=c56d60cafbb10910b78b25d8f27f20b96b1f722eac54aec24cc3aa8439cceae4", host: "(MY DOMAIN)" 2017/08/16 21:40:51 [error] 23270#23270: 2725 connect() failed (111: Connection refused) while connecting to upstream, client: 116.126.55.154, server: (MY DOMAIN), request: "GET /Websocket?wrapper_key=c56d60cafbb10910b78b25d8f27f20b96b1f722eac54aec24cc3aa8439cceae4 HTTP/1.1", upstream: "http://(MY SERVER IP):43110/Websocket?wrapper_key=c56d60cafbb10910b78b25d8f27f20b96b1f722eac54aec24cc3aa8439cceae4", host: "(MY DOMAIN)" 2017/08/16 21:41:00 [error] 23270#23270: 2727 connect() failed (111: Connection refused) while connecting to upstream, client: 116.126.55.154, server: (MY DOMAIN), request: "GET /Websocket?wrapper_key=c56d60cafbb10910b78b25d8f27f20b96b1f722eac54aec24cc3aa8439cceae4 HTTP/1.1", upstream: "http://(MY SERVER IP):43110/Websocket?wrapper_key=c56d60cafbb10910b78b25d8f27f20b96b1f722eac54aec24cc3aa8439cceae4", host: "(MY DOMAIN)" 2017/08/16 21:41:03 [error] 23270#23270: 2729 connect() failed (111: Connection refused) while connecting to upstream, client: 116.126.55.154, server: (MY DOMAIN), request: "GET /Websocket?wrapper_key=c56d60cafbb10910b78b25d8f27f20b96b1f722eac54aec24cc3aa8439cceae4 HTTP/1.1", upstream: "http://(MY SERVER IP):43110/Websocket?wrapper_key=c56d60cafbb10910b78b25d8f27f20b96b1f722eac54aec24cc3aa8439cceae4", host: "(MY DOMAIN)" 2017/08/16 21:41:11 [error] 23270#23270: 2731 connect() failed (111: Connection refused) while connecting to upstream, client: 116.126.55.154, server: (MY DOMAIN), request: "GET /Websocket?wrapper_key=c56d60cafbb10910b78b25d8f27f20b96b1f722eac54aec24cc3aa8439cceae4 HTTP/1.1", upstream: "http://(MY SERVER IP):43110/Websocket?wrapper_key=c56d60cafbb10910b78b25d8f27f20b96b1f722eac54aec24cc3aa8439cceae4", host: "(MY DOMAIN)" 2017/08/16 21:41:16 [error] 23270#23270: 2733 connect() failed (111: Connection refused) while connecting to upstream, client: 116.126.55.154, server: (MY DOMAIN), request: "GET /Websocket?wrapper_key=c56d60cafbb10910b78b25d8f27f20b96b1f722eac54aec24cc3aa8439cceae4 HTTP/1.1", upstream: "http://(MY SERVER IP):43110/Websocket?wrapper_key=c56d60cafbb10910b78b25d8f27f20b96b1f722eac54aec24cc3aa8439cceae4", host: "(MY DOMAIN)" 2017/08/16 21:41:22 [error] 23270#23270: 2735 connect() failed (111: Connection refused) while connecting to upstream, client: 116.126.55.154, server: (MY DOMAIN), request: "GET /Websocket?wrapper_key=c56d60cafbb10910b78b25d8f27f20b96b1f722eac54aec24cc3aa8439cceae4 HTTP/1.1", upstream: "http://(MY SERVER IP):43110/Websocket?wrapper_key=c56d60cafbb10910b78b25d8f27f20b96b1f722eac54aec24cc3aa8439cceae4", host: "(MY DOMAIN)" 2017/08/16 21:41:27 [error] 23270#23270: 2737 connect() failed (111: Connection refused) while connecting to upstream, client: 116.126.55.154, server: (MY DOMAIN), request: "GET /Websocket?wrapper_key=c56d60cafbb10910b78b25d8f27f20b96b1f722eac54aec24cc3aa8439cceae4 HTTP/1.1", upstream: "http://(MY SERVER IP):43110/Websocket?wrapper_key=c56d60cafbb10910b78b25d8f27f20b96b1f722eac54aec24cc3aa8439cceae4", host: "(MY DOMAIN)" 2017/08/16 21:42:54 [error] 23270#23270: 2768 connect() failed (111: Connection refused) while connecting to upstream, client: 116.126.55.154, server: (MY DOMAIN), request: "GET /Websocket?wrapper_key=c56d60cafbb10910b78b25d8f27f20b96b1f722eac54aec24cc3aa8439cceae4 HTTP/1.1", upstream: "http://(MY SERVER IP):43110/Websocket?wrapper_key=c56d60cafbb10910b78b25d8f27f20b96b1f722eac54aec24cc3aa8439cceae4", host: "(MY DOMAIN)" 2017/08/16 21:42:57 [error] 23270#23270: 2770 connect() failed (111: Connection refused) while connecting to upstream, client: 116.126.55.154, server: (MY DOMAIN), request: "GET /Websocket?wrapper_key=c56d60cafbb10910b78b25d8f27f20b96b1f722eac54aec24cc3aa8439cceae4 HTTP/1.1", upstream: "http://(MY SERVER IP):43110/Websocket?wrapper_key=c56d60cafbb10910b78b25d8f27f20b96b1f722eac54aec24cc3aa8439cceae4", host: "(MY DOMAIN)" 2017/08/16 21:43:05 [error] 23270#23270: 2772 connect() failed (111: Connection refused) while connecting to upstream, client: 116.126.55.154, server: (MY DOMAIN), request: "GET /Websocket?wrapper_key=c56d60cafbb10910b78b25d8f27f20b96b1f722eac54aec24cc3aa8439cceae4 HTTP/1.1", upstream: "http://(MY SERVER IP):43110/Websocket?wrapper_key=c56d60cafbb10910b78b25d8f27f20b96b1f722eac54aec24cc3aa8439cceae4", host: "(MY DOMAIN)" 2017/08/16 21:43:53 [error] 23270#23270: 2782 connect() failed (111: Connection refused) while connecting to upstream, client: 116.126.55.154, server: (MY DOMAIN), request: "GET /Websocket?wrapper_key=c56d60cafbb10910b78b25d8f27f20b96b1f722eac54aec24cc3aa8439cceae4 HTTP/1.1", upstream: "http://(MY SERVER IP):43110/Websocket?wrapper_key=c56d60cafbb10910b78b25d8f27f20b96b1f722eac54aec24cc3aa8439cceae4", host: "(MY DOMAIN)" 2017/08/16 21:44:27 [error] 23270#23270: 2788 connect() failed (111: Connection refused) while connecting to upstream, client: 116.126.55.154, server: (MY DOMAIN), request: "GET /Websocket?wrapper_key=c56d60cafbb10910b78b25d8f27f20b96b1f722eac54aec24cc3aa8439cceae4 HTTP/1.1", upstream: "http://(MY SERVER IP):43110/Websocket?wrapper_key=c56d60cafbb10910b78b25d8f27f20b96b1f722eac54aec24cc3aa8439cceae4", host: "(MY DOMAIN)" 2017/08/16 21:44:38 [error] 23270#23270: 2790 connect() failed (111: Connection refused) while connecting to upstream, client: 116.126.55.154, server: (MY DOMAIN), request: "GET /Websocket?wrapper_key=c56d60cafbb10910b78b25d8f27f20b96b1f722eac54aec24cc3aa8439cceae4 HTTP/1.1", upstream: "http://(MY SERVER IP):43110/Websocket?wrapper_key=c56d60cafbb10910b78b25d8f27f20b96b1f722eac54aec24cc3aa8439cceae4", host: "(MY DOMAIN)" 2017/08/16 21:45:00 [error] 23270#23270: 2794 connect() failed (111: Connection refused) while connecting to upstream, client: 116.126.55.154, server: (MY DOMAIN), request: "GET /Websocket?wrapper_key=c56d60cafbb10910b78b25d8f27f20b96b1f722eac54aec24cc3aa8439cceae4 HTTP/1.1", upstream: "http://(MY SERVER IP):43110/Websocket?wrapper_key=c56d60cafbb10910b78b25d8f27f20b96b1f722eac54aec24cc3aa8439cceae4", host: "(MY DOMAIN)" 2017/08/16 21:45:11 [error] 23270#23270: 2796 connect() failed (111: Connection refused) while connecting to upstream, client: 116.126.55.154, server: (MY DOMAIN), request: "GET /Websocket?wrapper_key=c56d60cafbb10910b78b25d8f27f20b96b1f722eac54aec24cc3aa8439cceae4 HTTP/1.1", upstream: "http://(MY SERVER IP):43110/Websocket?wrapper_key=c56d60cafbb10910b78b25d8f27f20b96b1f722eac54aec24cc3aa8439cceae4", host: "(MY DOMAIN)" 2017/08/16 21:45:33 [error] 23270#23270: 2800 connect() failed (111: Connection refused) while connecting to upstream, client: 116.126.55.154, server: (MY DOMAIN), request: "GET /Websocket?wrapper_key=c56d60cafbb10910b78b25d8f27f20b96b1f722eac54aec24cc3aa8439cceae4 HTTP/1.1", upstream: "http://(MY SERVER IP):43110/Websocket?wrapper_key=c56d60cafbb10910b78b25d8f27f20b96b1f722eac54aec24cc3aa8439cceae4", host: "(MY DOMAIN)" 2017/08/16 21:45:44 [error] 23270#23270: 2802 connect() failed (111: Connection refused) while connecting to upstream, client: 116.126.55.154, server: (MY DOMAIN), request: "GET /Websocket?wrapper_key=c56d60cafbb10910b78b25d8f27f20b96b1f722eac54aec24cc3aa8439cceae4 HTTP/1.1", upstream: "http://(MY SERVER IP):43110/Websocket?wrapper_key=c56d60cafbb10910b78b25d8f27f20b96b1f722eac54aec24cc3aa8439cceae4", host: "(MY DOMAIN)" 2017/08/16 21:47:40 [error] 23270#23270: 2828 connect() failed (111: Connection refused) while connecting to upstream, client: 116.126.55.154, server: (MY DOMAIN), request: "GET /Websocket?wrapper_key=c56d60cafbb10910b78b25d8f27f20b96b1f722eac54aec24cc3aa8439cceae4 HTTP/1.1", upstream: "http://(MY SERVER IP):43110/Websocket?wrapper_key=c56d60cafbb10910b78b25d8f27f20b96b1f722eac54aec24cc3aa8439cceae4", host: "(MY DOMAIN)" 2017/08/16 21:47:51 [error] 23270#23270: 2830 connect() failed (111: Connection refused) while connecting to upstream, client: 116.126.55.154, server: (MY DOMAIN), request: "GET /Websocket?wrapper_key=c56d60cafbb10910b78b25d8f27f20b96b1f722eac54aec24cc3aa8439cceae4 HTTP/1.1", upstream: "http://(MY SERVER IP):43110/Websocket?wrapper_key=c56d60cafbb10910b78b25d8f27f20b96b1f722eac54aec24cc3aa8439cceae4", host: "(MY DOMAIN)" 2017/08/16 21:48:02 [error] 23270#23270: 2834 connect() failed (111: Connection refused) while connecting to upstream, client: 116.126.55.154, server: (MY DOMAIN), request: "GET /Websocket?wrapper_key=c56d60cafbb10910b78b25d8f27f20b96b1f722eac54aec24cc3aa8439cceae4 HTTP/1.1", upstream: "http://(MY SERVER IP):43110/Websocket?wrapper_key=c56d60cafbb10910b78b25d8f27f20b96b1f722eac54aec24cc3aa8439cceae4", host: "(MY DOMAIN)" 2017/08/16 21:48:24 [error] 23270#23270: 2840 connect() failed (111: Connection refused) while connecting to upstream, client: 116.126.55.154, server: (MY DOMAIN), request: "GET /Websocket?wrapper_key=c56d60cafbb10910b78b25d8f27f20b96b1f722eac54aec24cc3aa8439cceae4 HTTP/1.1", upstream: "http://(MY SERVER IP):43110/Websocket?wrapper_key=c56d60cafbb10910b78b25d8f27f20b96b1f722eac54aec24cc3aa8439cceae4", host: "(MY DOMAIN)" #

HelloZeroNet commented 7 years ago

Is there any error in zeronet log/debug.log file? you can try adding proxy_read_timeout 1h; #for long live websocket connetion to websocket connection settings

AnimeAnimeAnimeAnimeAnime commented 7 years ago

It still doesn't work

I looked up debug.log, and I can find 'invalid host: (my ip)

Is there a way to assign two ui_hosts?

AnimeAnimeAnimeAnimeAnime commented 7 years ago

oh I configured zeronet.conf but it still doesn't work and What is 'VerifyError: sites too large' and 'Ui UiServer : No user found'?

HelloZeroNet commented 7 years ago

'VerifyError: sites too large' happens if one of the sites you seeding is ran out of limit (you can increase it using the web interface) 'Ui UiServer : No user found' is trickier. Have you enabled the Multiuser plugin? Is there anything in data/users.json?

Hypeouseaus commented 7 years ago

Have you enabled the Multiuser plugin?

root@imageboard:/var/ZeroNet-master/plugins# ls AnnounceZero disabled-Bootstrapper disabled-StemPort FilePack Mute PeerDb TranslateSite Cors disabled-Dnschain disabled-UiPassword MergerSite Newsfeed Sidebar Trayicon CryptMessage disabled-DonationMessage disabled-Zeroname-local Multiuser OptionalManager Stats Zeroname

Yes.

Is there anything in data/users.json?

{ "(censored)": { "certs": {}, "master_seed": "**", "sites": { "(censored)": { "auth_address": "(censored)", "auth_privatekey": "(censored)" } } }

Yes.

ghost commented 7 years ago

@Hypeouseaus Just to make sure you know, you are showing your private key for ZeroName.

Hypeouseaus commented 7 years ago

@krixano thanks

liyafe1997 commented 7 years ago

I also have this problem in ZeroNet 0.6.0 with nginx 1.4.7, with https connection. I enabled mutiluser plugin and uipassword.