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

Need MySQL 5.7.16 package for JCABI #84

Open
shrutiujjwal opened this issue Nov 18, 2016 · 19 comments
Open

Need MySQL 5.7.16 package for JCABI #84

shrutiujjwal opened this issue Nov 18, 2016 · 19 comments

Comments

@shrutiujjwal
Copy link

shrutiujjwal commented Nov 18, 2016

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.

Need to get this adddressed asap. Any help / inputs will be appreciated.

@shrutiujjwal
Copy link
Author

shrutiujjwal commented Nov 22, 2016

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()

@dmarkov
Copy link

dmarkov commented Nov 25, 2016

@yegor256 dispatch this issue please, see par.21

@yegor256
Copy link
Member

@shrutiujjwal thanks for reporting it

@dmarkov
Copy link

dmarkov commented Nov 29, 2016

@amihaiemil it's yours, please help

@amihaiemil
Copy link
Member

@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!

@shrutiujjwal
Copy link
Author

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:

  1. The Maven POM will download the MySQL Jar into your .m2 repository first time. [We have POM taking care of that]
  2. 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]
  3. 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")
  4. 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
  5. This step generates a temporary password at: ..\data<machinename>.err file. Extract & make a note of that password.
  6. On another thread from the target\mysql-dist\bin, start a "mysqld --port=55673" process & leave that running.
  7. Now from the target\mysql-dist\bin folder type the following command:
    mysql --port=55673 -u root -p
    Enter password:
  8. 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';
  9. In addition create a 'test' database using the command:
    mysql> Create Database test;
  10. Now you can connect to this MySQL using defined Port through the java code & perform any necessary operation.
  11. Remember to stop the MySQL processes in AfterStories.

@amihaiemil
Copy link
Member

@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

@shrutiujjwal
Copy link
Author

Sure Mihai.

@amihaiemil
Copy link
Member

@dmarkov need more time pls. Will take it up this week.

@dmarkov
Copy link

dmarkov commented Dec 5, 2016

@dmarkov need more time pls. Will take it up this week.

@amihaiemil sure, thanks for telling me, take your time

@amihaiemil
Copy link
Member

@dmarkov Assign someone else pls - no more time :(

@shrutiujjwal
Copy link
Author

Any updates on this issue resolution?

@amihaiemil
Copy link
Member

amihaiemil commented Dec 16, 2016

@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?

@shrutiujjwal
Copy link
Author

shrutiujjwal commented Dec 17, 2016

@yegor256: Your inputs be helpful? Any timelines we are looking at providing this support?

@dmarkov
Copy link

dmarkov commented Dec 21, 2016

@dmarkov Assign someone else pls - no more time :(

@amihaiemil 30 points deducted from your rating

@dmarkov
Copy link

dmarkov commented Dec 21, 2016

@dmarkov Assign someone else pls - no more time :(

@amihaiemil OK, I will try to assign someone else

@shrimalmadhur
Copy link

Hello, Did this ever happen? If not can someone suggest any alternative to test using mysql 5.7? @dmarkov

@amihaiemil
Copy link
Member

@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 :)

@shrimalmadhur
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants