Issue with Postgres

Hey all,

First time poster so please be gentle.

I’m setting up a drone server with Kubernetes on a single node in AWS. My environment has a postgres container up and running, but when I deploy my main drone server, I get CrashLoopBackOff. I check my logs for that container and get this:

{“error”:“parse postgres://postgresadmin:[email protected]:5432/postgresdb?sslmode=disable\n: net/url: invalid control character in URL”,“level”:“fatal”,“msg”:“main: cannot initialize server”,“time”:“2021-10-15T18:56:26Z”}

Is there an obvious reason for this error? Also, what else do you need me to post for additional context?

Looks like you have a \n at the end of your database connection string, which is consistent with the error message you are receiving. You can reproduce the error here: The Go Playground

Huh, weird. I encoded that originally with Base64 so when I decoded it, I don’t get the \n.

I can only reproduce this error message when including a newline in my Postgres connection string. When I remove the newline I no longer receive the error.

Yup. My bad. I encoded my secret wrong so it included the new line command. Thanks for the help!

thanks for the awesome information.