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

Unable to do connection - invalid port ":xxxx" after host #88

Open
URBANsUNITED opened this issue Feb 6, 2025 · 2 comments
Open

Unable to do connection - invalid port ":xxxx" after host #88

URBANsUNITED opened this issue Feb 6, 2025 · 2 comments

Comments

@URBANsUNITED
Copy link

Hi!

Using latest docker and can't make a connection to my Postgres database:

Error

goose run: cannot parse postgresql://NAME:xxxxxx@postgres:5432/pgbackweb?sslmode=disable: failed to parse as URL (parse "postgresql://NAME:xxxxi?13=0@postgres:5432/pgbackweb?sslmode=disable": invalid port ":xxxx" after host)

My compose file:

services:
  pgbackweb:
    image: eduardolat/pgbackweb:latest
    ports:
      - "8095:8085" # Access the web interface at http://localhost:8085
    volumes:
      - ./backups:/backups # If you only use S3 destinations, you don't need this volume
    environment:
      PBW_ENCRYPTION_KEY: "xxx" # Change this to a strong key
      PBW_POSTGRES_CONN_STRING: "postgresql://NAME:Axxxxxxx=$$?@postgres:5432/pgbackweb?sslmode=disable"
      TZ: "Europe/Berlin" # Set your timezone, optional
#    depends_on:
#      postgres:
#        condition: service_healthy
    networks:
      - postgres
      
networks:
  postgres:
    name: postgres

My password uses $ (shift 4 - dollar sign) , so I know from other postgres connections, I have to do double dollar signs - $$ but even this is not working.

My fault or on programs side?

Thanks

URBANsUNITED

@eduardolat
Copy link
Owner

Can you please test the compose.yaml from the README to verify that everything works correctly?

@URBANsUNITED
Copy link
Author

Hi!
After lots of tests I can confirm that the problem exists also in the original setup!
But I also found a solution.
The password must be encoded to URL-encoded format.
Ex.
Test12=%! = Test12%3D%25%21
Use this for easy
https://www.urlencoder.org/

Btw. The PBW_POSTGRES_CONN_STRING: "postgresql://Name:Pass@postgres:5432?sslmode=disable" works also without naming a database
It would be great to select the existing databases from the dashboard without knowing the correct names. Choose from a list and simply select all databases you'll like to backup.

URBANsUNITED

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