This project is just a parent POM for all other Java projects in "jcabi family".
See www.jcabi.com website for more details.
MySQL Maven Plugin: starts MySQL server on pre-integration phase and shuts it down on post-integration phase
Home Page: https://mysql.jcabi.com
License: Other
This project is just a parent POM for all other Java projects in "jcabi family".
See www.jcabi.com website for more details.
Hi there,
I think my issue here resides in an inproper maven config or Java class. It leads to:
[edit 06-10]:
[INFO] [jcabi-mysql:stop {execution: mysql-test}]
[INFO] #stop(33061): in 105µs
[WARNING] escalated exception: java.lang.IllegalArgumentException: java.io.IOException: Stream closed
at com.jcabi.log.VerboseRunnable$1.run(VerboseRunnable.java:142)
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO] ------------------------------------------------------------------------
[INFO] There was an error in the forked process
[ERROR] FATAL ERROR
java.lang.NullPointerException
at org.junit.runner.Description.getAnnotation(Description.java:253)
at org.apache.maven.surefire.common.junit48.FilterFactory$GroupMatcherCategoryFilter.shouldRun(FilterFactory.java:230)
[/edit 06-10]:
when test should run.
GIVEN custom dbname, user, and password
WHEN I do a mvn clean verify
command
THEN a local MySQL server should start with the given custom dbname and credentials.
Instead, a mysqladmin.exe: unable to change password; error: 'Can't find any matching row in the user table'
error is displayed, and the maven build fails.
Full mvn build log below:
C:\dev\temp\mvn-mysql-plugin-test>mvn clean verify
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building mvn-mysql-plugin-test 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ mvn-mysql-plugin-test ---
[INFO] Deleting C:\dev\temp\mvn-mysql-plugin-test\target
[INFO]
[INFO] --- jcabi-mysql-maven-plugin:0.6:classify (mysql-test) @ mvn-mysql-plugin-test ---
[info] ${mysql.classifier} set to "windows-amd64"
[INFO]
[INFO] --- maven-dependency-plugin:2.8:unpack (default) @ mvn-mysql-plugin-test ---
[INFO] Configured Artifact: com.jcabi:mysql-dist:windows-amd64:5.6.14:zip
[INFO] Unpacking C:\Users\vdev\.m2\repository\com\jcabi\mysql-dist\5.6.14\mysql-dist-5.6.14-windows-amd64.zip to C:\dev\temp\mvn-mysql-plugin-test\target\mysql-dist with includes "" and excludes ""
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ mvn-mysql-plugin-test ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\dev\temp\mvn-mysql-plugin-test\src\main\resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ mvn-mysql-plugin-test ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) @ mvn-mysql-plugin-test ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\dev\temp\mvn-mysql-plugin-test\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ mvn-mysql-plugin-test ---
[INFO] Compiling 1 source file to C:\dev\temp\mvn-mysql-plugin-test\target\test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.10:test (default-test) @ mvn-mysql-plugin-test ---
[INFO] Surefire report directory: C:\dev\temp\mvn-mysql-plugin-test\target\surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Results :
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] --- maven-jar-plugin:2.3.2:jar (default-jar) @ mvn-mysql-plugin-test ---
[WARNING] JAR will be empty - no content was marked for inclusion!
[INFO] Building jar: C:\dev\temp\mvn-mysql-plugin-test\target\mvn-mysql-plugin-test-1.0-SNAPSHOT.jar
[INFO]
[INFO] --- jcabi-mysql-maven-plugin:0.6:start (mysql-test) @ mvn-mysql-plugin-test ---
log4j:WARN No appenders could be found for logger (org.jboss.logging).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
[INFO] JSR-303 validator org.hibernate.validator.internal.engine.ValidatorImpl instantiated by jcabi-aspects 0.12/17e5dc6
[INFO] jcabi-aspects 0.12/17e5dc6 started new daemon thread jcabi-cacheable for automated cleaning of expired @Cacheable values
[INFO] jcabi-aspects 0.12/17e5dc6 started new daemon thread jcabi-loggable for watching of @Loggable annotated methods
[INFO] created C:\dev\temp\mvn-mysql-plugin-test\target\mysql-data directory
[INFO] $ perl C:\dev\temp\mvn-mysql-plugin-test\target\mysql-dist\scripts\mysql_install_db.pl --no-defaults --force --innodb_use_native_aio=0 --datadir=C:\dev\temp\mvn-mysql-plugin-test\target\mysql-data\data
[INFO] >> Installing MySQL system tables...2014-01-23 10:21:29 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
[INFO] >> OK
[INFO] >>
[INFO] >> Filling help tables...2014-01-23 10:21:45 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
[INFO] >> OK
[INFO] >>
[INFO] >> To start mysqld at boot time you have to copy
[INFO] >> support-files/mysql.server to the right place for your system
[INFO] >>
[INFO] >> PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
[INFO] >> To do so, start the server, then issue the following commands:
[INFO] >>
[INFO] >> ./bin/mysqladmin -u root password 'new-password'
[INFO] >> ./bin/mysqladmin -u root -h A131579L password 'new-password'
[INFO] >>
[INFO] >> Alternatively you can run:
[INFO] >>
[INFO] >> ./bin/mysql_secure_installation
[INFO] >>
[INFO] >> which will also give you the option of removing the test
[INFO] >> databases and anonymous user created by default. This is
[INFO] >> strongly recommended for production servers.
[INFO] >>
[INFO] >> See the manual for more instructions.
[INFO] >>
[INFO] >> You can start the MySQL daemon with:
[INFO] >>
[INFO] >> cd . ; ./bin/mysqld_safe &
[INFO] >>
[INFO] >> You can test the MySQL daemon with mysql-test-run.pl
[INFO] >>
[INFO] >> cd mysql-test ; perl mysql-test-run.pl
[INFO] >>
[INFO] >> Please report any problems with the ./bin/mysqlbug script!
[INFO] >>
[INFO] >> The latest information about MySQL is available on the web at
[INFO] >>
[INFO] >> http://www.mysql.com
[INFO] >>
[INFO] >> Support MySQL by buying support/licenses at http://shop.mysql.com
[INFO] >>
[INFO] >> New default config file was created as ./my.cnf and
[INFO] >> will be used by default by the server when you start it.
[INFO] >> You may edit this file to change server settings
[INFO] >>
[INFO] $ C:\dev\temp\mvn-mysql-plugin-test\target\mysql-dist\bin\mysqld.exe --no-defaults --general_log --console --innodb_buffer_pool_size=64M --innodb_log_file_size=64M --log_warnings --innodb_use_native_aio=0 --binlog-ignore-db=testdb --basedir=C:\dev\temp\mvn-mysql-plugin-test\target\mysql-dist --lc-messages-dir=C:\dev\temp\mvn-mysql-plugin-test\target\mysql-dist\share --datadir=C:\dev\temp\mvn-mysql-plugin-test\target\mysql-data\data --tmpdir=C:\dev\temp\mvn-mysql-plugin-test\target\mysql-data\temp --socket=C:\dev\temp\mvn-mysql-plugin-test\target\mysql-data\mysql.sock --pid-file=C:\dev\temp\mvn-mysql-plugin-test\target\mysql-data\mysql.pid --port=43444
[INFO] >> 2014-01-23 10:21:47 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
[INFO] >> 2014-01-23 10:21:47 5844 [Note] Plugin 'FEDERATED' is disabled.
[INFO] >> 2014-01-23 10:21:47 5844 [Note] InnoDB: The InnoDB memory heap is disabled
[INFO] >> 2014-01-23 10:21:47 5844 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
[INFO] >> 2014-01-23 10:21:47 5844 [Note] InnoDB: Compressed tables use zlib 1.2.3
[INFO] >> 2014-01-23 10:21:47 5844 [Note] InnoDB: Not using CPU crc32 instructions
[INFO] >> 2014-01-23 10:21:47 5844 [Note] InnoDB: Initializing buffer pool, size = 64.0M
[INFO] >> 2014-01-23 10:21:47 5844 [Note] InnoDB: Completed initialization of buffer pool
[INFO] >> 2014-01-23 10:21:47 5844 [Note] InnoDB: Highest supported file format is Barracuda.
[INFO] >> 2014-01-23 10:21:47 5844 [Warning] InnoDB: Resizing redo log from 2*3072 to 2*4096 pages, LSN=1625987
[INFO] >> 2014-01-23 10:21:47 5844 [Warning] InnoDB: Starting to delete and rewrite log files.
[INFO] >> 2014-01-23 10:21:47 5844 [Note] InnoDB: Setting log file .\ib_logfile101 size to 64 MB
[INFO] >> 2014-01-23 10:21:49 5844 [Note] InnoDB: Setting log file .\ib_logfile1 size to 64 MB
[INFO] >> 2014-01-23 10:21:51 5844 [Note] InnoDB: Renaming log file .\ib_logfile101 to .\ib_logfile0
[INFO] >> 2014-01-23 10:21:51 5844 [Warning] InnoDB: New log files created, LSN=1625987
[INFO] >> 2014-01-23 10:21:51 5844 [Note] InnoDB: 128 rollback segment(s) are active.
[INFO] >> 2014-01-23 10:21:51 5844 [Note] InnoDB: Waiting for purge to start
[INFO] >> 2014-01-23 10:21:51 5844 [Note] InnoDB: 5.6.14 started; log sequence number 1625987
[INFO] >> 2014-01-23 10:21:51 5844 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: 3ad7f984-845b-11e3-a1ee-b8ac6fcc0a81.
[INFO] >> 2014-01-23 10:21:51 5844 [Note] Server hostname (bind-address): '*'; port: 43444
[INFO] >> 2014-01-23 10:21:51 5844 [Note] IPv6 is available.
[INFO] >> 2014-01-23 10:21:51 5844 [Note] - '::' resolves to '::';
[INFO] >> 2014-01-23 10:21:51 5844 [Note] Server socket created on IP: '::'.
[INFO] >> 2014-01-23 10:21:51 5844 [Note] Event Scheduler: Loaded 0 events
[INFO] >> 2014-01-23 10:21:51 5844 [Note] C:\dev\temp\mvn-mysql-plugin-test\target\mysql-dist\bin\mysqld.exe: ready for connections.
[INFO] >> Version: '5.6.14-log' socket: '' port: 43444 MySQL Community Server (GPL)
[INFO] port 43444 is available after 4s of waiting
[INFO] $ C:\dev\temp\mvn-mysql-plugin-test\target\mysql-dist\bin\mysqladmin.exe --no-defaults --port=43444 --user=user --socket=C:\dev\temp\mvn-mysql-plugin-test\target\mysql-data\mysql.sock --host=127.0.0.1 password password
[INFO] >> C:\dev\temp\mvn-mysql-plugin-test\target\mysql-dist\bin\mysqladmin.exe: unable to change password; error: 'Can't find any matching row in the user table'
[ERROR] #start('Config(tcpport=43444, dbuser=user, dbpassword=password, name=testdb, dbopts=[])', C:\\dev\\temp\\mvn-mysql-plugin-test\\target\\mysql-dist, C:\\dev\\temp\\mvn-mysql-plugin-test\\target\\mysql-data): thrown java.lang.IllegalArgumentException(Non-zero exit code 1: \u0007C:\\dev\\temp\\mvn-mysql-plugin-test\\target\\mysql-di..54..n't find any matching row in the user table') out of com.jcabi.log.VerboseProcess#stdout[191] in 26s
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3:56.640s
[INFO] Finished at: Thu Jan 23 10:21:52 PST 2014
[INFO] Final Memory: 17M/248M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.jcabi:jcabi-mysql-maven-plugin:0.6:start (mysql-test) on project mvn-mysql-plugin-test: Execution mysql-test of goal com.jcabi:jcabi-mysql-maven-plugin:0.6:start failed: Non-zero exit code 1: \u0007C:\\dev\\temp\\mvn-mysql-plugin-test\\target\\mysql-di..54..n't find any matching row in the user table' -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
I download the mysql-dist 5.6.21 and get the issue with libaio.
The problem is that content of mysql-dist-5.6.21-linux-amd64 is wrong.
Here is the ldd output for mysql-dist-5.6.21-linux-amd64
linux-gate.so.1 => (0xf77b6000)
libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xf7777000)
libaio.so.1 => not found
librt.so.1 => /lib/i386-linux-gnu/librt.so.1 (0xf776d000)
libcrypt.so.1 => /lib/i386-linux-gnu/libcrypt.so.1 (0xf773c000)
libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xf7737000)
libstdc++.so.6 => /usr/lib/i386-linux-gnu/libstdc++.so.6 (0xf764e000)
libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0xf7608000)
libgcc_s.so.1 => /lib/i386-linux-gnu/libgcc_s.so.1 (0xf75ea000)
libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xf743a000)
/lib/ld-linux.so.2 (0xf77b7000)
and for mysql-dist-5.6.21-linux-x86
linux-vdso.so.1 => (0x00007fff54873000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f3c511e1000)
libaio.so.1 => /lib/x86_64-linux-gnu/libaio.so.1 (0x00007f3c50fdf000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f3c50dd6000)
libcrypt.so.1 => /lib/x86_64-linux-gnu/libcrypt.so.1 (0x00007f3c50b9d000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f3c50999000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f3c50694000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f3c5038e000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f3c50178000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f3c4fdb1000)
/lib64/ld-linux-x86-64.so.2 (0x00007f3c51421000)
But the should be quite opposite:
/lib/x86_64-linux-gnu
/lib/i386-linux-gnu
Please, release right package
windows amd64 package mysql_config_editor says the following:
mysql_config_editor.exe Ver 1.0 Distrib 5.6.21, for Win32 on x86
Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
windows x86 package mysql_config_editor says the following:
mysql_config_editor.exe Ver 1.0 Distrib 5.6.21, for Win64 on x86_64
Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
This is wrong and causes problems on Windows x86 systems, for example here #57 . Please release right packages.
I believe that in #47 the same problem is observed on Linux.
I got error Installing MySQL system tables...sh: 1: ./bin/mysqld: not found
after using 5.6.14 classified linux-amd64. I am on:
$ uname -r
3.10-2-amd64
Most integration test plugins have a parameter to control integration test runs or piggback on using existing parameters. Can you include a parameter or leverage existing parameters to disable integration tests to temporarily stop the plugin from running for dev builds please and save us some time?
Or support one of the following
-Dcobertura.skip -Dcassandra.skip=true -Dmaven.test.skip -DskipTests -DskipSlowTask=true Djdeb.skip=true
We use failsafe-maven-plugin to run your integration tests and
-DskipITs will skip only the integration tests (i.e. failsafe tests only)
-DskipTests will skip the surefire and failsafe tests
-Dmaven.test.skip=true will skip compiling the tests as well as running them (surefire or failsafe)
Puzzle 8-aea18ffe
in src/test/java/com/jcabi/mysql/maven/plugin/InstancesTest.java:186-189
has to be resolved: Create integration tests for Config. Integration tests 'WithConfigITCase' should be created to test that user name, password and dbname are set properly. This issue should be done after non root user name is set properly
If you have any technical questions, don't ask me, submit new tickets instead
mvn qulice:check -Pqulice
Line does not match expected header line of ' * BSD License'. (HeaderCheck)
messages.This is a known bug of qulice configuration in parent-0.31 (jcabi/jcabi-parent#19), accessed via jcabi-0.16. Suggested action is waiting until jcabi/jcabi#297 fix is released and upgrading jcabi version.
mvn install
of the latests sources hangs at line:
[info] port 55163 is available after 0ms of waiting
[info] #start('Config(tcpport=55163, dbuser=root, dbpassword=root, name=root, dbopts=[])', C:\tools\cygwin64\tmp\jcabi-mysql-maven-plugin\target\mysql-dist, C:\tools\cygwin64\tmp\1414758300767-0, false): in 1,01s
[info] #reusedExistingDatabase(): true in 12,03▒s
I am running the build on Windows 7 Pro using maven 3.2.3 and java 1.8.0_20.
Jasmine maven plugin has this option for BDD testing where it will stay active hosting a web server to inspect the tests as they run. Something like this would be very useful here.
There is no estimate in the project yet. We have to create one as explained here
I have version 0.9.0 of the plugin working under Linux and OS X, but under Windows 7 it appears that mysql_install_db.pl
does not properly create the required system tables for the MySQL server to be able to start.
[INFO] --- maven-dependency-plugin:2.9:unpack (unpack-mysql) @ myproject-distribut
ion ---
[INFO] Configured Artifact: com.jcabi:mysql-dist:windows-x86:5.5.34:zip
[INFO] mysql-dist-5.5.34-windows-x86.zip already unpacked.
[INFO]
[INFO] --- jcabi-mysql-maven-plugin:0.9:start (mysql-test) @ myproject-distributio
n ---
[INFO] jcabi-aspects 0.18/55a5c13 started new daemon thread jcabi-cacheable for
automated cleaning of expired @Cacheable values
Jan 23, 2015 2:39:34 PM org.hibernate.validator.internal.util.Version <clinit>
INFO: HV000001: Hibernate Validator 5.1.2.Final
[ERROR] JSR-303 validator failed to initialize: Unable to instantiate Configurat
ion. (see http://aspects.jcabi.com/jsr-303.html)
[INFO] jcabi-aspects 0.18/55a5c13 started new daemon thread jcabi-loggable for w
atching of @Loggable annotated methods
[INFO] reuse existing database false
[INFO] created C:\Users\IEUser\Project\packaging\distribution\target\mysql-data
directory
[INFO] $ perl C:\Users\IEUser\Project\packaging\distribution\target\mysql-dist\s
cripts\mysql_install_db.pl --defaults-file=C:\Users\IEUser\Project\packaging\dis
tribution\target\mysql-data\my-default.cnf --force --innodb_use_native_aio=0 --d
atadir=C:\Users\IEUser\Project\packaging\distribution\target\mysql-data\data --b
asedir=C:\Users\IEUser\Project\packaging\distribution\target\mysql-dist
[INFO] >> Installing MySQL system tables...OK
[INFO] >>
[INFO] >> Filling help tables...OK
[INFO] >>
[INFO] >> To start mysqld at boot time you have to copy
[INFO] >> support-files/mysql.server to the right place for your system
[INFO] >>
[INFO] >> PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
[INFO] >> To do so, start the server, then issue the following commands:
[INFO] >>
[INFO] >> C:\Users\IEUser\Project\packaging\distribution\target\mysql-dist/bin
/mysqladmin -u root password 'new-password'
[INFO] >> C:\Users\IEUser\Project\packaging\distribution\target\mysql-dist/bin
/mysqladmin -u root -h IE9Win7 password 'new-password'
[INFO] >>
[INFO] >> Alternatively you can run:
[INFO] >>
[INFO] >> C:\Users\IEUser\Project\packaging\distribution\target\mysql-dist/bin
/mysql_secure_installation
[INFO] >>
[INFO] >> which will also give you the option of removing the test
[INFO] >> databases and anonymous user created by default. This is
[INFO] >> strongly recommended for production servers.
[INFO] >>
[INFO] >> See the manual for more instructions.
[INFO] >>
[INFO] >> You can start the MySQL daemon with:
[INFO] >>
[INFO] >> cd . ; C:\Users\IEUser\Project\packaging\distribution\target\mysql-d
ist/bin/mysqld_safe &
[INFO] >>
[INFO] >> You can test the MySQL daemon with mysql-test-run.pl
[INFO] >>
[INFO] >> cd mysql-test ; perl mysql-test-run.pl
[INFO] >>
[INFO] >> Please report any problems with the ./bin/mysqlbug script!
[INFO] >>
[INFO] >> The latest information about MySQL is available on the web at
[INFO] >>
[INFO] >> http://www.mysql.com
[INFO] >>
[INFO] >> Support MySQL by buying support/licenses at http://shop.mysql.com
[INFO] >>
[INFO] $ C:\Users\IEUser\Project\packaging\distribution\target\mysql-dist\bin\my
sqld.exe --no-defaults --user=IEUser --general_log --console --innodb_buffer_poo
l_size=64M --innodb_log_file_size=64M --log_warnings --innodb_use_native_aio=0 -
-binlog-ignore-db=root --basedir=C:\Users\IEUser\Project\packaging\distribution\
target\mysql-dist --lc-messages-dir=C:\Users\IEUser\Project\packaging\distributi
on\target\mysql-dist\share --datadir=C:\Users\IEUser\Project\packaging\distribut
ion\target\mysql-data\data --tmpdir=C:\Users\IEUser\Project\packaging\distributi
on\target\mysql-data\temp --socket=C:\Users\IEUser\Project\packaging\distributio
n\target\mysql-data\mysql.sock --pid-file=C:\Users\IEUser\Project\packaging\dist
ribution\target\mysql-data\mysql.pid --port=33061
[INFO] >> 150123 14:39:35 [Note] Plugin 'FEDERATED' is disabled.
[INFO] >> C:\Users\IEUser\Project\packaging\distribution\target\mysql-dist\bin\m
ysqld.exe: Table 'mysql.plugin' doesn't exist
[INFO] >> 150123 14:39:39 [ERROR] Can't open the mysql.plugin table. Please run
mysql_upgrade to create it.
[INFO] >> 150123 14:39:40 InnoDB: The InnoDB memory heap is disabled
[INFO] >> 150123 14:39:40 InnoDB: Mutexes and rw_locks use Windows interlocked f
unctions
[INFO] >> 150123 14:39:40 InnoDB: Compressed tables use zlib 1.2.3
[INFO] >> 150123 14:39:40 InnoDB: Initializing buffer pool, size = 64.0M
[INFO] >> 150123 14:39:40 InnoDB: Completed initialization of buffer pool
[INFO] >> InnoDB: The first specified data file .\ibdata1 did not exist:
[INFO] >> InnoDB: a new database to be created!
[INFO] >> 150123 14:39:40 InnoDB: Setting file .\ibdata1 size to 10 MB
[INFO] >> InnoDB: Database physically writes the file full: wait...
[INFO] >> 150123 14:39:41 InnoDB: Log file .\ib_logfile0 did not exist: new to
be created
[INFO] >> InnoDB: Setting log file .\ib_logfile0 size to 64 MB
[INFO] >> InnoDB: Database physically writes the file full: wait...
[INFO] >> 150123 14:40:01 InnoDB: Log file .\ib_logfile1 did not exist: new to
be created
[INFO] >> InnoDB: Setting log file .\ib_logfile1 size to 64 MB
[INFO] >> InnoDB: Database physically writes the file full: wait...
[INFO] >> InnoDB: Doublewrite buffer not found: creating new
[INFO] >> InnoDB: Doublewrite buffer created
[INFO] >> InnoDB: 127 rollback segment(s) active.
[INFO] >> InnoDB: Creating foreign key constraint system tables
[INFO] >> InnoDB: Foreign key constraint system tables created
[INFO] >> 150123 14:40:14 InnoDB: Waiting for the background threads to start
[INFO] >> 150123 14:40:18 InnoDB: 5.5.34 started; log sequence number 0
[INFO] >> 150123 14:40:18 [Note] Server hostname (bind-address): '0.0.0.0'; port
: 33061
[INFO] >> 150123 14:40:18 [Note] - '0.0.0.0' resolves to '0.0.0.0';
[INFO] >> 150123 14:40:18 [Note] Server socket created on IP: '0.0.0.0'.
[INFO] >> 150123 14:40:18 [ERROR] Fatal error: Can't open and lock privilege tab
les: Table 'mysql.host' doesn't exist
[ERROR] #start('Config(tcpport=33061, dbuser=root, dbpassword=roo..14..=[connect
-timeout=60, max_connections=150])', C:\Users\IEUser\Project\packaging\distribut
ion\target\mysql-dist, C:\Users\IEUser\Project\packaging\distribution\target\mys
ql-data, false, NULL): thrown java.io.IOException(socket C:\Users\IEUser\Project
\packaging\distribution\target\mysql-data\mysql.sock is not available after 5min
of waiting) out of com.jcabi.mysql.maven.plugin.Instances#waitFor[322] in 5min
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 09:27 min
[INFO] Finished at: 2015-01-23T14:44:36-08:00
This was first reported by another of our developers and I have since reproduced the problem myself on a pretty vanilla Windows7 VM that I use for testing, on which I installed ActiveState Perl 5.20.
Interestingly there is no error reported by the perl script, but the warning about table mysql.plugin
followed by the error regarding mysql.host
suggests that the tables are not being installed properly.
I have configured the plugin to use the 5.5.34 distribution, since 5.6.14 and 5.6.21 are not able to run on Windows 7 due to separate issues.
After reading the comments on issue 39 I updated my configuration and verified that version 0.7 of the plugin does work OK on the same Windows 7 VM, so this would appear to be a problem with v0.9.
Let's configure rultor correctly, so that it can build as root
GIVEN a non-default port (such as 43444) configured in the pom
AND first running mvn clean verify
WHEN I run jcabi-mysql:start
THEN MySql should start on the configured port (43444 in this case)
Instead, it tries to start on the default 3306 port.
pom configuration:
<plugin>
<groupId>com.jcabi</groupId>
<artifactId>jcabi-mysql-maven-plugin</artifactId>
<version>0.3</version>
<executions>
<execution>
<id>mysql-test</id>
<goals>
<goal>classify</goal>
<goal>start</goal>
<goal>stop</goal>
</goals>
<configuration>
<port>43444</port>
<data>${project.build.directory}/mysql-data</data>
</configuration>
</execution>
</executions>
</plugin>
maven output:
...
[INFO] >> Support MySQL by buying support/licenses at http://shop.mysql.com
[INFO] >>
[INFO] >> WARNING: Found existing config file ./my.cnf on the system.
[INFO] >> Because this file might be in use, it was not replaced,
[INFO] >> but was used in bootstrap (unless you used --defaults-file)
[INFO] >> and when you later start the server.
[INFO] >> The new default config file was created as ./my-new.cnf,
[INFO] >> please compare it with your file and take the changes you need.
[INFO] >>
[INFO] $ C:\development\scratch\mvn-mysql-plugin-test\target\mysql-dist\bin\mysqld.exe --general_log --console --innodb_bu
ffer_pool_size=64M --innodb_log_file_size=64M --log_warnings --innodb_use_native_aio=0 --binlog-ignore-db=root --basedir
=C:\development\scratch\mvn-mysql-plugin-test\target\mysql-dist --lc-messages-dir=C:\development\scratch\mvn-mysql-plugin-te
st\target\mysql-dist\share --datadir=C:\development\scratch\mvn-mysql-plugin-test\target\mysql-data\data --tmpdir=C:\devel
opment\scratch\mvn-mysql-plugin-test\target\mysql-data\temp --socket=C:\development\scratch\mvn-mysql-plugin-test\target\mys
ql-data\mysql.sock --pid-file=C:\development\scratch\mvn-mysql-plugin-test\target\mysql-data\mysql.pid --port=3306
[INFO] port 3306 is available after 0ms of waiting
[INFO] $ C:\development\scratch\mvn-mysql-plugin-test\target\mysql-dist\bin\mysqladmin.exe --port=3306 --user=root --socke
t=C:\development\scratch\mvn-mysql-plugin-test\target\mysql-data\mysql.sock --host=127.0.0.1 password root
[INFO] >> C:\development\scratch\mvn-mysql-plugin-test\target\mysql-dist\bin\mysqladmin.exe: connect to server at '127.0.0
.1' failed
[INFO] >> error: 'Access denied for user 'root'@'localhost' (using password: NO)'
[ERROR] #start(3306, C:\\development\\scratch\\mvn-mysql-plugin-test\\target\\mysql-dist, C:\\development\\scratch\\mvn-mysq
l-plugin-test\\target\\mysql-data): thrown java.lang.IllegalArgumentException(Non-zero exit code 1: \u0007C:\\developmen
t\\scratch\\mvn-mysql-plugin-test\\target..92..ser 'root'@'localhost' (using password: NO)') out of com.jcabi.log.VerboseP
rocess#stdout[191] in 4s
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.271s
[INFO] Finished at: Mon Dec 16 08:04:43 PST 2013
[INFO] Final Memory: 9M/245M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.jcabi:jcabi-mysql-maven-plugin:1.0-SNAPSHOT:start (default-cli) on project mvn-mysql-
plugin-test: Execution default-cli of goal com.jcabi:jcabi-mysql-maven-plugin:1.0-SNAPSHOT:start failed: Non-zero exit c
ode 1: \u0007C:\\development\\scratch\\mvn-mysql-plugin-test\\target..92..ser 'root'@'localhost' (using password: NO)' ->
[Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
C:\development\scratch\mvn-mysql-plugin-test>mvn jcabi-mysql:start
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building mvn-mysql-plugin-test 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- jcabi-mysql-maven-plugin:0.3:start (default-cli) @ mvn-mysql-plugin-test ---
log4j:WARN No appenders could be found for logger (org.jboss.logging).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
[INFO] JSR-303 validator org.hibernate.validator.internal.engine.ValidatorImpl instantiated by jcabi-aspects 0.11.1/c639
37c
[INFO] jcabi-aspects 0.11.1/c63937c started new daemon thread jcabi-cacheable for automated cleaning of expired @Cacheab
le values
[INFO] jcabi-aspects 0.11.1/c63937c started new daemon thread jcabi-loggable for watching of @Loggable annotated methods
[ERROR] #start(3306, C:\\development\\scratch\\mvn-mysql-plugin-test\\target\\mysql-dist, C:\\development\\scratch\\mvn-mysq
l-plugin-test\\target\\mysql-data): thrown java.io.IOException(Unable to delete directory C:\development\scratch\mvn-mysql
-plugin-test\target\mysql-data\temp.) out of org.apache.commons.io.FileUtils#deleteDirectory[1541] in 58ms
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.674s
[INFO] Finished at: Mon Dec 16 08:05:50 PST 2013
[INFO] Final Memory: 9M/245M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.jcabi:jcabi-mysql-maven-plugin:0.3:start (default-cli) on project mvn-mysql-plugin-te
st: failed to start MySQL server: Unable to delete directory C:\development\scratch\mvn-mysql-plugin-test\target\mysql-dat
a\temp. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
C:\development\scratch\mvn-mysql-plugin-test>
This is on Windows 7 Ultimate, SP1 laptop.
Hi,
I am using your plugin for integration test. If there is no mysql running, everything works fine. But if there is, which is the case in all of our dev machines and also on jenkins build server, then the plugin starts up ok. But there is no way to connect to the plugin created server.
[INFO] >> 131218 13:15:01 InnoDB: 5.5.34 started; log sequence number 0
[INFO] >> 131218 13:15:01 [Note] Server hostname (bind-address): '0.0.0.0'; port: 41194
[INFO] >> 131218 13:15:01 [Note] - '0.0.0.0' resolves to '0.0.0.0';
[INFO] >> 131218 13:15:01 [Note] Server socket created on IP: '0.0.0.0'.
[INFO] >> 131218 13:15:01 [Note] Event Scheduler: Loaded 0 events
[INFO] >> 131218 13:15:01 [Note] /home/pahuang/work/root/server/functional-test/target/mysql-dist/bin/mysqld: ready for connections.
[INFO] >> Version: '5.5.34-log' socket: '/home/pahuang/work/root/server/functional-test/target/mdb/mysql.sock' port: 41194 MySQL Community Server (GPL)
[INFO] socket /home/pahuang/work/root/server/functional-test/target/mdb/mysql.sock is available after 4s of waiting
[INFO] $ /home/pahuang/work/root/server/functional-test/target/mysql-dist/bin/mysqladmin --port=41194 --user=root --socket=/home/pahuang/work/root/server/functional-test/target/mdb/mysql.sock --host=127.0.0.1 password root
[INFO] $ /home/pahuang/work/root/server/functional-test/target/mysql-dist/bin/mysql --port=41194 --user=root --password=root --socket=/home/pahuang/work/root/server/functional-test/target/mdb/mysql.sock
[INFO] #start(41194, /home/pahuang/work/root/server/functional-test/target/mysql-dist, /home/pahuang/work/root/server/functional-test/target/mdb): in 7s
Here is subsequent sql-maven-plugin error:
[ERROR] Failed to execute goal org.codehaus.mojo:sql-maven-plugin:1.5:execute (drop-database) on project functional-test: Access denied for user 'root'@'localhost' (using password: YES) -> [Help 1]
If I run the new "run" goal instead of "start", after it pause, I can connect with socket but not TCP. i.e. using the exact string in above output:
/home/pahuang/work/root/server/functional-test/target/mysql-dist/bin/mysql --port=41194 --user=root --password=root --socket=/home/pahuang/work/root/server/functional-test/target/mdb/mysql.sock
Because JDBC only accept TCP, and for some strange reason, even if you specify port from the plugin, it still connects to my already running mysql. That makes the plugin not self contained.
I don't know how this can be resolved neatly. Not sure whether is possible to have two mysqld running but listen on different port? Or the plugin should detect such situation and instead of starting up another server, it will simply create a user and a database (must be configurable then) in existing server. Any thoughts?
Build is broken. Sometimes this failure happens. Not always, but sometimes. I suspect that we should increase waiting time to two minutes? Not sure...
When I'm trying to start mysql in standalone mode with "mvn jcabi-mysql:start", my port and data files location options seems to be ignored. and it uses default 3306 and "target/msql-data" directories.
Might be I'm doing something wrong?
Running version 0.9.0 of the plugin, using MySQL 5.6.21, on a Windows 7 x86 machine yields warnings and then an error that the mysqld.exe
file is not compatible with this version of Windows.
[INFO] --- jcabi-mysql-maven-plugin:0.9:classify (mysql-test) @ project-distribu
tion ---
[INFO] ${mysql.classifier} set to "windows-x86"
[INFO]
[INFO] --- maven-dependency-plugin:2.9:unpack (unpack-mysql) @ project-distribut
ion ---
[INFO] Configured Artifact: com.jcabi:mysql-dist:windows-x86:5.6.21:zip
Downloaded: https://repo.maven.apache.org/maven2/com/jcabi/mysql-dist/5.6.21/mys
ql-dist-5.6.21-windows-x86.zip (335651 KB at 1228.8 KB/sec)
[INFO] Unpacking C:\Users\IEUser\.m2\repository\com\jcabi\mysql-dist\5.6.21\mysq
l-dist-5.6.21-windows-x86.zip to C:\Users\IEUser\Project\packaging\distribution\
target\mysql-dist with includes "" and excludes ""
[INFO]
[INFO] --- jcabi-mysql-maven-plugin:0.9:start (mysql-test) @ project-distributio
n ---
[INFO] jcabi-aspects 0.18/55a5c13 started new daemon thread jcabi-cacheable for
automated cleaning of expired @Cacheable values
Jan 26, 2015 3:53:43 AM org.hibernate.validator.internal.util.Version <clinit>
INFO: HV000001: Hibernate Validator 5.1.2.Final
[ERROR] JSR-303 validator failed to initialize: Unable to instantiate Configurat
ion. (see http://aspects.jcabi.com/jsr-303.html)
[INFO] jcabi-aspects 0.18/55a5c13 started new daemon thread jcabi-loggable for w
atching of @Loggable annotated methods
[INFO] reuse existing database false
[INFO] created C:\Users\IEUser\Project\packaging\distribution\target\mysql-data
directory
[INFO] $ perl C:\Users\IEUser\Project\packaging\distribution\target\mysql-dist\s
cripts\mysql_install_db.pl --defaults-file=C:\Users\IEUser\Project\packaging\dis
tribution\target\mysql-data\my-default.cnf --force --innodb_use_native_aio=0 --d
atadir=C:\Users\IEUser\Project\packaging\distribution\target\mysql-data\data --b
asedir=C:\Users\IEUser\Project\packaging\distribution\target\mysql-dist
[WARNING] >> This version of C:\Users\IEUser\Project\packaging\distribution\targ
et\mysql-dist\bin\my_print_defaults.exe is not compatible with the version of Wi
ndows you're running. Check your computer's system information to see whether yo
u need a x86 (32-bit) or x64 (64-bit) version of the program, and then contact t
he software publisher.
[WARNING] >> This version of C:\Users\IEUser\Project\packaging\distribution\targ
et\mysql-dist\bin\mysqld.exe is not compatible with the version of Windows you'r
e running. Check your computer's system information to see whether you need a x8
6 (32-bit) or x64 (64-bit) version of the program, and then contact the software
publisher.
[INFO] >> Installing MySQL system tables...OK
[INFO] >>
[WARNING] >> This version of C:\Users\IEUser\Project\packaging\distribution\targ
et\mysql-dist\bin\mysqld.exe is not compatible with the version of Windows you'r
e running. Check your computer's system information to see whether you need a x8
6 (32-bit) or x64 (64-bit) version of the program, and then contact the software
publisher.
[INFO] >> Filling help tables...OK
[INFO] >>
[INFO] >> To start mysqld at boot time you have to copy
[INFO] >> support-files/mysql.server to the right place for your system
[INFO] >>
[INFO] >> PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
[INFO] >> To do so, start the server, then issue the following commands:
[INFO] >>
[INFO] >> C:\Users\IEUser\Project\packaging\distribution\target\mysql-dist/bin
/mysqladmin -u root password 'new-password'
[INFO] >> C:\Users\IEUser\Project\packaging\distribution\target\mysql-dist/bin
/mysqladmin -u root -h IE9Win7 password 'new-password'
[INFO] >>
[INFO] >> Alternatively you can run:
[INFO] >>
[INFO] >> C:\Users\IEUser\Project\packaging\distribution\target\mysql-dist/bin
/mysql_secure_installation
[INFO] >>
[INFO] >> which will also give you the option of removing the test
[INFO] >> databases and anonymous user created by default. This is
[INFO] >> strongly recommended for production servers.
[INFO] >>
[INFO] >> See the manual for more instructions.
[INFO] >>
[INFO] >> You can start the MySQL daemon with:
[INFO] >>
[INFO] >> cd . ; C:\Users\IEUser\Project\packaging\distribution\target\mysql-d
ist/bin/mysqld_safe &
[INFO] >>
[INFO] >> You can test the MySQL daemon with mysql-test-run.pl
[INFO] >>
[INFO] >> cd mysql-test ; perl mysql-test-run.pl
[INFO] >>
[INFO] >> Please report any problems at http://bugs.mysql.com/
[INFO] >>
[INFO] >> The latest information about MySQL is available on the web at
[INFO] >>
[INFO] >> http://www.mysql.com
[INFO] >>
[INFO] >> Support MySQL by buying support/licenses at http://shop.mysql.com
[INFO] >>
[INFO] >> New default config file was created as C:\Users\IEUser\Project\packagi
ng\distribution\target\mysql-dist/my.ini and
[INFO] >> will be used by default by the server when you start it.
[INFO] >> You may edit this file to change server settings
[INFO] >>
[INFO] $ C:\Users\IEUser\Project\packaging\distribution\target\mysql-dist\bin\my
sqld.exe --no-defaults --user=IEUser --general_log --console --innodb_buffer_poo
l_size=64M --innodb_log_file_size=64M --log_warnings --innodb_use_native_aio=0 -
-binlog-ignore-db=root --basedir=C:\Users\IEUser\Project\packaging\distribution\
target\mysql-dist --lc-messages-dir=C:\Users\IEUser\Project\packaging\distributi
on\target\mysql-dist\share --datadir=C:\Users\IEUser\Project\packaging\distribut
ion\target\mysql-data\data --tmpdir=C:\Users\IEUser\Project\packaging\distributi
on\target\mysql-data\temp --socket=C:\Users\IEUser\Project\packaging\distributio
n\target\mysql-data\mysql.sock --pid-file=C:\Users\IEUser\Project\packaging\dist
ribution\target\mysql-data\mysql.pid --port=33061
[ERROR] #start('Config(tcpport=33061, dbuser=root, dbpassword=roo..14..=[connect
-timeout=60, max_connections=150])', C:\Users\IEUser\Project\packaging\distribut
ion\target\mysql-dist, C:\Users\IEUser\Project\packaging\distribution\target\mys
ql-data, false, NULL): thrown java.io.IOException(Cannot run program "C:\Users\I
EUser\Project\packaging\distribution\target\mysql-dist\bin\mysqld.exe" (in direc
tory "C:\Users\IEUser\Project\packaging\distribution\target\mysql-dist"): Create
Process error=216, This version of %1 is not compatible with the version of Wind
ows you're running. Check your computer's system information to see whether you
need a x86 (32-bit) or x64 (64-bit) version of the program, and then contact the
software publisher) out of java.lang.ProcessBuilder#start[1048] in 7s
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 10:05 min
[INFO] Finished at: 2015-01-26T03:53:50-08:00
[INFO] Final Memory: 67M/359M
[INFO] ------------------------------------------------------------------------
Hello,
If I just do a 'mvn pre-integration-test' command, is there a way/setting I can have the MySQL server keep running (for manual tests, let's say)? It seems it still tries to issue a 'stop' even though I didn't reach the post-integration-test phase.
Hello,
I'm running integration test with mysql but TeamCity fails to build because the plugin return a non-zero code.
How I can deal with it?
Thank you
Here is the log when I run $ mvn verify
[INFO] $ /home/foo/work/client/projectname/workspace/projectname/tests/databases/run-mysql/target/mysql-instance/bin/mysqld --no-defaults --general_log --console --innodb_buffer_pool_size=64M --innodb_log_file_size=64M --log_warnings --innodb_use_native_aio=0 --binlog-ignore-db=root --basedir=/home/foo/work/client/projectname/workspace/projectname/tests/databases/run-mysql/target/mysql-instance --lc-messages-dir=/home/foo/work/client/projectname/workspace/projectname/tests/databases/run-mysql/target/mysql-instance/share --datadir=/tmp/mysql.foo/data --tmpdir=/tmp/mysql.foo/temp --socket=/tmp/mysql.foo/mysql.sock --pid-file=/tmp/mysql.foo/mysql.pid --port=3306
[INFO] port 3306 is available after 0ms of waiting
[INFO] $ /home/foo/work/client/projectname/workspace/projectname/tests/databases/run-mysql/target/mysql-instance/bin/mysqladmin --no-defaults --port=3306 --user=root --socket=/tmp/mysql.foo/mysql.sock --host=127.0.0.1 password root
[INFO] >> /home/foo/work/client/projectname/workspace/projectname/tests/databases/run-mysql/target/mysql-instance/bin/mysqladmin: connect to server at '127.0.0.1' failed
[INFO] >> error: 'Access denied for user 'root'@'localhost' (using password: NO)'
[ERROR] #start('Config(tcpport=3306, dbuser=root, dbpassword=root..78..at=Barracuda, max_allowed_packet=32000000])', /home/foo/work/client/projectname/wor..12..ts/databases/run-mysql/target/mysql-instance, /tmp/mysql.foo): thrown java.lang.IllegalArgumentException(Non-zero exit code 1: \u0007/home/foo/work/client/projectname/wo..140..er 'root'@'localhost' (using password: NO)') out of com.jcabi.log.VerboseProcess#stdout[191] in 9s
On Ubuntu 12.04 Desktop I see:
Installing MySQL system tables...
2013-10-09 09:27:26 6463 [Warning] Buffered warning: Changed limits: max_open_files: 4096 (requested 5000)
2013-10-09 09:27:26 6463 [Warning] Buffered warning: Changed limits: table_cache: 1967 (requested 2000)
2013-10-09 09:27:26 6463 [Note] InnoDB: The InnoDB memory heap is disabled
2013-10-09 09:27:26 6463 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2013-10-09 09:27:26 6463 [Note] InnoDB: Compressed tables use zlib 1.2.3
2013-10-09 09:27:26 6463 [Note] InnoDB: Using Linux native AIO
2013-10-09 09:27:26 6463 [Note] InnoDB: Not using CPU crc32 instructions
2013-10-09 09:27:26 6463 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2013-10-09 09:27:26 6463 [Note] InnoDB: Completed initialization of buffer pool
2013-10-09 09:27:26 6463 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created!
2013-10-09 09:27:26 6463 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB
2013-10-09 09:27:26 6463 [Note] InnoDB: Database physically writes the file full: wait...
2013-10-09 09:27:26 6463 [Note] InnoDB: Setting log file ./ib_logfile101 size to 48 MB
2013-10-09 09:27:30 6463 [Note] InnoDB: Setting log file ./ib_logfile1 size to 48 MB
2013-10-09 09:27:31 7fdc6d10b740 InnoDB: Operating system error number 22 in a file operation.
InnoDB: Error number 22 means 'Invalid argument'.
InnoDB: Some operating system error numbers are described at
InnoDB: http://dev.mysql.com/doc/refman/5.6/en/operating-system-error-codes.html
2013-10-09 09:27:31 6463 [ERROR] InnoDB: File ./ib_logfile101: 'aio write' returned OS error 122. Cannot continue operation
See also http://stackoverflow.com/questions/19265916/file-ib-logfile101-aio-write-returned-os-error-122
Nice project.
But there is a small lack.
You should make Instances public or put it in another project in the way we can use it outside maven lifecycle. For example in ITs.
Below is the error log. I use version 0.8.1, windows 8, mysql.classifier=windows-amd64
my-default.cnf is present at the given location, but the error log says it can not find it
[INFO] $ perl C:....\smoke-test\target\mysql-dist\scripts\mysql_install_db.pl --defaults-file=C:....\smoke-test\target\mysql-data\my-default.cnf --force --innodb_use_native_aio=0 --datadir=C:....\smoke-test\target\mysql-data\data --basedir=C:....\smoke-test\target\mysql-dist
[INFO] >> FATAL ERROR: Could not find my-default.cnf
[INFO] >>
[INFO] >> If you compiled from source, you need to run 'make install' to
[INFO] >> copy the software into the correct location ready for operation.
[INFO] >>
[INFO] >> If you are using a binary release, you must either be at the top
[INFO] >> level of the extracted archive, or pass the --basedir option
[INFO] >> pointing to that location.
[INFO] >>
I would like to start/stop MySQL instances from my Java test code. Is this supported? If not, can such support be added? Thank you.
Copyright sections still feature 2014 as a year.
If the maven module is built in a deep enough directory location, and <data/>
configuration setting points to somewhere inside ${project.build.directory}
(which is the default), MySQL will not start due to failure to open a Unix socket (see below).
A workaround is to point <data/>
to a fixed location with a shorter path (say, under /tmp). But I'd still like to be able to have my data under ${project.build.directory}
, so that all mysql files are properly deleted on executing mvn clean
.
[INFO] >> 2014-12-02 10:34:18 27956 [ERROR] The socket file path is too long (> 103): /Users/sbelov/very-long-directory-name-ftw-here-we-come-again-very-long-directory-name-ftw/very-long-directory-name-ftw-here-we-come-again-very-long-directory-name-ftw/very-long-directory-name-ftw-here-we-come-again-very-long-directory-name-ftw/xxx/xxx/target/mysql-data/mysql.sock
The build is broken for a very strange reason, see http://www.rultor.com/t/934-60200725 (for example).
[info] $ /home/vagrant/jcabi-mysql-maven-plugin/target/mysql-dist/scripts/mysql_install_db --defaults-file=/tmp/1414050373727-0/my-default.cnf --force --innodb_use_native_aio=0 --datadir=/tmp/1414050373727-0/data --basedir=/home/vagrant/jcabi-mysql-maven-plugin/target/mysql-dist
[warn] >> sh: 1: /home/vagrant/jcabi-mysql-maven-plugin/target/mysql-dist/bin/my_print_defaults: not found
[warn] >> sh: 1: /home/vagrant/jcabi-mysql-maven-plugin/target/mysql-dist/bin/mysqld: not found
Let's investigate and fix
Let's create my-default.cnf
file instead of copying it from ZIP archive
Port is not set through Maven config
Running with "data" directory inside "target" and path to "target" is quite long (my project is large). Get following error at mysqld startup:
[ERROR] The socket file path is too long (> 107): /home/very/long/path/target/mysql-data/mysql.sock
Most probably this is not a bug, but a known issue with mysql(( May be it worth to add to the plugin option which will keep data in temporary directory inside /tmp and clean it up on shutdown? Or any other not-very-ugly workaround?
Environment: Ubuntu 12.04 64bit, jcabi-mysql-maven-plugin:0.4, mysql-dist:5.6.14
Yegor, thanks, very helpful plugin!
Let's use com.jcabi:jcabi:1.4
as a parent pom
project. Now we're using com.jcabi:parent
let's move mysql artifacts to sonatype repository (or even to Maven Central)
Mysql fails to start with the last version.
one of builds on Travis is failed. Looks like a bug somewhere
out of java.lang.ProcessBuilder#start[1047] in 56ms Tests run: 7, Failures: 0, Errors: 7, Skipped: 0, Time elapsed: 0.453 sec <<< FAILURE! - in com.jcabi.mysql.maven.plugin.InstancesTest willCreateDatabaseEvenWithoutClear(com.jcabi.mysql.maven.plugin.InstancesTest) Time elapsed: 0.062 sec <<< ERROR! java.io.IOException: Cannot run program "/home/travis/build/jcabi/jcabi-mysql-maven-plugin/target/mysql-dist/bin/mysqld" (in directory "/home/travis/build/jcabi/jcabi-mysql-maven-plugin/target/mysql-dist"): error=2, No such file or directory at java.lang.ProcessBuilder.start(ProcessBuilder.java:1047) at com.jcabi.mysql.maven.plugin.Instances.process(Instances.java:213) at com.jcabi.mysql.maven.plugin.Instances.start_aroundBody0(Instances.java:130) at com.jcabi.mysql.maven.plugin.Instances$AjcClosure1.run(Instances.java:1) at org.aspectj.runtime.reflect.JoinPointImpl.proceed(JoinPointImpl.java:149) at com.jcabi.aspects.aj.MethodLogger.wrap(MethodLogger.java:212) at com.jcabi.aspects.aj.MethodLogger.ajc$inlineAccessMethod$com_jcabi_aspects_aj_MethodLogger$com_jcabi_aspects_aj_MethodLogger$wrap(MethodLogger.java:1) at com.jcabi.aspects.aj.MethodLogger.wrapClass(MethodLogger.java:136) at com.jcabi.mysql.maven.plugin.Instances.start(Instances.java:123) at com.jcabi.mysql.maven.plugin.InstancesTest.willCreateDatabaseEvenWithoutClear(InstancesTest.java:361) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
It happens from time to time
Now it blocks #58
full log: https://travis-ci.org/jcabi/jcabi-mysql-maven-plugin/builds/49018546
Hi,
I'm launching jcabi-mysql:start and got this warning:
[INFO] >> WARNING: Default config file /etc/mysql/my.cnf exists on the system
[INFO] >> This file will be read by default by the MySQL server
[INFO] >> If you do not want to use this, either remove it, or use the
[INFO] >> --defaults-file argument to mysqld_safe when starting the server
and after I got a:
[INFO] >> [...]/target/mysql-dist/bin/mysqld: File '/var/log/mysql/mariadb-bin.index' not found (Errcode: 2 - No such file or directory)
[INFO] >> 2014-01-10 15:57:34 13512 [ERROR] Aborting
[INFO] >>
[INFO] >> 2014-01-10 15:57:34 13512 [Note] Binlog end
[INFO] >> 2014-01-10 15:57:34 13512 [Note] [...]/target/mysql-dist/bin/mysqld: Shutdown complete
(yes, I use mariadb on my own machine)
Hi,
I'm trying to configure/run jcabi-mysql-maven-plugin for the first time by pretty much copying/pasting instructions here:
http://www.jcabi.com/jcabi-mysql-maven-plugin/usage.html
I am getting the following error when I run mvn clean pre-integration-test:
[ERROR] #start(55717, C:\dev\intellij\gen<my-project>\target\mysql-dist, C:\dev\intellij\gen<my-project>\target\mysql-data): thrown java.lang.IllegalStateException(java.io.IOException: Cannot run program "perl" (in directory "C:\dev\intellij\gen\target\mysql-dist"): CreateProcess error=2, The system cannot find the file specified) out of com.jcabi.log.VerboseProcess#[88] in 40ms
Does perl need to be installed on the machine running the build?
I really like what this does and I've gotten it working locally etc. but the perl dependency has me worried. Most of my coworkers have Windows boxes which means they will need to install perl in order to run an integration test suite dependent on this plugin. I noticed that MySQL used to publish a Connector/MXJ but it is no longer supported (see http://dev.mysql.com/doc/connector-mxj/en/connector-mxj.html). It looks like it did a lot of the same thing but it didn't have a perl dependency. Would it be possible to remove the perl dependency? The MXJ sources are available if they would help. Thanks.
Hello,
I am trying fix the table names in lower case, in Ubuntu:
<plugin>
<groupId>com.jcabi</groupId>
<artifactId>jcabi-mysql-maven-plugin</artifactId>
<version>0.4</version>
<executions>
<execution>
<id>mysql-test</id>
<goals>
<goal>classify</goal>
<goal>start</goal>
<goal>stop</goal>
</goals>
<configuration>
<port>${mysql.port}</port>
<data>${project.build.directory}/mysql-data</data>
<systemPropertyVariables>
<lower_case_table_names>1</lower_case_table_names>
</systemPropertyVariables>
</configuration>
</execution>
</executions>
</plugin>
But not work...
It is possible set any this variable or set in "my.cnf" file?
os.arch
is i386
in Java on 32-bit Linux platforms, so jcabi-mysql-maven-plugin:classify
sets ${mysql.classifier}
to i386
. com.jcabi:mysql-dist
versions are deployed with a classifier of linux-x86
, which means that artifact downloads using the variable fail.
(The workaround of setting mysql.classifier
directly in a Linux/i386-specific profile causes jcabi-mysql-maven-plugin:classify
to fail; that makes it necessary for each target platform to have its own profile and the :classify
execution to be removed from the POM.)
link mentioned in README.md
http://www.yegor256.com/2014/05/21/mysql-maven-plugin.html
doesn't work
When plugin shuts down, this is what I see in logs:
[WARNING] escalated exception: java.lang.IllegalArgumentException: java.io.IOException: Stream closed
at com.jcabi.log.VerboseRunnable$1.run(VerboseRunnable.java:142)
at com.jcabi.log.VerboseRunnable.run(VerboseRunnable.java:201)
at java.lang.Thread.run(Thread.java:701)
Caused by: java.io.IOException: Stream closed
at java.io.BufferedInputStream.getBufIfOpen(BufferedInputStream.java:162)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:272)
at java.io.BufferedInputStream.read(BufferedInputStream.java:334)
at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:282)
at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:324)
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:176)
at java.io.InputStreamReader.read(InputStreamReader.java:184)
at java.io.BufferedReader.fill(BufferedReader.java:153)
at java.io.BufferedReader.readLine(BufferedReader.java:316)
at java.io.BufferedReader.readLine(BufferedReader.java:379)
at com.jcabi.log.VerboseProcess$1.call(VerboseProcess.java:260)
at com.jcabi.log.VerboseProcess$1.call(VerboseProcess.java:249)
at com.jcabi.log.VerboseRunnable$1.run(VerboseRunnable.java:139)
... 2 more
Doesn't affect anything, but is rather annoying. Would be great to fix.
We need to release new version of mysql-dist with mysql 5.6.21 of higher.
Issue #39 should be fixed in that version.
Hello,
Another request / question, please. Is there a way to configure custom username, password, and dbname? For example, something like this?:
<configuration>
<port>${mysql.port}</port>
<data>${project.build.directory}/mysql-data</data>
<user>myuser</user>
<password>mypassword</password>
<dbname>otherthanroot</dbname>
</configuration>
[INFO] [INFO] --- maven-enforcer-plugin:1.3.1:enforce (enforce-maven-same-versions) @ jcabi-mysql-maven-plugin --- [WARNING] Rule 0: org.apache.maven.plugins.enforcer.RequireMavenVersion failed with message: Detected Maven Version: 3.1.1 is not in the allowed range 3.2.1. [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 26.009s [INFO] Finished at: Wed Jan 28 12:54:34 MSK 2015 [INFO] Final Memory: 17M/981M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:1.3.1:enforce (enforce-maven-same-versions) on project jcabi-mysql-maven-plugin: Some Enforcer rules have failed. Look above for specific messages explaining why the rule failed. -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:1.3.1:enforce (enforce-maven-same-versions) on project jcabi-mysql-maven-plugin: Some Enforcer rules have failed. Look above for specific messages explaining why the rule failed. at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:317) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214) at org.apache.maven.cli.MavenCli.main(MavenCli.java:158) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356) Caused by: org.apache.maven.plugin.MojoExecutionException: Some Enforcer rules have failed. Look above for specific messages explaining why the rule failed. at org.apache.maven.plugins.enforcer.EnforceMojo.execute(EnforceMojo.java:209) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208) ... 19 more [ERROR] [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
JAVA_HOME="/Library/Java/JavaVirtualMachines/jdk1.7.0_09.jdk/Contents/Home" MAVEN_OPTS="-Xms1g -Xmx1g -XX:MaxPermSize=256m" mvn -e install -Pqulice
Building on Fedora 20, I get a number of error messages like this (with long periods with no output which make me think the build is tuck):
[info] >> /home/sflaniga/NotBackedUp/src/jcabi-mysql-maven-plugin/target/mysql-dist/bin/mysqld: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory
[error] #start('Config(tcpport=34756, dbuser=root, dbpassword=root, name=root, dbopts=[])', /home/sflaniga/NotBackedUp/src/jcabi-mysql-maven-plugin/target/mysql-dist, /tmp/1417590291404-0, false): thrown java.io.IOException(socket /tmp/1417590291404-0/mysql.sock is not available after 5min of waiting) out of com.jcabi.mysql.maven.plugin.Instances#waitFor[314] in 5min
I'll attach the complete log when the build finishes (or I give up waiting for it).
To speed up testing it would be nice to be able to reuse a database. In our particular case it is running a couple of sql scripts to fill the database afterwards, and it would speed up the work of developers if that step wasn't necessary every time.
I forked the code and modified it to do just that. This is currently only being used if the optional option "clearexistingdata" is set to "false" (default is "true").
The fork can be found here https://github.com/ChristianRedl/jcabi-mysql-maven-plugin We are currently using this internally, and once we are happy with it, I will do a pull request and leave it up to you if you want to embrace the changes.
While at it, I made one additional change by supplying the "--defaults-file" rather than overwriting the file inside the mysql dist directory. The motivation was to no longer require write access to this folder.
Please, publish a new release 0.9 (or higher). Don't forget to update us here regularly (at least once a week), as explained in this article.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.