Skip to content

Conversation

@chris-crone
Copy link
Contributor

This requires a version of Docker with Wasm WASI support to work.

Steps to test:

  1. Run docker compose up
  2. Run docker run --rm --network host curlimages/curl curl http://0.0.0.0:8080/init to initialize

@chris-crone
Copy link
Contributor Author

Running docker run --rm --network host curlimages/curl curl http://0.0.0.0:8080/init to initialize the DB, the Wasm service is panicking:

microservice-rust-mysql-db-1      | 2022-10-15T21:44:22.638217Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.31'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  MySQL Community Server - GPL.
microservice-rust-mysql-server-1  | thread 'main' panicked at 'mask too long', /usr/local/cargo/registry/src/github.amrom.workers.dev-1ecc6299db9ec823/mysql_common-0.29.1/src/crypto/rsa.rs:83:13
microservice-rust-mysql-server-1  | stack backtrace:
microservice-rust-mysql-server-1  | [2022-10-15 21:44:23.792] [error] execution failed: unreachable, Code: 0x89
microservice-rust-mysql-server-1  | [2022-10-15 21:44:23.792] [error]     When executing module name: "main" , function name: "_start"
microservice-rust-mysql-server-1 exited with code 137

Any ideas @juntao @CaptainVincent ?

@juntao
Copy link
Member

juntao commented Oct 16, 2022

Hmm, we had this problem with the MySQL Docker image too ...

Our CI installs Unbuntu's default MySQL-server 8.0.30 and it works well. Can you try an image with that version?

https://github.com/second-state/microservice-rust-mysql/actions/runs/3194704727/jobs/5214550573#step:4:26

My guess is that the mysql_common crate had an issue that has not been updated.

@chris-crone
Copy link
Contributor Author

Same issue with mysql:8.0.30 but works with mariadb:10.9 so I'll use that.

I also added some examples to the README to show how to use a dockerized curl.

@juntao juntao merged commit cd88b14 into second-state:main Oct 16, 2022
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

Successfully merging this pull request may close these issues.

2 participants