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

Integration Test fails with MySQL Backend #238

Closed
jcjones opened this issue May 27, 2015 · 6 comments
Closed

Integration Test fails with MySQL Backend #238

jcjones opened this issue May 27, 2015 · 6 comments
Milestone

Comments

@jcjones
Copy link
Contributor

jcjones commented May 27, 2015

[AUDIT] Internal error - Error creating new registration - Error 1406: Data too long for column 'key' at row 1

Happens when using MariaDB as the SA's backing store.

@jcjones jcjones added the bug label May 27, 2015
@jcjones jcjones added this to the Deployment milestone May 27, 2015
@jcjones
Copy link
Contributor Author

jcjones commented May 27, 2015

Problem is that the string being stored is ~400 bytes long. Example:

{"kty":"RSA","n":"rmsgmYJp_U6ASW00hbBJErub94XngAshncQK02_TeAP0Cps2gXZGaUGQ7wCTU2cLktlxDA5zOFKGOz1GkHYrjG65-uQV65m3cfnAYyqQVfLFgyyc_UgcqEjIxrXd8aqVX-C574JHsz_tl5SuI-r-lmt6bckIZ07vGRkAcq5oIDWoEaGg0Rki-vR2w264QFIpODwfCeKHsW-khg2M9ll43C9TF3Z_UESk_rYVNoVhymx0eA1ghCTpx5zZbzZN5AMBu-v9cmmu_YVph1jBvKTphZidJSBP1WupSq5EwwWIcyL0WZ3_Nbv4s-dyNsoHuWeCAs6vuB4d5MXOjvyiE2k10w","e":"AAEAAQ"}```

@jcjones
Copy link
Contributor Author

jcjones commented May 27, 2015

This column needs to be lengthened, and explicitly defined as a HASH-type index to avoid the performance penalties associated with the extremely common {"kty":"RSA","n":" prefix.

jcjones pushed a commit that referenced this issue May 27, 2015
- Added SQL debug logging (SA option: "SQLDebug")
- Added timestamps to the log prints to stdout
- Ignore *.pem in test/js
- Modified start.sh to support environment overrides for BOULDER_CONFIG, like the AMQP mode
- Changed boulder-test-config to open the server on the loopback device, so as to not cause firewall prompts on each integration test run for those of us being restrictive
- Renamed "key" column to "jwk" in DB, to avoid keyword conflict
- Set MaxLength on "jwk" column to 512
@jcjones jcjones changed the title new-reg with MySQL fails: "Error 1406: Data too long for column 'key' at row 1" Integration Test fails with MySQL Backend May 27, 2015
@jcjones
Copy link
Contributor Author

jcjones commented May 27, 2015

Another failure: 2015/05/27 12:18:11 [AUDIT] Internal error - Error creating new authz - sql: Scan error on column index 4: unsupported driver -> Scan pair: []uint8 -> *time.Time

@jcjones
Copy link
Contributor Author

jcjones commented May 27, 2015

To fix that failure, we need to append ?parseTime=true to the dbName URI. That should probably be done programmatically rather than rely on the config file, as it's a requirement for the application as a whole.

@jcjones
Copy link
Contributor Author

jcjones commented May 27, 2015

PR #241 resolves integration issues between MySQL and tests/integration-test.py.
I've opened #242 to track the ?parseTime=true enhancement.

jsha added a commit that referenced this issue May 27, 2015
Issue #238 - MySql column width too narrow
@jcjones
Copy link
Contributor Author

jcjones commented May 27, 2015

As #241 is closed, closing this issue.

@jcjones jcjones closed this as completed May 27, 2015
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

1 participant