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

Mysql failing to start, can not find my-default.cnf #39

Open
gdogaru opened this issue Sep 16, 2014 · 18 comments
Open

Mysql failing to start, can not find my-default.cnf #39

gdogaru opened this issue Sep 16, 2014 · 18 comments

Comments

@gdogaru
Copy link

gdogaru commented Sep 16, 2014

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] >>
@yegor256
Copy link
Member

Can you please post a full path, without that ...? I suspect, you have spaces in it..

@mfulton26
Copy link

@yegor256, I have the same problem. No spaces. :-(

I'm running Windows 7 SP1 and I've tried this with both Strawberry Perl and ActiveState Perl.

[INFO] --- jcabi-mysql-maven-plugin:0.8.1:start (mysql-test) @ test-project ---
[INFO] jcabi-aspects 0.17.1/8b0e260 started new daemon thread jcabi-cacheable for automated cleaning of expired @Cacheable values
[ERROR] JSR-303 validator failed to initialize: Unable to instantiate Configuration. (see http://www.jcabi.com/jcabi-aspects/jsr-303.html)
[INFO] jcabi-aspects 0.17.1/8b0e260 started new daemon thread jcabi-loggable for watching of @Loggable annotated methods
[INFO] reuse existing database false
[INFO] created C:\Users\mfulton\Documents\GitHub\test-project\server\target\mysql-data directory
[INFO] $ perl C:\Users\mfulton\Documents\GitHub\test-project\server\target\mysql-dist\scripts\mysql_install_db.pl --defaults-file=C:\Users\mfulton\Documents\GitHub\test-project\server\target\mysql-data\my-default.cnf --force --innodb_use_native_aio=0 --datadir=C:\Users\mfulton\Documents\GitHub\test-project\server\target\mysql-data\data --basedir=C:\Users\mfulton\Documents\GitHub\test-project\server\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] >> 
[INFO] $ C:\Users\mfulton\Documents\GitHub\test-project\server\target\mysql-dist\bin\mysqld.exe --no-defaults --user=mfulton --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=C:\Users\mfulton\Documents\GitHub\test-project\server\target\mysql-dist --lc-messages-dir=C:\Users\mfulton\Documents\GitHub\test-project\server\target\mysql-dist\share --datadir=C:\Users\mfulton\Documents\GitHub\test-project\server\target\mysql-data\data --tmpdir=C:\Users\mfulton\Documents\GitHub\test-project\server\target\mysql-data\temp --socket=C:\Users\mfulton\Documents\GitHub\test-project\server\target\mysql-data\mysql.sock --pid-file=C:\Users\mfulton\Documents\GitHub\test-project\server\target\mysql-data\mysql.pid --port=61401
[INFO] >> 2014-09-18 11:43:00 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
[INFO] >> 2014-09-18 11:43:00 9264 [Warning] Can't create test file C:\Users\mfulton\Documents\GitHub\test-project\server\target\mysql-data\data\S-R9GM5EN.lower-test
[INFO] >> 2014-09-18 11:43:00 9264 [Warning] Can't create test file C:\Users\mfulton\Documents\GitHub\test-project\server\target\mysql-data\data\S-R9GM5EN.lower-test
[INFO] >> �C:\Users\mfulton\Documents\GitHub\test-project\server\target\mysql-dist\bin\mysqld.exe: Can't change dir to 'C:\Users\mfulton\Documents\GitHub\test-project\server\target\mysql-data\data\' (Errcode: 2 - No such file or directory)
[INFO] >> 2014-09-18 11:43:00 9264 [ERROR] Aborting
[INFO] >> 
[INFO] >> 2014-09-18 11:43:00 9264 [Note] Binlog end
[INFO] >> 2014-09-18 11:43:00 9264 [Note] C:\Users\mfulton\Documents\GitHub\test-project\server\target\mysql-dist\bin\mysqld.exe: Shutdown complete
[INFO] >> 
[WARNING] #start('Config(tcpport=61401, dbuser=root, dbpassword=root, name=root, dbopts=[])', C:\Users\mfulton\Documents\GitHub\test-project\server\target\mysql-dist, C:\Users\mfulton\Documents\GitHub\test-project\server\target\mysql-data, true): takes more than 1min, 2min already, thread=main/RUNNABLE
[WARNING] #start('Config(tcpport=61401, dbuser=root, dbpassword=root, name=root, dbopts=[])', C:\Users\mfulton\Documents\GitHub\test-project\server\target\mysql-dist, C:\Users\mfulton\Documents\GitHub\test-project\server\target\mysql-data, true): takes more than 1min, 3min already, thread=main/RUNNABLE
[WARNING] #start('Config(tcpport=61401, dbuser=root, dbpassword=root, name=root, dbopts=[])', C:\Users\mfulton\Documents\GitHub\test-project\server\target\mysql-dist, C:\Users\mfulton\Documents\GitHub\test-project\server\target\mysql-data, true): takes more than 1min, 4min already, thread=main/TIMED_WAITING
[WARNING] #start('Config(tcpport=61401, dbuser=root, dbpassword=root, name=root, dbopts=[])', C:\Users\mfulton\Documents\GitHub\test-project\server\target\mysql-dist, C:\Users\mfulton\Documents\GitHub\test-project\server\target\mysql-data, true): takes more than 1min, 5min already, thread=main/TIMED_WAITING
[ERROR] #start('Config(tcpport=61401, dbuser=root, dbpassword=root, name=root, dbopts=[])', C:\Users\mfulton\Documents\GitHub\test-project\server\target\mysql-dist, C:\Users\mfulton\Documents\GitHub\test-project\server\target\mysql-data, true): thrown java.io.IOException(socket C:\Users\mfulton\Documents\GitHub\test-project\server\target\mysql-data\mysql.sock is not available after 5min of waiting) out of com.jcabi.mysql.maven.plugin.Instances#waitFor[314] in 5min
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5:55.092s
[INFO] Finished at: Thu Sep 18 11:47:59 MDT 2014
[INFO] Final Memory: 86M/339M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.jcabi:jcabi-mysql-maven-plugin:0.8.1:start (mysql-test) on project test-project: failed to start MySQL server: socket C:\Users\mfulton\Documents\GitHub\test-project\server\target\mysql-data\mysql.sock is not available after 5min of waiting -> [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

@yegor256
Copy link
Member

let me try to reproduce it on Windows

@yegor256
Copy link
Member

I confirm, it's a bug. The latest version (0.8.1) of the plugin doesn't work on Windows. Version 0.7 works fine though. You can use it for now. I will try to fix the problem as soon as possible.

@dmarkov
Copy link

dmarkov commented Sep 22, 2014

I'll ask someone to take care of this task soon

@dmarkov
Copy link

dmarkov commented Sep 23, 2014

@longtimeago it's your task now, go ahead

@longtimeago
Copy link
Contributor

@yegor256 Windows version of mysql_install_dp.pl script search for my-default.cnf in following locations:

  • $basedir/my-default.cnf
  • $basedir/share/my-default.cnf
  • $basedir/share/mysql/my-default.cnf
  • $basedir/support-files/my-default.cnf
    where $basedir is $target\mysql-dist.

But we specify absolute path to my-default.cnf in temp dir

So, I can't do much here, as this is a bug in windows version of mysql_install_dp.pl

@yegor256
Copy link
Member

but version 0.7 works fine... we changed something recently and the plugin stopped to work.. or I missed your point?

@longtimeago
Copy link
Contributor

in version 0.7 we don't specify path for my-default.cnf
In 0.7 we use --no-defaults
In 0.8 we use --defaults-file=%s and get the issue

@longtimeago
Copy link
Contributor

There is no such issue on linux because for linux mysql_install_dp.pl script is a bit different

@yegor256
Copy link
Member

So you're saying that --defaults-file doesn't work on Windows?

@longtimeago
Copy link
Contributor

it works but understands only relative paths (relative to basedir), but we are trying absolute

@yegor256
Copy link
Member

Well, two options come to mind: 1) convert absolute path to relative or 2) copy the file

@longtimeago
Copy link
Contributor

I've registered a bug on mysql bugtracker
http://bugs.mysql.com/bug.php?id=74058

@longtimeago
Copy link
Contributor

Convert absolute path to relative is not the case. Given:
basedir = D:\Pasha\Github\jcabi-mysql-maven-plugin\target\mysql-dist
defaults-file=C:\Users\Paul\AppData\Local\Temp\1411574948641-0\my-default.cnf
Is it possible to make relative path from $defaults-file with $basedir as basdir? I'm not sure

There is no need to copy, as we create my-default.cnf from code. We can create it in directly basedir (may be an issue with permissions on linux).

I'll provide the fix in a min. This will allow us to make some progress.
Unfortunately, build freezing in the middle for unknown reason.

longtimeago pushed a commit to longtimeago/jcabi-mysql-maven-plugin that referenced this issue Sep 24, 2014
@longtimeago
Copy link
Contributor

@yegor256 PR is available for review #42

longtimeago pushed a commit to longtimeago/jcabi-mysql-maven-plugin that referenced this issue Sep 30, 2014
yegor256 pushed a commit that referenced this issue Sep 30, 2014
yegor256 pushed a commit that referenced this issue Sep 30, 2014
@dmarkov
Copy link

dmarkov commented Jan 22, 2015

@longtimeago this task is not yours any more (took too long), please stop

added -60 to your rating, now it is equal to +1237

@Ivorlun
Copy link

Ivorlun commented Nov 25, 2016

Two years have passed and probem still remains on Windows 10 x64.

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

6 participants