Why the SDK can not find this plugin

And this is my MySQL status

Here you go: https://issues.openmrs.org/browse/SDK-285

1 Like

Are you able to connect to the MySQL server running:

mysql -h localhost -P 3306 --protocol tcp -u root -p

using the same password you supplied to the SDK? It may be that your MySQL server doesn’t have a password associated with the root user and simply allows you to connect as the root user using a socket.

If that’s the case, you might need to run:

mysqladmin password "<some password>"

to set a root password.

Yes, I’m trying this method and solving this WARNING pastebin.

I don’t think there’s anything to solve… it’s just a warning. Are you still unable to connect using the mysql command above?

Yes, I still can not connect to my mysql

I can run this mysql -u root -p in my virtual machine and see what databases have been created by myself.

You may want to check that your MySQL server actually has TCP connections enabled. The Ubuntu wiki has some documentation on this, which should be useful for anyother system running systemd (as you appear to be). Essentially, you’ll need to ensure that your mysql.cnf file has a bind-address. For OMRS purposes its probably fine to have bind-address = 127.0.0.1.

1 Like

Thank you very much, I will try it as soon as possible, and report the result.

I created a new user in my database and connect to the database succeed. So, I think it might because of it is hard to realise the password was wrong when I was in root mode. But I will try to change the root password.

1 Like

When I’m not using the root user to run the openmrs-sdk or mysql to connect or login the MySQL server, I failed, and report this ERROR 1698. So, the folowing words is my solution:

When I using MySQL 5.7, the root user’s plugin is not mysql_native_password, so we need to change the plugin.

Run these commands:

mysql> USE mysql;
mysql> UPDATE user SET plugin='mysql_native_password' WHERE User='root';
mysql> FLUSH PRIVILEGES;
mysql> exit;

The original solution link is here

1 Like

Ir might be better to do an INSERT rather than UPDATE so you can continue using the socket as root (socket connections are MySQL’s preferred mode of connection, it’s just hard to do in a platform-agnostic way from Java).

2 Likes

What version of Docker are y’all running? I have a colleague in Mexico, Jose Ramon (I don’t think he has a Talk account yet) who is running into this issue. He’s running Docker Engine 20.10.9. I’m running Docker Engine 19.03.3 and have no problems. This seems to me like it might be something that Docker broke for us in the 19-20 upgrade. @ibacher , @mseaton , @d404d , @navareth ?

I’m running Docker Engine 20.10.6.

Yeah, I can reproduce this with Docker Engine 20.10.6 on Linux.

1 Like

This issue should be fixed in SDK v4.0.1, which I just released to the OpenMRS Maven Repo. It should be on Central shortly. Please let me know if this doesn’t work for you.

3 Likes

Things are working for Jose Ramon. Thank you so much @ibacher !

1 Like

Hey @ibacher , bad news… someone’s getting that error again with SDK 4.0.1 :frowning:

I got this from my colleague Miguel (no Talk account yet) in Peru:

Failed to execute goal org.openmrs.maven.plugins:openmrs-sdk-maven-plugin:4.0.1:setup (default-cli) on project standalone-pom: Failed to setup server: Unable to execute mojo: Execution null of goal org.openmrs.maven.plugins:openmrs-sdk-docker-maven-plugin:4.0.1:run-db failed: Status 500: OCI runtime create failed: invalid mount {Destination:openmrs-sdk-mysql-v3-2-data:/var/lib/mysql Type:bind Source:/var/lib/docker/volumes/58507bd05553afb8b464a36575921e6c49c59d45f47d57ad25222795ec36feb6/_data Options:[rbind]}: mount destination openmrs-sdk-mysql-v3-2-data:/var/lib/mysql not absolute: unknown

However, for him this is taking place right after an incident where his Ubuntu went into emergency mode, and when he had recovered from it all his docker containers were gone. So there could be some other weirdness going on (something wrong with his docker installation, most likely).

Hmmmm… that’s troubling. Do you know what version of the Docker Engine Miguel is running?

Oop, he reinstalled Docker and everything is fine. Sorry to trouble you.

1 Like