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]Difficult to connect ... #29

Closed xiya233 closed 4 years ago

xiya233 commented 4 years ago

Thank you for maintaining this cool project but I encountered some problems and it seems difficult to connect...

My docker-compose configuration:

version: "2.0"
services:
  neko:
    image: nurdism/neko:chromium
    restart: always
    cap_add:
      - SYS_ADMIN
    ports:
      - "80:8080"
      - "59000-59100:59000-59100/udp"
    environment:
      DISPLAY: :99.0
      SCREEN_WIDTH: 1280
      SCREEN_HEIGHT: 720
      SCREEN_DEPTH: 24
      NEKO_PASSWORD: neko
      NEKO_ADMIN: admin
      NEKO_BIND: :8080

and

version: "2.0"
services:
  neko:
    image: nurdism/neko:firefox
    restart: always
    shm_size: "1gb"
    ports:
      - "80:8080"
      - "59000-59100:59000-59100/udp"
    environment:
      DISPLAY: :99.0
      SCREEN_WIDTH: 1280
      SCREEN_HEIGHT: 720
      SCREEN_DEPTH: 24
      NEKO_PASSWORD: neko
      NEKO_ADMIN: admin
      NEKO_BIND: :8080

It can connect in Firefox, but the connection is quickly disconnected. And it's almost impossible to connect in Chrome.

My Chrome version 80.0.3987.87 Firefox version 72.0.2

When using chrome, I will see in the browser

Client Log:

Disconnected:
connection timeout

Server Log:

neko_1  | 2020-02-07 15:12:52,962 DEBG 'neko' stdout output:
neko_1  | 3:12PM DBG session created id=Cntf3QtSoSFtRQTjWKTNJGvS5O4qTIEv module=webrtc
neko_1  | 3:12PM DBG session created id=Cntf3QtSoSFtRQTjWKTNJGvS5O4qTIEv module=websocket
neko_1  | 3:12PM DBG new connection created address=xxx.xxx.xxx.xxx:45302 module=websocket session=Cntf3QtSoSFtRQTjWKTNJGvS5O4qTIEv
neko_1  | 
neko_1  | 2020-02-07 15:13:07,749 DEBG 'neko' stdout output:
neko_1  | 3:13PM WRN read message error error="websocket: close 1005 (no status)" module=websocket
neko_1  | 3:13PM DBG handle socket ending address=xxx.xxx.xxx.xxx:45302 module=websocket

When using firefox, I will see in the browser

Client Log:

Disconnected:
peer disconnected

Server Log:

neko_1  | 3:23PM WRN Failed to accept RTP SessionSRTP has been closed 
neko_1  |  module=webrtc subsystem=pc
neko_1  | 3:23PM WRN Failed to accept RTCP SessionSRTCP has been closed 
neko_1  |  module=webrtc subsystem=pc
neko_1  | 3:23PM WRN Failed to start SCTP: association closed before connecting module=webrtc subsystem=pc
neko_1  | 3:23PM INF peer connection state changed: closed module=webrtc subsystem=pc
neko_1  | 3:23PM DBG session destroyed id=27ubJqTooyjgtND2mtwKV1_X-2-coW4J module=webrtc
neko_1  | 3:23PM DBG session destroyed id=27ubJqTooyjgtND2mtwKV1_X-2-coW4J module=websocket
neko_1  | 3:23PM INF ICE connection state changed: closed module=webrtc subsystem=pc

I have browsed this issue:

https://github.com/nurdism/neko/issues/15

I tried using:

network_mode: host

But to no avail, any solution? thank you

nurdism commented 4 years ago

Hi xiya233, thanks for submitting a bug report, seems this is related to #25 & #15 we are currently trying to figure out what is wrong.