-
Notifications
You must be signed in to change notification settings - Fork 968
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
Investigate MySQL empty timestamp issue on session #244
Comments
I'm trying to run kratos on localhost, using remote MySQL rather than SQLite. What I've done are:
I used version: "3.7"
services:
kratos-selfservice-ui-node:
image: oryd/kratos-selfservice-ui-node:latest
ports:
- "4435:4435"
environment:
- PORT=4435
- KRATOS_PUBLIC_URL=http://kratos:4433/
- KRATOS_ADMIN_URL=http://kratos:4434/
- KRATOS_BROWSER_URL=http://127.0.0.1:4455/.ory/kratos/public
- JWKS_URL=http://oathkeeper:4456/.well-known/jwks.json
networks:
- intranet
restart: on-failure
oathkeeper:
image: oryd/oathkeeper:v0.35.5-beta.1
depends_on:
- kratos
ports:
- "4455:4455"
- "4456:4456"
command: serve proxy -c "/etc/config/oathkeeper/.oathkeeper.yml"
environment:
- LOG_LEVEL=debug
restart: on-failure
networks:
- intranet
volumes:
- type: bind
source: ./contrib/quickstart/oathkeeper
target: /etc/config/oathkeeper
kratos:
image: oryd/kratos:latest
ports:
- "4433:4433" # public
- "4434:4434" # admin
restart: unless-stopped
environment:
- DSN=mysql://$MYSQL_USERNAME:$MYSQL_PASSWORD@tcp($MYSQL_ADDRESS)/$MYSQL_DATABASE?parseTime=true&multiStatements=true
command: serve -c /etc/config/kratos/.kratos.yml --dev
volumes:
- type: bind
source: ./contrib/quickstart/kratos/email-password
target: /etc/config/kratos
networks:
- intranet
mailhog:
image: mailhog/mailhog:v1.0.0
ports:
- "8025:4436"
networks:
- intranet
networks:
intranet: The server starts without an error, so I reached to http://localhost:4455/dashboard and registered with email and password. Then I saw an error on the browser: {
"error": {
"code": 500,
"message": "Error 1292: Incorrect datetime value: '0000-00-00' for column 'seen_at' at row 1"
}
} I checked other tables if data were inserted, then I found those table have data:
Errors seen on sysout for docker processes are (prettified stactraces):
and
And MySQL version is |
FYI, I had a test with Postgres; it works well without datetime column error. |
Thank you for investigating! I've triaged this issue for 0.1.1 so we'll hopefully have a fix for that version then. |
Closed via #246 |
@aeneasr I think a similar problem occurs when creating an |
Yup! :) Thanks :) |
Describe the bug
https://community.ory.sh/t/kratos-using-mysql-fails-to-create-a-session-when-sigining-in/1508/2
The text was updated successfully, but these errors were encountered: