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

Issue with services from .yaml files not being available after container restart in Portainer CE 2.19.2 #65

Open
spechtx opened this issue Nov 16, 2023 · 1 comment

Comments

@spechtx
Copy link

spechtx commented Nov 16, 2023

What is the bug or the crash?

Firstly, I'd like to express my appreciation for the docker-mapproxy; it's a fantastic tool, and I'm grateful for the effort put into it.

I'm encountering an issue with running the container in Portainer CE 2.19.2, where my services from the .yaml files in the multi_mapproxy directory are not available after restarting the container. I am loading the mapproxy directory with the .yaml files at system startup from an external SSHFS storage.

Expected Behavior
When I restart the container, I expect all the services from the .yaml files in the mapproxy directory to be available, including mapproxy.yaml and seed.yaml.

Actual Behavior
After system reboot or restarting the container, none of the services are available, and even mapproxy.yaml and seed.yaml are not shown.

Workaround
Currently, I am working around this issue by:

Going to Stacks -> mapproxy.

On Stack details i click on Stop this stack
-> The Stack is stopping
Then i click on Start this stack
-> After these steps, all services become available. They will not, when i simply restart the container.

It would be more convenient if they loaded automatically at system start.

Steps to reproduce the issue

To replicate the issue I'm experiencing with docker-mapproxy in Portainer CE 2.19.2, please follow these steps:

  1. Initial Setup:
  • Set up the multi_mapproxy directory to load at system startup with SSHFS. The following command is used in /etc/fstab to mount the directory:
[email protected]: /mnt/[external_storage_sshfs] fuse.sshfs x-systemd.automount,_netdev,port=22,IdentityFile=/root/.ssh/id_rsa_[external_storage_sshfs],allow_other,uid=1000,gid=1000 0 0
  • Ensure that the mapproxy service is defined in a Portainer Stack.
  1. Reboot System or Restart Container
  • Either reboot the entire system or simply restart the mapproxy container in Portainer.
  1. Check for Services
  • After the system reboot or container restart, check for the availability of services defined in .yaml files within the multi_mapproxy directory.
  1. Observe the Issue
  • You'll notice that none of the services are available, and even the services from mapproxy.yaml and seed.yaml are not shown.
  1. Apply Workaround
  • Navigate to Stacks -> mapproxy in Portainer.
  • Stop the stack by clicking on Stop this stack.
  • Once the stack has stopped, start it again by clicking on Start this stack.
  • After these steps, all services should become available

Versions

MapProxy 1.16.0
Docker 24.0.7, build afdd53b
Portainer CE 2.19.2
host: Debian 6.1.55-1 x86_64

Additional context

This is my docker-compose i am using in portainer

version: '3.8'

services:
mapproxy:
image: kartoza/mapproxy
container_name: mapproxy
environment:
- PRODUCTION=True
- PROCESSES=4
- CHEAPER=1
- THREADS=10
- MAPPROXY_USER_ID=1000
- MAPPROXY_GROUP_ID=1000
- MULTI_MAPPROXY=True
- ALLOW_LISTING=True
- LOGGING=True
- HTTP_PROXY:http://x.x.x.x:3128
- HTTPS_PROXY=http://x.x.x.x:3128
# not opened on host, since its routed via Nginx Proxy Manager (npm-network)
# ports:
# - "8080:8080"
volumes:
- /mnt/[external_storage_sshfs]/multi_mapproxy:/multi_mapproxy
restart: always
networks:
- npm-network

networks:
npm-network:
external: true

@NyakudyaA
Copy link
Collaborator

Does the issue occur with a normal docker volume?, what are the logs when restarting the container. Does the restart delete your files or it overlays them obscuring them

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

2 participants