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

[Help] - Trying to add multiple servers on same network #49

Closed SweetLouHD closed 4 years ago

SweetLouHD commented 4 years ago

Having issues deploying multiple servers on the same network. I have an ESXI servers with 4 VMs.

VM 1 is Windows 10 running WAMP, this is hosting the client. (We modified the login screen to allow choosing between the 3 servers) VM 2-4 are Ubuntu 18.04.4 LTS and run the docker container. I will post the docker-compose.yaml files below for each server.

UFW has been disabled on all 3 for testing.

I have also tried connecting locally on each machine and the local clients on VM 3 and 4 also have the same peer disconnected error message.

Room 1 runs on VM2 and works fine. (If I make the ports read 8080:8080, this stops working and experience timeout message. I am also adjusting port forwarding to account for this.) `version: "2.0" services: neko: image: nurdism/neko:firefox restart: always shm_size: "1gb" ports:

Room 3 runs on VM 4 and has the same issue as Room 2. `version: "2.0" services: neko: image: nurdism/neko:firefox restart: always shm_size: "1gb" ports:

GigaFyde commented 4 years ago

Related to #37

SweetLouHD commented 4 years ago

Can someone explain the difference between the 2 sets of ports. I have been messing around changing both sides and not getting clear results. Is it internal vs external ports or client vs server?

Example: 80:8080 59000-59100:59000-59100

GigaFyde commented 4 years ago

left side is external, right side is internal

nurdism commented 4 years ago

try adding NEKO_EPR: "59000-59100" to each instance

SweetLouHD commented 4 years ago

Is this new setting supposed to be the same for all servers? or should the ports match the new udp ports I am using on the other instances?

nurdism commented 4 years ago

Should match udp ports

SweetLouHD commented 4 years ago

Still no difference. I tried running on the same vm and separate vms. Room 1 continues to work as it was, but the 2nd room doesn't connect.

sudo docker run --name Neko-Room-1 -d -p 8080:8080 -p 59000-59100:59000-59100/udp -e NEKO_PASSWORD='neko' -e NEKO_ADMIN='admin' -e NEKO_BIND=':8080' -e NEKO_EPR='59000-59100' --shm-size=1gb --restart unless-stopped nurdism/neko:firefox

sudo docker run --name Neko-Room-2 -d -p 8081:8081 -p 59200-59300:59200-59300/udp -e NEKO_PASSWORD='neko' -e NEKO_ADMIN='admin' -e NEKO_BIND=':8081' -e NEKO_EPR='59200-59300' --shm-size=1gb --restart unless-stopped nurdism/neko:firefox

GigaFyde commented 4 years ago

I have tried the same approach in #56 , no luck either

m1k1o commented 4 years ago

I was struggling with same problem. Please check if you have latest version. It has not been new release since I fixed major error in EPR config in https://github.com/nurdism/neko/pull/43.

I see you are using docker from docker hub, where it has not been updated yet. If you want to fix problem in current version, just write port number in hexadecimal.

So instead of:

NEKO_EPR='59200-59300'

Write:

NEKO_EPR='E740-E7A4'

I hope @nurdism will release new version soon, so this problem will be solved once for all!

GigaFyde commented 4 years ago

Just tried your suggestion and I couldn't get it working @m1k1o

m1k1o commented 4 years ago

It sloved my problems. I am able to run more instances on one maschine with this docker-compose:

version: '3.4'
services:
  neko1:
    image: nurdism/neko:firefox
    container_name: neko1
    restart: unless-stopped
    shm_size: "1gb"
    environment:
      DISPLAY: :99.0
      NEKO_EPR: E740-E74F
    ports:
      - "8081:8080"
      - "59200-59215:59200-59215/udp"

  neko2:
    image: nurdism/neko:firefox
    container_name: neko2
    restart: unless-stopped
    shm_size: "1gb"
    environment:
      DISPLAY: :99.0
      NEKO_EPR: E750-E75F
    ports:
      - "8082:8080"
      - "59216-59231:59216-59231/udp"

@GigaFyde it will be likely problem in your docker run command. Send it here.

GigaFyde commented 4 years ago

Using your config does indeed also work for me. odd Well I guess that solves it for me

SweetLouHD commented 4 years ago

@m1k1o why are you only specifying 15 udp ports instead of the 100 I have seen in all the examples.

m1k1o commented 4 years ago

@SweetLouHD it's up to you how big pool you create. I'm not expecting many users. Per one user you need one port.

SweetLouHD commented 4 years ago

Makes sense, thanks @m1k1o that fixed my issue as well.