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

Can't connect to portainer #18

Open
crispybegs opened this issue Feb 7, 2024 · 1 comment
Open

Can't connect to portainer #18

crispybegs opened this issue Feb 7, 2024 · 1 comment

Comments

@crispybegs
Copy link

hi all, i'd really like to try and get this working but I'm running into a bit of a wall. Whatever I try, I'm unable to connect to portainer.

Firstly, my portainer container has these ports:

Screenshot 2024-02-07 at 19 36 47

.. so I presumed the PORTAINER_BACKUP_URL should be "http://192.168.1.14:8000" (192.168.1.14 being the server it's on), however the logs show Validating portainer server failing with Request failed with status code 404

I tried PORTAINER_BACKUP_URL: "http://portainer:8000" but this produces an error of getaddrinfo EAI_AGAIN portainer
PORTAINER_BACKUP_URL: "http://portainer:9000" also produces getaddrinfo EAI_AGAIN portainer

PORTAINER_BACKUP_URL: "http://192.168.1.14:9000" produces an error saying ECONNREFUSED 192.168.1.14:9000

My portainer container network is 'bridge', so I tried putting portainer-backup also on the bridge network, but it made no difference to the error messages

At this point I'm stumped, so I must be missing something obvious. Any ideas?
This is my compose, to help maybe spot what I've done wrong

version: '3.8'
services:
  portainer-backup:
    container_name: portainer-backup
    image: savagesoftware/portainer-backup:latest
    hostname: portainer-backup
    restart: unless-stopped
    command: schedule
    environment:
      TZ: Europe/London
      PORTAINER_BACKUP_URL: "http://192.168.1.14:9000"
      PORTAINER_BACKUP_TOKEN: "_redacted_"
      PORTAINER_BACKUP_PASSWORD: ""
      PORTAINER_BACKUP_OVERWRITE: 1
      PORTAINER_BACKUP_SCHEDULE: "33 19 * * *"
      PORTAINER_BACKUP_STACKS: 1
      PORTAINER_BACKUP_DRYRUN: 0
      PORTAINER_BACKUP_CONCISE: 1
      PORTAINER_BACKUP_DIRECTORY: "/home/crispy/docker/portainer-backups/automatic"
      PORTAINER_BACKUP_FILENAME: "nas-portainer-backup-{{yyyy-MM-dd}}.tar.gz"
    volumes:
      - /home/crispy/docker/portainer-backups/automatic:/backup
@Shieroz
Copy link

Shieroz commented Apr 22, 2024

Your portainer stack itself might be listening on another port. Check the VIRTUAL_PORT=9000 environment variable of your portainer stack. The default is 9000 so you'll have to change your port mapping to 8000:9000 to get the URL http://192.168.1.14:8000 working.

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

No branches or pull requests

2 participants