Hi there.
Based on the included dockerfile I have built XBrowserSync image on my RaspberryPi 3. It seemed to build properly.
However now when I try to run it behind the Nginx proxy (so not using Traefik) I keep getting:
502 Bad Gateway
and Nginx logs an error:
Nov 27 11:47:40 rpi3 nginx[258330]: 2020/11/27 11:47:40 [error] 258330#258330: *268 recv() failed (104: Unknown error) while reading response header from upstream, client: 192.168.1.1, server: xbsapi.domain.ltd, request: "GET / HTTP/2.0", upstream: "http://127.0.0.1:8082/", host: "xbsapi.domain.ltd"
I use docker-compose.yml as follows:
version: "3.7"
volumes:
xbs-db-data:
external: true
services:
db:
image: "mongo:4.2.6"
container_name: "xbs-db"
environment:
- "MONGO_INITDB_DATABASE=xbrowsersync"
- "MONGO_INITDB_ROOT_PASSWORD=$XBS_DB_PASSWORD"
- "MONGO_INITDB_ROOT_USERNAME=$XBS_DB_USERNAME"
restart: "always"
volumes:
- "xbs-db-data:/data/db"
- "./mongoconfig.js:/docker-entrypoint-initdb.d/mongoconfig.js"
api:
image: e6d3618beb73 # "local/xbrowsersync"
container_name: "xbs-api"
depends_on:
- "db"
environment:
- "XBROWSERSYNC_DB_PWD=$XBS_DB_PASSWORD"
- "XBROWSERSYNC_DB_USER=$XBS_DB_USERNAME"
ports:
- "8082:8080"
restart: "always"
volumes:
- "./settings.json:/usr/src/api/config/settings.json"
The e6d3618beb73 image hash is the reference to locally-built image for xbrowsersync/api, but built on ARM architecture.
Because I use Nginx on that "machine" natively (i.e. not with Docker) I have removed all Treafik stuff and redirected port 8080 from container to 8082 on host.
Containers (mongodb and xbrowsersync/api) start properly, they don't restart.
When trying to connect to the container bypassing the nginx, i.e. from within the host, I get "Connection reset by peer" error:
$ curl -vvv http://localhost:8082
* Trying ::1:8082...
* Connected to localhost (::1) port 8082 (#0)
> GET / HTTP/1.1
> Host: localhost:8082
> User-Agent: curl/7.73.0
> Accept: */*
>
* Recv failure: Connection reset by peer
* Closing connection 0
curl: (56) Recv failure: Connection reset by peer
However absolutely nothing is getting written to container logs, like there have been no requests at all. The last thing that gets logged is:
xbs-api | Provisioner finished.
I keep wondering where might be the cause of that unavailability. I doubt it is Nginx. Might it be the reason that image is not available for ARM officaly at hub.docker.com?
Is there anyone there who can help me? I'd love to self-host that solution on my low-energy RPI3 at home... :)
Hi there.
Based on the included
dockerfileI have built XBrowserSync image on my RaspberryPi 3. It seemed to build properly.However now when I try to run it behind the Nginx proxy (so not using Traefik) I keep getting:
and Nginx logs an error:
I use
docker-compose.ymlas follows:The
e6d3618beb73image hash is the reference to locally-built image forxbrowsersync/api, but built on ARM architecture.Because I use Nginx on that "machine" natively (i.e. not with Docker) I have removed all Treafik stuff and redirected port
8080from container to8082on host.Containers (
mongodbandxbrowsersync/api) start properly, they don't restart.When trying to connect to the container bypassing the nginx, i.e. from within the host, I get "Connection reset by peer" error:
However absolutely nothing is getting written to container logs, like there have been no requests at all. The last thing that gets logged is:
I keep wondering where might be the cause of that unavailability. I doubt it is Nginx. Might it be the reason that image is not available for ARM officaly at hub.docker.com?
Is there anyone there who can help me? I'd love to self-host that solution on my low-energy RPI3 at home... :)