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

Parse error + Healthcheck error #125

Open
AndrewPro opened this issue Jan 14, 2025 · 2 comments
Open

Parse error + Healthcheck error #125

AndrewPro opened this issue Jan 14, 2025 · 2 comments

Comments

@AndrewPro
Copy link

Hello, when I copy and pase the code form here, the healthcheck gives me problems.

ERROR: The Compose file './docker-compose.yml' is invalid because:
services.vpn.healthcheck value 'start_interval' does not match any of the regexes: '^x-'

Here is the fix

    healthcheck:
      test: ["CMD", "ping", "-c", "1", "www.google.com"]
      interval: 300s
      timeout: 10s
      retries: 3
      start_period: 30s

Parse error

Creating pia ... done
Attaching to pia
pia    | Tue Jan 14 06:20:53 UTC 2025: Generating auth token
pia    | jq: parse error: Invalid numeric literal at line 1, column 5
pia    | Failed to acquire new auth token. Response:
pia    | HTTP Token: Access denied.
pia    | Tue Jan 14 06:20:54 UTC 2025: Failed to acquire new auth token
pia    | Tue Jan 14 06:20:54 UTC 2025: Fatal error

Here is the docker-compose:

services:
  vpn:
    image: thrnz/docker-wireguard-pia
    container_name: pia
    volumes:
      - pia:/pia
      - pia-shared:/pia-shared
    cap_add:
      - NET_ADMIN
    environment:
      - LOC=swiss
      - USER=p6317748
      - PASS=epFq7oA9^B514()2p^99rZ#
    sysctls:
      - net.ipv4.conf.all.src_valid_mark=1
      - net.ipv6.conf.default.disable_ipv6=1
      - net.ipv6.conf.all.disable_ipv6=1
      - net.ipv6.conf.lo.disable_ipv6=1
      
volumes:
  pia:
  pia-shared:

I am unable to currently use the docker container, but I am trying to find a solution. I will try to keep this updated.

@thrnz
Copy link
Owner

thrnz commented Jan 14, 2025

I think start_interval was a relatively recent addition to Docker, so there may be issues using it with older versions of Docker or Compose. The changelog suggests it was added in v25 released this time last year.

The parse error is jq complaining that it wasn't given a json string to parse, in this case because there was an access denied error when logging in. I've only seen that error when the username or password are wrong.

Passwords with special characters in them have had issues in the past, though a recent change made them a bit more reliable. ~;?,.@=#\' at least should now work, though there might still be others getting eaten. Running the container with the DEBUG=1 env var set prints bash commands as they're run, and would confirm whether or not the password is being mangled at all. Don't post the output as-is though, as it's not sanitised and would include keys/auth details.

Also, that's not your actual username/password in the compose snippet right? Just thought I'd double check to make sure you hadn't posted it accidentally!

@AndrewPro
Copy link
Author

AndrewPro commented Jan 15, 2025

Hello, thank you for the update! Updating Docker and using DEBUG=1 sound like great steps to take. However, I've found an alternative solution and, unfortunately, won't be investigating the root cause further. I also wasn't aware that incorrect credentials trigger the parse error now I know.

By the way, those aren't the actual credentials, but I appreciate you checking. :)

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