Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade from 1.3.11 to 1.4.3 fails #65

Open
skjnldsv opened this issue Mar 9, 2022 · 6 comments
Open

Upgrade from 1.3.11 to 1.4.3 fails #65

skjnldsv opened this issue Mar 9, 2022 · 6 comments

Comments

@skjnldsv
Copy link

skjnldsv commented Mar 9, 2022

Hi, I haven't updated the image in a while, and it recently started to fail.
I haven't changed my config in like a year. 1.3.11 works fine

I see multiple worrying issues in the log after: addgroup: gid '100' in use and adduser: unknown group unms
Then I think lots of those issues comes down to the unms user not existing ? 🤔

Config

version: "3.7"

services:
  app:
    image: nico640/docker-unms:1.4.3

    networks:
      - proxy
    ports:
      # Web ui
      - 8443
      # Wss
      - 9443
      # Netflow
      - 2055:2055/udp

    environment:
      - TZ=Europe/Paris

      # Unraid nobody/users
      - PGID=100
      - PUID=99
      
      # UNMS configs
      - PUBLIC_HTTPS_PORT=443
      - PUBLIC_WS_PORT=443
      - HTTPS_PORT=8443
      - WS_PORT=9443

    volumes:
      - /mnt/docker/volumes/unms:/config

    deploy:
      mode: replicated
      replicas: 1

      placement:
        constraints:
          - node.role == worker

      restart_policy:
        condition: on-failure
        delay: 5s
        max_attempts: 3
        window: 120s

      resources:
        limits:
          cpus: '1'
          memory: 1024M
        reservations:
          cpus: '0.25'
          memory: 256M

      labels:
        traefik.enable: "true"
        traefik.http.routers.unms.rule: Host(`xxxxxx.xxxxxx.com`)
        traefik.http.routers.unms.entrypoints: websecure
        traefik.http.routers.unms.tls.certresolver: letsencryptresolver
        traefik.http.routers.unms.service: unms
        # fake value https://github.com/containous/traefik/issues/5732
        traefik.http.services.unms.loadbalancer.server.port: 443
        traefik.http.services.unms.loadbalancer.server.scheme: https

        # Websockets
        traefik.http.routers.unms-wss.rule: Host(`xxxxxx.xxxxxx.com`)
        traefik.http.routers.unms-wss.entrypoints: websocket
        traefik.http.routers.unms-wss.tls.certresolver: letsencryptresolver
        traefik.http.routers.unms-wss.service: unms-wss
        # fake value https://github.com/containous/traefik/issues/5732
        traefik.http.services.unms-wss.loadbalancer.server.port: 9443
        traefik.http.services.unms-wss.loadbalancer.server.scheme: wss



networks:
  proxy:
    external: true
unms_app.1.rgznmmxztdc4@srv2    | [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
unms_app.1.rgznmmxztdc4@srv2    | [s6-init] ensuring user provided files have correct perms...exited 0.
unms_app.1.rgznmmxztdc4@srv2    | [fix-attrs.d] applying ownership & permissions fixes...
unms_app.1.rgznmmxztdc4@srv2    | [fix-attrs.d] done.
unms_app.1.rgznmmxztdc4@srv2    | [cont-init.d] executing container initialization scripts...
unms_app.1.rgznmmxztdc4@srv2    | [cont-init.d] 10-set-timezone: executing... 
unms_app.1.rgznmmxztdc4@srv2    | [cont-init.d] 10-set-timezone: exited 0.
unms_app.1.rgznmmxztdc4@srv2    | [cont-init.d] 20-adduser: executing... 
unms_app.1.rgznmmxztdc4@srv2    | addgroup: gid '100' in use
unms_app.1.rgznmmxztdc4@srv2    | adduser: unknown group unms
unms_app.1.rgznmmxztdc4@srv2    | id: ‘unms’: no such user: Invalid argument
unms_app.1.rgznmmxztdc4@srv2    | id: ‘unms’: no such user: Invalid argument
unms_app.1.rgznmmxztdc4@srv2    | 
unms_app.1.rgznmmxztdc4@srv2    | -------------------------------------
unms_app.1.rgznmmxztdc4@srv2    | GID/UID
unms_app.1.rgznmmxztdc4@srv2    | -------------------------------------
unms_app.1.rgznmmxztdc4@srv2    | User uid:    
unms_app.1.rgznmmxztdc4@srv2    | User gid:    
unms_app.1.rgznmmxztdc4@srv2    | -------------------------------------
unms_app.1.rgznmmxztdc4@srv2    | 
unms_app.1.rgznmmxztdc4@srv2    | [cont-init.d] 20-adduser: exited 0.
unms_app.1.rgznmmxztdc4@srv2    | [cont-init.d] 30-prepare: executing... 
unms_app.1.rgznmmxztdc4@srv2    | [cont-init.d] 30-prepare: exited 0.
unms_app.1.rgznmmxztdc4@srv2    | [cont-init.d] 40-permissions: executing... 
unms_app.1.rgznmmxztdc4@srv2    | chown: invalid user: ‘unms:unms’
unms_app.1.rgznmmxztdc4@srv2    | chown: invalid user: ‘unms:unms’
unms_app.1.rgznmmxztdc4@srv2    | chown: invalid user: ‘unms:unms’
unms_app.1.rgznmmxztdc4@srv2    | chown: invalid user: ‘unms:unms’
unms_app.1.rgznmmxztdc4@srv2    | chown: invalid user: ‘unms:unms’
unms_app.1.rgznmmxztdc4@srv2    | chown: invalid user: ‘unms:unms’
unms_app.1.rgznmmxztdc4@srv2    | [cont-init.d] 40-permissions: exited 0.
unms_app.1.rgznmmxztdc4@srv2    | [cont-init.d] 50-postgres: executing... 
unms_app.1.rgznmmxztdc4@srv2    | chown: invalid user: ‘unms:unms’
unms_app.1.rgznmmxztdc4@srv2    | Database already configured
unms_app.1.rgznmmxztdc4@srv2    | [cont-init.d] 50-postgres: exited 0.
unms_app.1.rgznmmxztdc4@srv2    | [cont-init.d] done.
unms_app.1.rgznmmxztdc4@srv2    | [services.d] starting services
unms_app.1.rgznmmxztdc4@srv2    | Waiting for rabbitmq to start...
unms_app.1.rgznmmxztdc4@srv2    | Starting nginx...
unms_app.1.rgznmmxztdc4@srv2    | Running entrypoint.sh
unms_app.1.rgznmmxztdc4@srv2    | Creating user unms with UID 1000
unms_app.1.rgznmmxztdc4@srv2    | Starting rabbitmq-server...
unms_app.1.rgznmmxztdc4@srv2    | Starting siridb-server...
unms_app.1.rgznmmxztdc4@srv2    | adduser: uid '1000' in use
unms_app.1.rgznmmxztdc4@srv2    | s6-envuidgid: fatal: unknown user: unms
unms_app.1.rgznmmxztdc4@srv2    | chown: invalid user: ‘unms:unms’
unms_app.1.rgznmmxztdc4@srv2    | [services.d] done.
unms_app.1.rgznmmxztdc4@srv2    | /tmp:5432 - no response
unms_app.1.rgznmmxztdc4@srv2    | Waiting for postgres to come up...
unms_app.1.rgznmmxztdc4@srv2    | Starting postgres...
unms_app.1.rgznmmxztdc4@srv2    | /tmp:5432 - no response
unms_app.1.rgznmmxztdc4@srv2    | Waiting for postgres to come up...
unms_app.1.rgznmmxztdc4@srv2    | postgres 9.6 detected, starting migration
unms_app.1.rgznmmxztdc4@srv2    | unpacking postgres 9.6 and dependencies
unms_app.1.rgznmmxztdc4@srv2    | usr/bin/
unms_app.1.rgznmmxztdc4@srv2    | usr/bin/pg_receivexlog
unms_app.1.rgznmmxztdc4@srv2    | usr/bin/pg_archivecleanup
unms_app.1.rgznmmxztdc4@srv2    | usr/bin/postmaster
unms_app.1.rgznmmxztdc4@srv2    | usr/bin/pg_basebackup
unms_app.1.rgznmmxztdc4@srv2    | usr/bin/postgres
unms_app.1.rgznmmxztdc4@srv2    | usr/bin/clusterdb
unms_app.1.rgznmmxztdc4@srv2    | usr/bin/pg_ctl
unms_app.1.rgznmmxztdc4@srv2    | usr/bin/pg_dump
unms_app.1.rgznmmxztdc4@srv2    | usr/bin/initdb
unms_app.1.rgznmmxztdc4@srv2    | usr/bin/dropuser
unms_app.1.rgznmmxztdc4@srv2    | usr/bin/pg_rewind
unms_app.1.rgznmmxztdc4@srv2    | usr/bin/pg_isready
unms_app.1.rgznmmxztdc4@srv2    | usr/bin/pg_xlogdump
unms_app.1.rgznmmxztdc4@srv2    | usr/bin/createuser
unms_app.1.rgznmmxztdc4@srv2    | usr/bin/pg_recvlogical
unms_app.1.rgznmmxztdc4@srv2    | usr/bin/pg_test_timing
unms_app.1.rgznmmxztdc4@srv2    | usr/bin/droplang
unms_app.1.rgznmmxztdc4@srv2    | usr/bin/pg_upgrade
unms_app.1.rgznmmxztdc4@srv2    | usr/bin/reindexdb
unms_app.1.rgznmmxztdc4@srv2    | usr/bin/pg_test_fsync
unms_app.1.rgznmmxztdc4@srv2    | usr/bin/pg_controldata
unms_app.1.rgznmmxztdc4@srv2    | usr/bin/vacuumdb
unms_app.1.rgznmmxztdc4@srv2    | usr/bin/pg_resetxlog
unms_app.1.rgznmmxztdc4@srv2    | usr/bin/pg_dumpall
unms_app.1.rgznmmxztdc4@srv2    | usr/bin/createdb
unms_app.1.rgznmmxztdc4@srv2    | usr/bin/createlang
unms_app.1.rgznmmxztdc4@srv2    | usr/bin/pg_restore
unms_app.1.rgznmmxztdc4@srv2    | usr/bin/dropdb
unms_app.1.rgznmmxztdc4@srv2    | usr/bin/pgbench
unms_app.1.rgznmmxztdc4@srv2    | usr/lib/
unms_app.1.rgznmmxztdc4@srv2    | usr/lib/postgresql/
**** LOG SHORTENED ****
unms_app.1.rgznmmxztdc4@srv2    | lib/
unms_app.1.rgznmmxztdc4@srv2    | lib/libcrypto.so.41.0.1
unms_app.1.rgznmmxztdc4@srv2    | lib/libcrypto.so.41
unms_app.1.rgznmmxztdc4@srv2    | lib/
unms_app.1.rgznmmxztdc4@srv2    | lib/libssl.so.43.0.2
unms_app.1.rgznmmxztdc4@srv2    | s6-envuidgid: fatal: unknown user: unms
unms_app.1.rgznmmxztdc4@srv2    | lib/libssl.so.43
unms_app.1.rgznmmxztdc4@srv2    | files unpacked, running migration script
unms_app.1.rgznmmxztdc4@srv2    | ERROR: MIGRATION FAILED!
unms_app.1.rgznmmxztdc4@srv2    | IF THIS FAILS AGAIN PLEASE EXAMINE UPGRADE LOGS AT /config/postgres
unms_app.1.rgznmmxztdc4@srv2    | cleaning up failed migration attempt
unms_app.1.rgznmmxztdc4@srv2    | mv: cannot stat '/config/postgres/data_old/*': No such file or directory
unms_app.1.rgznmmxztdc4@srv2    | trying to start postgres anyways
unms_app.1.rgznmmxztdc4@srv2    | s6-envuidgid: fatal: unknown user: unms
@Nico640
Copy link
Owner

Nico640 commented Mar 9, 2022

Support for the PGID and PUID environment variables was actually just added with the release of 1.4.2. I guess that these variables had no effect before 1.4.2 and are now causing problems, because it tries to create a group with id 100. The issue is that this id is actually in use by the users group, which means it cannot create the group. Try to either remove these enviroment variables or set them to something different (shouldn't be an issue because they had no effect on 1.3.11 anyway). You might need to restore a backup if it doesnt't work after that, because it could have borked the database migration. If you don't create backups on your own, you can use the backups created by UISP that are stored in /config/unms/unms-backups/backups/

I'll try to fix this for the next release by checking if the id's are in use before trying to create the user and group.

@lifeboy
Copy link

lifeboy commented May 16, 2022

For those not that versed in the internals, could you write a comment please on how to actually achieve this upgrade? I'm trying to get from 1.2.7 to 1.4.4 and it fails for the same reason I suppose. I'm well versed in Linux, but not the internals of UNMS.

@lifeboy
Copy link

lifeboy commented May 16, 2022

I have since found the command line upgrade instruction:

curl -fsSL https://uisp.ui.com/v1/install > /tmp/uisp_inst.sh && sudo bash /tmp/uisp_inst.sh --update
branch=master
version=1.4.4
Downloading installation package for version 1.4.4.
Restoring previous configuration
Setting WS_PORT=
Setting PROXY_WS_PORT=
Reading configuration file /home/unms/app/unms.conf
Setting VERSION=1.4.4
Distribution: 'ubuntu 18.04'
ERROR: Cannot update to version 1.4.4. Current version 1.2.7 is too old. Please update to 1.3.0 with
    'sudo /home/unms/app/unms-cli update --version 1.3.0'

It would be really great if the GUI would actually inform the user that's doing the upgrade about this :-o Especially since the GUI upgrade it the official way.

@Nico640
Copy link
Owner

Nico640 commented May 16, 2022

Hello @lifeboy, I'm not sure if you are using this docker container image? This repository is not for the official UISP, but rather for a 3rd party docker image for running UISP in a single container.

If you are using this image and therefore not the official way of installing UISP, you will need to stop the UISP container, remove it, pull the new image and then create a new container (make sure to use the same /config path as before), which may look like this:

docker stop unms
docker rm unms
docker pull nico640/docker-unms:latest
docker run -d --name unms -p 80:80 -p 443:443 -p 2055:2055/udp -v </path/to/config>:/config nico640/docker-unms:latest

However, if you are using the official way of installing UISP, which you seem to be doing, you will need to upgrade to 1.3.X first before upgrading to 1.4.X, because the upgrade script no longer allows you to skip major versions, but only minor versions.
Basically, you have to execute the command shown in the error you posted:

sudo /home/unms/app/unms-cli update --version 1.3.0

after upgrading to 1.3.X, you should be able to upgrade to 1.4.X using the GUI (or by executing the command you posted).

@jozefrebjak
Copy link

Hi, I haven't updated the image in a while, and it recently started to fail. I haven't changed my config in like a year. 1.3.11 works fine

I see multiple worrying issues in the log after: addgroup: gid '100' in use and adduser: unknown group unms Then I think lots of those issues comes down to the unms user not existing ? 🤔

Config

version: "3.7"

services:
  app:
    image: nico640/docker-unms:1.4.3

    networks:
      - proxy
    ports:
      # Web ui
      - 8443
      # Wss
      - 9443
      # Netflow
      - 2055:2055/udp

    environment:
      - TZ=Europe/Paris

      # Unraid nobody/users
      - PGID=100
      - PUID=99
      
      # UNMS configs
      - PUBLIC_HTTPS_PORT=443
      - PUBLIC_WS_PORT=443
      - HTTPS_PORT=8443
      - WS_PORT=9443

    volumes:
      - /mnt/docker/volumes/unms:/config

    deploy:
      mode: replicated
      replicas: 1

      placement:
        constraints:
          - node.role == worker

      restart_policy:
        condition: on-failure
        delay: 5s
        max_attempts: 3
        window: 120s

      resources:
        limits:
          cpus: '1'
          memory: 1024M
        reservations:
          cpus: '0.25'
          memory: 256M

      labels:
        traefik.enable: "true"
        traefik.http.routers.unms.rule: Host(`xxxxxx.xxxxxx.com`)
        traefik.http.routers.unms.entrypoints: websecure
        traefik.http.routers.unms.tls.certresolver: letsencryptresolver
        traefik.http.routers.unms.service: unms
        # fake value https://github.com/containous/traefik/issues/5732
        traefik.http.services.unms.loadbalancer.server.port: 443
        traefik.http.services.unms.loadbalancer.server.scheme: https

        # Websockets
        traefik.http.routers.unms-wss.rule: Host(`xxxxxx.xxxxxx.com`)
        traefik.http.routers.unms-wss.entrypoints: websocket
        traefik.http.routers.unms-wss.tls.certresolver: letsencryptresolver
        traefik.http.routers.unms-wss.service: unms-wss
        # fake value https://github.com/containous/traefik/issues/5732
        traefik.http.services.unms-wss.loadbalancer.server.port: 9443
        traefik.http.services.unms-wss.loadbalancer.server.scheme: wss



networks:
  proxy:
    external: true
unms_app.1.rgznmmxztdc4@srv2    | [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
unms_app.1.rgznmmxztdc4@srv2    | [s6-init] ensuring user provided files have correct perms...exited 0.
unms_app.1.rgznmmxztdc4@srv2    | [fix-attrs.d] applying ownership & permissions fixes...
unms_app.1.rgznmmxztdc4@srv2    | [fix-attrs.d] done.
unms_app.1.rgznmmxztdc4@srv2    | [cont-init.d] executing container initialization scripts...
unms_app.1.rgznmmxztdc4@srv2    | [cont-init.d] 10-set-timezone: executing... 
unms_app.1.rgznmmxztdc4@srv2    | [cont-init.d] 10-set-timezone: exited 0.
unms_app.1.rgznmmxztdc4@srv2    | [cont-init.d] 20-adduser: executing... 
unms_app.1.rgznmmxztdc4@srv2    | addgroup: gid '100' in use
unms_app.1.rgznmmxztdc4@srv2    | adduser: unknown group unms
unms_app.1.rgznmmxztdc4@srv2    | id: ‘unms’: no such user: Invalid argument
unms_app.1.rgznmmxztdc4@srv2    | id: ‘unms’: no such user: Invalid argument
unms_app.1.rgznmmxztdc4@srv2    | 
unms_app.1.rgznmmxztdc4@srv2    | -------------------------------------
unms_app.1.rgznmmxztdc4@srv2    | GID/UID
unms_app.1.rgznmmxztdc4@srv2    | -------------------------------------
unms_app.1.rgznmmxztdc4@srv2    | User uid:    
unms_app.1.rgznmmxztdc4@srv2    | User gid:    
unms_app.1.rgznmmxztdc4@srv2    | -------------------------------------
unms_app.1.rgznmmxztdc4@srv2    | 
unms_app.1.rgznmmxztdc4@srv2    | [cont-init.d] 20-adduser: exited 0.
unms_app.1.rgznmmxztdc4@srv2    | [cont-init.d] 30-prepare: executing... 
unms_app.1.rgznmmxztdc4@srv2    | [cont-init.d] 30-prepare: exited 0.
unms_app.1.rgznmmxztdc4@srv2    | [cont-init.d] 40-permissions: executing... 
unms_app.1.rgznmmxztdc4@srv2    | chown: invalid user: ‘unms:unms’
unms_app.1.rgznmmxztdc4@srv2    | chown: invalid user: ‘unms:unms’
unms_app.1.rgznmmxztdc4@srv2    | chown: invalid user: ‘unms:unms’
unms_app.1.rgznmmxztdc4@srv2    | chown: invalid user: ‘unms:unms’
unms_app.1.rgznmmxztdc4@srv2    | chown: invalid user: ‘unms:unms’
unms_app.1.rgznmmxztdc4@srv2    | chown: invalid user: ‘unms:unms’
unms_app.1.rgznmmxztdc4@srv2    | [cont-init.d] 40-permissions: exited 0.
unms_app.1.rgznmmxztdc4@srv2    | [cont-init.d] 50-postgres: executing... 
unms_app.1.rgznmmxztdc4@srv2    | chown: invalid user: ‘unms:unms’
unms_app.1.rgznmmxztdc4@srv2    | Database already configured
unms_app.1.rgznmmxztdc4@srv2    | [cont-init.d] 50-postgres: exited 0.
unms_app.1.rgznmmxztdc4@srv2    | [cont-init.d] done.
unms_app.1.rgznmmxztdc4@srv2    | [services.d] starting services
unms_app.1.rgznmmxztdc4@srv2    | Waiting for rabbitmq to start...
unms_app.1.rgznmmxztdc4@srv2    | Starting nginx...
unms_app.1.rgznmmxztdc4@srv2    | Running entrypoint.sh
unms_app.1.rgznmmxztdc4@srv2    | Creating user unms with UID 1000
unms_app.1.rgznmmxztdc4@srv2    | Starting rabbitmq-server...
unms_app.1.rgznmmxztdc4@srv2    | Starting siridb-server...
unms_app.1.rgznmmxztdc4@srv2    | adduser: uid '1000' in use
unms_app.1.rgznmmxztdc4@srv2    | s6-envuidgid: fatal: unknown user: unms
unms_app.1.rgznmmxztdc4@srv2    | chown: invalid user: ‘unms:unms’
unms_app.1.rgznmmxztdc4@srv2    | [services.d] done.
unms_app.1.rgznmmxztdc4@srv2    | /tmp:5432 - no response
unms_app.1.rgznmmxztdc4@srv2    | Waiting for postgres to come up...
unms_app.1.rgznmmxztdc4@srv2    | Starting postgres...
unms_app.1.rgznmmxztdc4@srv2    | /tmp:5432 - no response
unms_app.1.rgznmmxztdc4@srv2    | Waiting for postgres to come up...
unms_app.1.rgznmmxztdc4@srv2    | postgres 9.6 detected, starting migration
unms_app.1.rgznmmxztdc4@srv2    | unpacking postgres 9.6 and dependencies
unms_app.1.rgznmmxztdc4@srv2    | usr/bin/
unms_app.1.rgznmmxztdc4@srv2    | usr/bin/pg_receivexlog
unms_app.1.rgznmmxztdc4@srv2    | usr/bin/pg_archivecleanup
unms_app.1.rgznmmxztdc4@srv2    | usr/bin/postmaster
unms_app.1.rgznmmxztdc4@srv2    | usr/bin/pg_basebackup
unms_app.1.rgznmmxztdc4@srv2    | usr/bin/postgres
unms_app.1.rgznmmxztdc4@srv2    | usr/bin/clusterdb
unms_app.1.rgznmmxztdc4@srv2    | usr/bin/pg_ctl
unms_app.1.rgznmmxztdc4@srv2    | usr/bin/pg_dump
unms_app.1.rgznmmxztdc4@srv2    | usr/bin/initdb
unms_app.1.rgznmmxztdc4@srv2    | usr/bin/dropuser
unms_app.1.rgznmmxztdc4@srv2    | usr/bin/pg_rewind
unms_app.1.rgznmmxztdc4@srv2    | usr/bin/pg_isready
unms_app.1.rgznmmxztdc4@srv2    | usr/bin/pg_xlogdump
unms_app.1.rgznmmxztdc4@srv2    | usr/bin/createuser
unms_app.1.rgznmmxztdc4@srv2    | usr/bin/pg_recvlogical
unms_app.1.rgznmmxztdc4@srv2    | usr/bin/pg_test_timing
unms_app.1.rgznmmxztdc4@srv2    | usr/bin/droplang
unms_app.1.rgznmmxztdc4@srv2    | usr/bin/pg_upgrade
unms_app.1.rgznmmxztdc4@srv2    | usr/bin/reindexdb
unms_app.1.rgznmmxztdc4@srv2    | usr/bin/pg_test_fsync
unms_app.1.rgznmmxztdc4@srv2    | usr/bin/pg_controldata
unms_app.1.rgznmmxztdc4@srv2    | usr/bin/vacuumdb
unms_app.1.rgznmmxztdc4@srv2    | usr/bin/pg_resetxlog
unms_app.1.rgznmmxztdc4@srv2    | usr/bin/pg_dumpall
unms_app.1.rgznmmxztdc4@srv2    | usr/bin/createdb
unms_app.1.rgznmmxztdc4@srv2    | usr/bin/createlang
unms_app.1.rgznmmxztdc4@srv2    | usr/bin/pg_restore
unms_app.1.rgznmmxztdc4@srv2    | usr/bin/dropdb
unms_app.1.rgznmmxztdc4@srv2    | usr/bin/pgbench
unms_app.1.rgznmmxztdc4@srv2    | usr/lib/
unms_app.1.rgznmmxztdc4@srv2    | usr/lib/postgresql/
**** LOG SHORTENED ****
unms_app.1.rgznmmxztdc4@srv2    | lib/
unms_app.1.rgznmmxztdc4@srv2    | lib/libcrypto.so.41.0.1
unms_app.1.rgznmmxztdc4@srv2    | lib/libcrypto.so.41
unms_app.1.rgznmmxztdc4@srv2    | lib/
unms_app.1.rgznmmxztdc4@srv2    | lib/libssl.so.43.0.2
unms_app.1.rgznmmxztdc4@srv2    | s6-envuidgid: fatal: unknown user: unms
unms_app.1.rgznmmxztdc4@srv2    | lib/libssl.so.43
unms_app.1.rgznmmxztdc4@srv2    | files unpacked, running migration script
unms_app.1.rgznmmxztdc4@srv2    | ERROR: MIGRATION FAILED!
unms_app.1.rgznmmxztdc4@srv2    | IF THIS FAILS AGAIN PLEASE EXAMINE UPGRADE LOGS AT /config/postgres
unms_app.1.rgznmmxztdc4@srv2    | cleaning up failed migration attempt
unms_app.1.rgznmmxztdc4@srv2    | mv: cannot stat '/config/postgres/data_old/*': No such file or directory
unms_app.1.rgznmmxztdc4@srv2    | trying to start postgres anyways
unms_app.1.rgznmmxztdc4@srv2    | s6-envuidgid: fatal: unknown user: unms

@skjnldsv Hello, please can you share your Traefik config for UISP, I have a problem to setup wss, thanks.

@skjnldsv
Copy link
Author

@jozefrebjak

traefik

version: "3.7"

services:
  proxy:
    # The official v2 Traefik docker image
    image: traefik:v2.8

    ports:
      # Bind to host, advanced syntax to get real IPs
      - target: 80
        published: 80
        mode: host
      - target: 443
        published: 443
        mode: host
      - target: 9000
        published: 9000
        mode: host

    command:
      # Enables the web UI and tells Traefik to listen to docker
      - --api=true
      - --api.dashboard=true
      # Features
      - --accesslog=true
      # Debug mode
      # - --api.debug=true
      # - --log.level=DEBUG
      # Define providers
      - --providers.docker=true
      - --providers.docker.swarmMode=true
      - --providers.docker.exposedbydefault=false
      - --providers.docker.network=proxy
      - --providers.file.directory=/etc/traefik/conf.d
      - --providers.file.watch=true
      # Allow internal self signed cert
      - --serversTransport.insecureSkipVerify=true
      # Define default ports
      - --entrypoints.web.address=:80
      - --entrypoints.websecure.address=:443
      - --entrypoints.websocket.address=:9000
      # Register letsencrypt resolver
      - --certificatesResolvers.letsencryptresolver.acme.tlsChallenge=true
      - --certificatesresolvers.letsencryptresolver.acme.email=skjnldsv@xxxxxxxx.xx
      - --certificatesResolvers.letsencryptresolver.acme.storage=/letsencrypt/acme.json
 
...

docker-unms

version: "3.7"

services:
  app:
    image: nico640/docker-unms:latest

    networks:
      - proxy
    ports:
      # Web ui + Websocket
      - 443
      # Netflow
      - 2055:2055/udp

    environment:
      - TZ=Europe/Paris

    volumes:
      - /mnt/docker/volumes/unms:/config

    deploy:
      mode: replicated
      replicas: 1

      placement:
        constraints:
          - node.role == worker

      restart_policy:
        condition: on-failure
        delay: 5s
        max_attempts: 3
        window: 120s

      resources:
        limits:
          cpus: '1'
          memory: 1024M
        reservations:
          cpus: '0.25'
          memory: 256M

      labels:
        traefik.enable: "true"
        traefik.http.routers.unms.rule: Host(`xxxx.xxxxxx.com`)
        traefik.http.routers.unms.entrypoints: websecure
        traefik.http.routers.unms.tls.certresolver: letsencryptresolver
        traefik.http.routers.unms.service: unms
        # fake value https://github.com/containous/traefik/issues/5732
        traefik.http.services.unms.loadbalancer.server.port: 443
        traefik.http.services.unms.loadbalancer.server.scheme: https

networks:
  proxy:
    external: true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants