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

Flycheck problem with 1.16.3 on Docker #587

Closed
asymmetric opened this issue Jan 22, 2019 · 7 comments
Closed

Flycheck problem with 1.16.3 on Docker #587

asymmetric opened this issue Jan 22, 2019 · 7 comments

Comments

@asymmetric
Copy link
Contributor

Describe the bug
Running the 1.16.3 with the same docker-compose.yml file as 1.16.1 crasehs with:

alfio_1  | Caused by: org.flywaydb.core.internal.dbsupport.FlywaySqlException:
alfio_1  | Unable to obtain Jdbc connection from DataSource
alfio_1  | ------------------------------------------------
alfio_1  | SQL State  : 08001
alfio_1  | Error Code : 0
alfio_1  | Message    : Invalid sslmode value: prefer

To Reproduce
Steps to reproduce the behavior:

Expected behavior

No crash

@asymmetric
Copy link
Contributor Author

Hmm, it seems like the crash could actually be related to this log line:

db_1     | 2019-01-22 16:44:58.813 UTC [1] FATAL:  could not write lock file "postmaster.pid": No space left on device

@asymmetric
Copy link
Contributor Author

Yeah, bug confirmed, the No space left on device problem was unrelated.

@cbellone
Copy link
Member

This is weird.

sslmode=prefer is the default in PostgreSQL (see doc). We're just stating the obvious here.

Anyway, can you try to add the following environment variable, just to verify if the problem is really the sslmode:
POSTGRES_ENV_USE_SSL: 'disable'

@DottoreTozzi
Copy link

Yes, this does the trick...

@vorburger
Copy link
Contributor

POSTGRES_ENV_USE_SSL: 'disable'

same here.. not with docker-compose up but while I'm trying a docker run --rm -e "POSTGRES_PORT_5432_TCP_ADDR=otto.db.elephantsql.com" ... alfio/alf.io:1.16.3 with https://www.elephantsql.com ...

BTW https://www.elephantsql.com/docs/faq.html#Does_ElephantSQL_support_TLS_SSL suggests this:

We do support TLS (SSL). In most clients it is easy to use TLS by adding ?ssl=true to the connection URL. More information can be found here: PostgreSQL JDBC Driver Chapter 4. Using SSL

As far as I understand, I can't override the JDBC URL from the environment variables?

Yes, this does the trick...

Confirming, that's a valid workaround, but that's insecure, agreed?

So perhaps this ?ssl=true should be added in the source?

@cbellone
Copy link
Member

cbellone commented Apr 30, 2019

Yes, this does the trick...

ok but that was not intended as a workaround. :-)

@vorburger: ssl=true is not as fine grained as ssl_mode, at least not for the JDBC driver, see https://jdbc.postgresql.org/. So I think we should investigate in other directions

I think that the real issue here is the default postgres docker image config.

have you tried with ssl_mode=allow ? Does it work? (see doc)

another option would be to create a certificate and then configure it, see https://gist.github.com/mrw34/c97bb03ea1054afb551886ffc8b63c3b . I think that https://github.com/FiloSottile/mkcert can be of help here.

@cbellone
Copy link
Member

closed for inactivity

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

4 participants