Swag is not working anymore
-
- OMV 6.x
- harold.mouras
-
-
It might be file permissions on the directory/files created by the container.
To see if you can get the container to run at all, edit the compose and use 0 (root) as the PUID.
Then redeploy the container (edit stack and redeploy) and post back the log
If you get it working using root, then we can make it safer after
Hello,
yes, as 0 with the PUID, that works. Should I let the 0 now or change something else ?
Thank you again,
Harold
-
You are in business. Good news.
I would not recommend that you run the container as root (PUID 0). This is easy to fix and will apply to other containers if/when you use them.
The problem is permissions/ownership of the folders/files that the container creates when it first runs. You just need to change the permissions recursively on your local swag config folder ( /srv/dev-disk-by-uuid-92231eb7-e8d7-49e4-8445-0aaa5c450b26/config/swag)
You can do this using winSCP (if you use windows) or from the cli (i.e. terminal via ssh). I would recommend you download and use winscp as it is a useful tool/application.
From the cli you will need to run (as root so using sudo) - see below.
Then update your stack and redeploy.
Good luck.
-
-
Thank you so much for everything
-
Code
Display Moreservices: swag: image: lscr.io/linuxserver/swag container_name: swag hostname: swag cap_add: - NET_ADMIN environment: - PUID=1000 - PGID=1000 - TZ=Europe/Paris - EMAIL=anothermail - URL=anotherdomain.duckdns.org - SUBDOMAINS=wildcard - VALIDATION=duckdns - DUCKDNSTOKEN=mytoken volumes: - /etc/localtime:/etc/localtime:ro - /appdata/swag:/config ports: - 444:444 restart: unless-stopped
I did forward the port 444 to 444 on the router. I can see the swag screen working.
How I did edit an heimdall stack like this :
Code
Display More--- services: heimdall: image: lscr.io/linuxserver/heimdall:latest container_name: heimdall environment: - PUID=1000 - PGID=1000 - TZ=Etc/UTC volumes: - /srv/dev-disk-by-uuid-a4573920-1223-409f-95b0-eb4903d28617/appdata/heimdall/config:/config ports: - 81:80 - 458:458 restart: unless-stopped
set up the heimdall.subdomain.conf under the proxy_confs subfolder of swag like this :
Code
Display Moreserver { listen 443 ssl; listen [::]:443 ssl; server_name heim.*; include /config/nginx/ssl.conf; client_max_body_size 0; include /config/nginx/proxy.conf; include /config/nginx/resolver.conf; set $upstream_app 192.168.0.12; set $upstream_port 81; set $upstream_proto https; proxy_pass $upstream_proto://$upstream_app:$upstream_port;
I can see the heimdall page at http://NAS-IP:81 but not by typing http://heim.anotherdomain.duckdns.org
I do not know what is not well set up.
Thanks,
Harold
-
All good.
Did you change folder owner to 1000 and the container is working?
With your setup you need to port forward 443 to 443 on ip 192.168.0.12
Also in your reverse proxy config I think there is a mistake. Try:
set $upstream_proto http;
-
-
Yes, I did change on the first OMV system with the swag problems. It works now perfectly.
My last message was about another OMV system (another PC).
Thanks
-
No worries.
If you have more than one swag docker on your network you will need to use a different port for swag and forward this to the other system
Also check/try the change
set $upstream_proto http;
-
I did change the line to http in the heimdall.subdomaine.conf file. Restarted the swag container.
Also as you see in the swag yml, I specified port 444:444 which also I did opened on the router.
-
-
I see now I am looking at your post on a computer (not on my iphone).
Setup looks ok I think but you need to use https not http for url.
-
Yes, but this adress is going to the swag screen
-
That indicates there is something wrong with your reverse proxy config file for heim. I don't use heim so I do not know to set it up.
Have you tested access from outside your network or are you doing your testing on the lan?
Do you have adguard or pihole on your network with any DNS re-write rules?
-
-
A couple of things that might help but not sure.
1. in your swag yaml I think you need to change your port mapping to 444:443 as the container is listening on 443 (not 444).
2. This is very minor and will not be the issue but in your heimall yaml you have 1000 as PGID and PUID. This is unusal.
-
You have also made some errors with your heimdall yaml. It would help if you read the docker docs.
You can't just change the container port inside your yaml as the container is 'built' using this port. so you need something like this - note I have only changed the host port and this is mapped to the container port that is not changed.
Then you need to continue with this logic into your reverse proxy config - see below. Note that I am using the https port/config.
so the connection url is https://heim.xxxx
Code
Display Moreserver { listen 443 ssl; listen [::]:443 ssl; server_name heim.*; include /config/nginx/ssl.conf; client_max_body_size 0; location / { include /config/nginx/proxy.conf; include /config/nginx/resolver.conf; set $upstream_app 192.168.0.12; set $upstream_port 458; set $upstream_proto https; proxy_pass $upstream_proto://$upstream_app:$upstream_port; } }
-
Hello again,
I have again the same problem. Thie Ip adress of my OMV system changed.
I deployed now swag as you adviced me some weeks ago with the compose included in OMV but this does not work.
I did formard the port 443 to 443 on my router with the UP adress of my OMV system.
What did I do wrong ?
Here is the my swag YML :
Code
Display More--- # https://github.com/linuxserver/docker-swag services: swag: image: lscr.io/linuxserver/swag:latest container_name: swag cap_add: - NET_ADMIN environment: - PUID=1000 - PGID=100 - TZ=Europe/Paris - EMAIL=hmouras@gmail.com - URL=my-domain - SUBDOMAINS=wildcard - VALIDATION=duckdns - DUCKDNSTOKEN=my-token volumes: - /srv/dev-disk-by-uuid-92231eb7-e8d7-49e4-8445-0aaa5c450b26/config/swag:/config ports: - 443:443 - 80:80 #optional restart: unless-stopped
The error message is :
Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C.UTF-8; export LANGUAGE=; docker compose --file '/srv/dev-disk-by-uuid-a4573920-1223-409f-95b0-eb4903d28617/containers/swag/swag.yml' --env-file '/srv/dev-disk-by-uuid-a4573920-1223-409f-95b0-eb4903d28617/containers/swag/swag.env' --env-file '/srv/dev-disk-by-uuid-a4573920-1223-409f-95b0-eb4903d28617/containers/global.env' up -d 2>&1': Container swag Starting
Error response from daemon: driver failed programming external connectivity on endpoint swag (e4d4793bcc276bae2586dc3b49492363fdb7c684800b7325b4e84892bd455193): failed to bind port 0.0.0.0:443/tcp: Error starting userland proxy: listen tcp4 0.0.0.0:443: bind: address already in use
OMV\ExecException: Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C.UTF-8; export LANGUAGE=; docker compose --file '/srv/dev-disk-by-uuid-a4573920-1223-409f-95b0-eb4903d28617/containers/swag/swag.yml' --env-file '/srv/dev-disk-by-uuid-a4573920-1223-409f-95b0-eb4903d28617/containers/swag/swag.env' --env-file '/srv/dev-disk-by-uuid-a4573920-1223-409f-95b0-eb4903d28617/containers/global.env' up -d 2>&1': Container swag Starting
Error response from daemon: driver failed programming external connectivity on endpoint swag (e4d4793bcc276bae2586dc3b49492363fdb7c684800b7325b4e84892bd455193): failed to bind port 0.0.0.0:443/tcp: Error starting userland proxy: listen tcp4 0.0.0.0:443: bind: address already in use in /usr/share/openmediavault/engined/rpc/compose.inc:693
Stack trace:
#0 /usr/share/php/openmediavault/rpc/serviceabstract.inc(620): OMVRpcServiceCompose->{closure}('/tmp/bgstatusbO...', '/tmp/bgoutputqA...')
#1 /usr/share/openmediavault/engined/rpc/compose.inc(696): OMV\Rpc\ServiceAbstract->execBgProc(Object(Closure))
#2 [internal function]: OMVRpcServiceCompose->doCommand(Array, Array)
#3 /usr/share/php/openmediavault/rpc/serviceabstract.inc(123): call_user_func_array(Array, Array)
#4 /usr/share/php/openmediavault/rpc/rpc.inc(86): OMV\Rpc\ServiceAbstract->callMethod('doCommand', Array, Array)
#5 /usr/sbin/omv-engined(537): OMV\Rpc\Rpc::call('Compose', 'doCommand', Array, Array, 1)
#6 {main}
What is wrong with?
Thanks,
Harold
-
-
Quote
Error response from daemon: driver failed programming external connectivity on endpoint swag (e4d4793bcc276bae2586dc3b49492363fdb7c684800b7325b4e84892bd455193): failed to bind port 0.0.0.0:443/tcp: Error starting userland proxy: listen tcp4 0.0.0.0:443: bind: address already in use in /usr/share/openmediavault/engined/rpc/compose.inc:693
This says port 443 is already in use so swag can't start. You either have another container using port 443 or the omv interface is using port 443.
Only one service can use the port. you need to figure out what else is using it and free it up for swag.
-
Hello again,
I have again the same problem. Thie Ip adress of my OMV system changed.
I deployed now swag as you adviced me some weeks ago with the compose included in OMV but this does not work.
I did formard the port 443 to 443 on my router with the UP adress of my OMV system.
What did I do wrong ?
Here is the my swag YML :
Code
Display More--- # https://github.com/linuxserver/docker-swag services: swag: image: lscr.io/linuxserver/swag:latest container_name: swag cap_add: - NET_ADMIN environment: - PUID=1000 - PGID=100 - TZ=Europe/Paris - EMAIL=hmouras@gmail.com - URL=my-domain - SUBDOMAINS=wildcard - VALIDATION=duckdns - DUCKDNSTOKEN=my-token volumes: - /srv/dev-disk-by-uuid-92231eb7-e8d7-49e4-8445-0aaa5c450b26/config/swag:/config ports: - 443:443 - 80:80 #optional restart: unless-stopped
The error message is :
Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C.UTF-8; export LANGUAGE=; docker compose --file '/srv/dev-disk-by-uuid-a4573920-1223-409f-95b0-eb4903d28617/containers/swag/swag.yml' --env-file '/srv/dev-disk-by-uuid-a4573920-1223-409f-95b0-eb4903d28617/containers/swag/swag.env' --env-file '/srv/dev-disk-by-uuid-a4573920-1223-409f-95b0-eb4903d28617/containers/global.env' up -d 2>&1': Container swag Starting
Error response from daemon: driver failed programming external connectivity on endpoint swag (e4d4793bcc276bae2586dc3b49492363fdb7c684800b7325b4e84892bd455193): failed to bind port 0.0.0.0:443/tcp: Error starting userland proxy: listen tcp4 0.0.0.0:443: bind: address already in use
OMV\ExecException: Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C.UTF-8; export LANGUAGE=; docker compose --file '/srv/dev-disk-by-uuid-a4573920-1223-409f-95b0-eb4903d28617/containers/swag/swag.yml' --env-file '/srv/dev-disk-by-uuid-a4573920-1223-409f-95b0-eb4903d28617/containers/swag/swag.env' --env-file '/srv/dev-disk-by-uuid-a4573920-1223-409f-95b0-eb4903d28617/containers/global.env' up -d 2>&1': Container swag Starting
Error response from daemon: driver failed programming external connectivity on endpoint swag (e4d4793bcc276bae2586dc3b49492363fdb7c684800b7325b4e84892bd455193): failed to bind port 0.0.0.0:443/tcp: Error starting userland proxy: listen tcp4 0.0.0.0:443: bind: address already in use in /usr/share/openmediavault/engined/rpc/compose.inc:693
Stack trace:
#0 /usr/share/php/openmediavault/rpc/serviceabstract.inc(620): OMVRpcServiceCompose->{closure}('/tmp/bgstatusbO...', '/tmp/bgoutputqA...')
#1 /usr/share/openmediavault/engined/rpc/compose.inc(696): OMV\Rpc\ServiceAbstract->execBgProc(Object(Closure))
#2 [internal function]: OMVRpcServiceCompose->doCommand(Array, Array)
#3 /usr/share/php/openmediavault/rpc/serviceabstract.inc(123): call_user_func_array(Array, Array)
#4 /usr/share/php/openmediavault/rpc/rpc.inc(86): OMV\Rpc\ServiceAbstract->callMethod('doCommand', Array, Array)
#5 /usr/sbin/omv-engined(537): OMV\Rpc\Rpc::call('Compose', 'doCommand', Array, Array, 1)
#6 {main}
What is wrong with?
Thanks,
Harold
and is better to use a new bridge network ( created previosly on compose WebGUI), to use on all your other dockers, so swag can resolve names and works as expected.
eg:
Code
Display Moreservices: swag: image: linuxserver/swag:latest container_name: swag networks: my-net: cap_add: - NET_ADMIN environment: - PUID=$PUID - PGID=$PGID - TZ=$TZ - URL=$URL - SUBDOMAINS=$SUBDOMAINS - VALIDATION=http # - DNSPLUGIN=cloudflare #optional # - DUCKDNSTOKEN=<token> #optional - EMAIL=$email #optional - DHLEVEL=2048 #optional - ONLY_SUBDOMAINS=true #optional #- EXTRA_DOMAINS=<extradomains> #optional - STAGING=false #optional - MAXMINDDB_LICENSE_KEY=$MAXMINDDB_LICENSE_KEY - DOCKER_MODS=linuxserver/mods:swag-dashboard volumes: - CHANGE_TO_COMPOSE_DATA_PATH/Dockers/swag:/config ports: - 444:443 - 88:80 #optional - 81:81 # swag-dashboard restart: unless-stopped networks: my-net: external: true
for example i use
in Variable section of compose
and my-net is the new bridge network created on compose webgui that I use on all my containers
You can define variables in the global section to use same values in all your dockers and write it only once:
-
Dear all,
I don't understand what is happening. On the same system, I am trying to redeploy swag after a change of IP address, but as a first problem, I cannot recreate a working container form the stack I had working before.
I have this error message :
failed to deploy a stack: Container swag Creating Container swag Created Container swag Starting Error response from daemon: driver failed programming external connectivity on endpoint swag (6031375398d271be83813bc09250e6b078f3a6538e9e07b77448fab6a78d9490): failed to bind port 0.0.0.0:443/tcp: Error starting userland proxy: listen tcp4 0.0.0.0:443: bind: address already in use
Do you have any idea about the problem ?
Thank you very much in advance,
Harold -
-
Quote
failed to bind port 0.0.0.0:443/tcp: Error starting userland proxy: listen tcp4 0.0.0.0:443: bind: address already in useSame as I said above. port 443 is in use by something else
You need to change whatever is using port 443 to something else or change the host side of the container port bind to something else and do a port flip-flop in your router.
This section of the compose file is the ports binding. 443:443 is host (outside container): inside container.
you cant change the inside the container portion, but the host side (left before the ":") can be changed to remap the container to a different host port. You would then need to remap your router in the reverse direction so the internal port matches the change you made and the external port is 443.
I personally choose to change the port on my omv and leave 443 available for the reverse proxy, but either way works.
-
Thank you for your mail. If I understand well, I changed my YML as follows:
When I try to redeploy the stack , I get :
failed to deploy a stack: Container swag Creating Container swag Created Container swag Starting Error response from daemon: driver failed programming external connectivity on endpoint swag (7427634feb47015984e16e0bbebf5ed9d3e5b508d23a1eb6292d4ccae0cf9080): failed to bind port 0.0.0.0:445/tcp: Error starting userland proxy: listen tcp4 0.0.0.0:445: bind: address already in use
Meaning that port 445 is also in use ?
Participate now!
Don’t have an account yet? Register yourself now and be a part of our community!