jcabi-mysql-maven-plugin
jcabi-mysql-maven-plugin copied to clipboard
Need MySQL 5.7.16 package for JCABI
Need MySQL 5.7.16 package for JCABI (on Windows OS). Running into many issues while generating it. Will appreciate if you could provide the same at the earliest as my test team is blocked with pre-integration test. We basically want to use the MySQL JSON data saving/retrieval feature of 5.7.* in using in-memory capability.
Please note that when I try using MySQL 5.7.14 (on Windows) that Mike has provided it gives following error:
[INFO] port 51379 is available after 4s of waiting
[INFO] $ C:\Perforce_Workspace\ws3\InMemDb\target\mysql-dist\bin\mysqladmin.exe --no-defaults --port=51379 --user=root --socket=C:\Perforce_Workspace\ws3\InMemDb\target\mysql-data\mysql.sock --host=127.0.0.1 password root
[WARNING] >> mysqladmin: connect to server at '127.0.0.1' failed
[WARNING] >> error: 'Host 'localhost' is not allowed to connect to this MySQL server'
[INFO] $ C:\Perforce_Workspace\ws3\InMemDb\target\mysql-dist\bin\mysql.exe --port=51379 --user=root --password=root --socket=C:\Perforce_Workspace\ws3\InMemDb\target\mysql-data\mysql.sock
[WARNING] >> mysql: [Warning] Using a password on the command line interface can be insecure.
[WARNING] >> ERROR 1130 (HY000): Host 'localhost' is not allowed to connect to this MySQL server
[INFO] #start('Config(tcpport=51379, dbuser=root, dbpassword=root, name=root, dbopts=[])', C:\\Perforce_Workspace\\ws3\\InMemDb\\target\\mysql-dist, C:\\Perforce_Workspace\\ws3\\InMemDb\\target\\mysql-data): in 12s
When i use 5.6.14, the all works fine.
- PFA my POM: pom.xml.txt
- PFA the full error logs: ErrorLog.txt
Need to get this adddressed asap. Any help / inputs will be appreciated.
We did some more investigation of MySQL 5.7.14/16 on Windows Box and below are our findings:
1). In the etc\hosts file I have the entry:
3.204.166.180 [the hostname of my machine] //127.0.0.1 localhost -- commented //::1 localhost -- commented
2). Then when I run the 'maven install' command at the target --> --- jcabi-mysql-maven-plugin:1.0r2:start (mysql-test) @ InMemDb ---
At the line it throws following error:: [INFO] >> Version: '5.7.14-log' socket: '' port: 50634 MySQL Community Server (GPL) [INFO] port 50634 is available after 2s of waiting [INFO] $ C:\Perforce_Workspace\ws3\InMemDb\target\mysql-dist\bin\mysqladmin.exe --no-defaults --wait=5 --port=50634 --user=root --socket=C:\Perforce_Workspace\ws3\InMemDb\target\mysql-data\mysql.sock --host=127.0.0.1 password root [WARNING] >> Got error: Host 'localhost' is not allowed to connect to this MySQL server [ERROR] #start('Config(tcpport=50634, dbuser=root, dbpassword=root, name=root, dbopts=[])', C:\Perforce_Workspace\ws3\InMemDb\target\mysql-dist, C:\Perforce_Workspace\ws3\InMemDb\target\mysql-data, true, NULL): thrown java.lang.IllegalArgumentException(Non-zero exit code 1: stdout = ; stderr = Got error: Host 'localhost' is not allowed to connect to this MySQL server \n) out of com.jcabi.mysql.maven.plugin.MoreVerboseProcess#output[262] in 11s
3). When I run the same command through Command Prompt, with hostname as the name of my machine it works fine. C:\Perforce_Workspace\ws3\InMemDb\target\mysql-dist\bin\mysqladmin.exe --no-defaults --wait=5 --port=57085 --user=root --socket=C:\Perforce_Workspace\ws3\InMemDb\target\mysql-data\mysql.sock --host=[the hostname of my machine] password root
it says: Waiting for MySQL server to answer...
The usage of 127.0.0.1 is hardcoded in the the jcabi-mysql-maven-plugin. Probably can we change it with usage of hostname -- or something that works. I have tried many other things like: bind-adrress setting, host file keeping 127.x.x.x entry --- but none of them worked. Request an early response.
In the https://github.com/jcabi/jcabi-mysql-maven-plugin/blob/cf29b4469634c5ac70365ef0ca043292242d8a0c/src/main/java/com/jcabi/mysql/maven/plugin/Instances.java the 127.x ip is hardcoded. Instead we can use: InetAddress.getLocalHost().getHostName()
@yegor256 dispatch this issue please, see par.21
@shrutiujjwal thanks for reporting it
@amihaiemil it's yours, please help
@shrutiujjwal Is this still urgent? Unfortunately, I don't have time to take care of it this week, only next one (I'm on the road all week). Should I let it to someone else?
Many thanks and sorry for the inconvenience!
For now since we wanted to quickly unblock our test team, we have handled the MySQL 5.7.x installation procedure in our codebase. Pls do give the fix at your earliest convenience, so that we can move on to that. Steps that we coded for:
- The Maven POM will download the MySQL Jar into your .m2 repository first time. [We have POM taking care of that]
- The Maven POM will unpack that MySQL Jar into your Dev Code's target directory, using the target: maven-dependency-plugin:2.8:unpack (default) [We have POM taking care of that]
- The following target of Maven: build-helper-maven-plugin:1.8:reserve-network-port, also generates a free port on which MySQL can be started. In the Java code use the following to read the generated MySQL Port: System.getProperty("mysql.port")
- Then in Before Stories run the following command to generate a temporary password for MySQL: cd C:\Perforce_Workspace\ws3\InMemDb\target\mysql-dist\bin mysqld --initialize --user=mysql --basedir=../. --datadir=../data --port=55673
- This step generates a temporary password at: ..\data<machinename>.err file. Extract & make a note of that password.
- On another thread from the target\mysql-dist\bin, start a "mysqld --port=55673" process & leave that running.
- Now from the target\mysql-dist\bin folder type the following command:
mysql --port=55673 -u root -p
Enter password:
- You will get logged into the MySQL. Type this to change the password that you plan to use in Java Code: mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'root';
- In addition create a 'test' database using the command: mysql> Create Database test;
- Now you can connect to this MySQL using defined Port through the java code & perform any necessary operation.
- Remember to stop the MySQL processes in AfterStories.
@shrutiujjwal I see. Please don't turn off notifications from this issue, as I might be asking some questions later when I take on this. Also, in the end, you should be the one to close this ticket (that's part of our work model).
Many thanks again, Mihai
Sure Mihai.
@dmarkov need more time pls. Will take it up this week.
@dmarkov need more time pls. Will take it up this week.
@amihaiemil sure, thanks for telling me, take your time
@dmarkov Assign someone else pls - no more time :(
Any updates on this issue resolution?
@shrutiujjwal I caught some time to look more into it now, and as I understand you need a ZIP archive with mysql 5.7.16
to pass to the plugin, like it is outlined on this page.
However, I'm not sure how to create and publish such an archive - from what I know zip archives used in pom.xml also need to contain some metadata for maven but I might be wrong (I didn't work on this project before)
Maybe @yegor256 knows?
@yegor256: Your inputs be helpful? Any timelines we are looking at providing this support?
@dmarkov Assign someone else pls - no more time :(
@amihaiemil 30 points deducted from your rating
@dmarkov Assign someone else pls - no more time :(
@amihaiemil OK, I will try to assign someone else
Hello, Did this ever happen? If not can someone suggest any alternative to test using mysql 5.7? @dmarkov
@shrimalmadhur There is no one maintaining the project at the moment, unfortunately. However, if you have the time and want to submit a Pull Request with the solution, we'll be grateful!
Don't talk to dmarkov, he is a chatbot so he won't reply to you :)
Thanks @amihaiemil for update. I didn't realize he is a chatbot. I will try if I can when I have some free cycles. Thanks.