nurdism / neko

A self hosted virtual browser (rabb.it clone) that runs in docker.
Apache License 2.0
2.03k stars 185 forks source link

[BUG] #35

Closed TiredSysOp closed 4 years ago

TiredSysOp commented 4 years ago

Describe the bug Some users are disconnecting and reconnecting roughly every 30 seconds, Looks like web rtc timing out?

To Reproduce Not found what the variables are yet, still looking into it

Desktop (please complete the following information):

Additional context neko_1 | 2020-02-14 06:05:08,773 DEBG 'neko' stdout output: neko_1 | 6:05AM WRN Failed to discover mDNS candidate 0cf86ee2-3e3c-44ad-8bb1-6f6b8b727b53.local: mDNS: connection is closed module=webrtc subsystem=ice neko_1 | 6:05AM INF ICE connection state changed: connected module=webrtc subsystem=pc neko_1 | 6:05AM WRN Failed to discover mDNS candidate 0cf86ee2-3e3c-44ad-8bb1-6f6b8b727b53.local: mDNS: connection is closed module=webrtc subsystem=ice neko_1 | 6:05AM WRN Failed to discover mDNS candidate 0cf86ee2-3e3c-44ad-8bb1-6f6b8b727b53.local: mDNS: connection is closed module=webrtc subsystem=ice neko_1 | neko_1 | 2020-02-14 06:05:08,840 DEBG 'neko' stdout output: neko_1 | 6:05AM DBG recieved message from client module=websocket raw="{\"event\":\"identity/details\",\"username\":\"Raymond\"}" session=2vssABlRF_tE7VAQ898BxqATBqnKdEWi neko_1 | neko_1 | 2020-02-14 06:05:08,840 DEBG 'neko' stdout output: neko_1 | 6:05AM DBG session connected id=2vssABlRF_tE7VAQ898BxqATBqnKdEWi module=websocket neko_1 | neko_1 | 2020-02-14 06:05:08,991 DEBG 'neko' stdout output: neko_1 | 6:05AM INF peer connection state changed: connected module=webrtc subsystem=pc neko_1 | neko_1 | 2020-02-14 06:05:08,992 DEBG 'neko' stdout output: neko_1 | 6:05AM INF peer connected id=2vssABlRF_tE7VAQ898BxqATBqnKdEWi module=webrtc neko_1 | neko_1 | 2020-02-14 06:05:39,773 DEBG 'neko' stdout output: neko_1 | 6:05AM DBG read message error error="websocket: close 1006 (abnormal closure): unexpected EOF" module=websocket neko_1 | 6:05AM DBG handle socket ending address=86.8.202.52:20694 module=websocket neko_1 | neko_1 | 2020-02-14 06:05:39,774 DEBG 'neko' stdout output: neko_1 | 6:05AM DBG session ended address=86.8.202.52:20694 module=websocket session=2vssABlRF_tE7VAQ898BxqATBqnKdEWi

version: "2.0" services: neko: image: nurdism/neko:chromium environment: LANG: en_US.UTF-8 restart: always shm_size: "4gb" cap_add:

TiredSysOp commented 4 years ago

Running nginx in front seems to have alleviated the problem

vhost block:

server { listen 80; server_name example.coml;

location / {
    proxy_pass http://127.0.0.1:8080;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_read_timeout 600s;
    proxy_send_timeout 600s;
    proxy_connect_timeout 20s;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection upgrade;
    proxy_set_header Host $host;
}

location ~ /\. {
    deny all;
}

}