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

Socket file path is too long #50

Open
sbelov opened this issue Dec 2, 2014 · 13 comments
Open

Socket file path is too long #50

sbelov opened this issue Dec 2, 2014 · 13 comments

Comments

@sbelov
Copy link

sbelov commented Dec 2, 2014

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
@sbelov
Copy link
Author

sbelov commented Dec 2, 2014

Proposed solution: socket file location should be a configuration option with a sensible default.

@yegor256
Copy link
Member

yegor256 commented Dec 2, 2014

@sbelov take a look: #10 Does it help?

@sbelov
Copy link
Author

sbelov commented Dec 2, 2014

I believe it should work for me - will try it out; I think adding a
socketFile configuration parameter to the plugin is still a reasonable idea
though.

Thanks!

  • Stan

On Tue, Dec 2, 2014 at 11:48 AM, Yegor Bugayenko notifications@github.com
wrote:

@sbelov https://github.com/sbelov take a look: #10
#10 Does it
help?


Reply to this email directly or view it on GitHub
#50 (comment)
.

@yegor256
Copy link
Member

yegor256 commented Dec 2, 2014

yeah, totally agree. would you be interested to submit a pull request?

@seanf
Copy link
Contributor

seanf commented Dec 3, 2014

After moving mysql data under /tmp, following the advice in #10 , I found that Hibernate started giving errors like these:

WARN  [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (default task-50) SQL Error: 1146, SQLState: 42S02
ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (default task-50) Table 'root.HT_HDocument' doesn't exist
WARN  [org.hibernate.hql.spi.TemporaryTableBulkIdStrategy] (default task-50) unable to drop temporary id table after use [Unknown table 'HT_HDocument']
...
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'root.HT_HDocument' doesn't exist

So I created a patch to let me put just the socket file under /tmp: #51.

@seanf
Copy link
Contributor

seanf commented Dec 4, 2014

I'm having trouble reproducing the temp table problem I mentioned above, so it might not have been related to putting mysql-data under /tmp. I'm not sure.

In any case, #51 has just been merged, for what it's worth. Thanks @yegor256

@yegor256
Copy link
Member

yegor256 commented Dec 4, 2014

@rultor release, tag is 0.9

@rultor
Copy link
Contributor

rultor commented Dec 4, 2014

@rultor release, tag is 0.9

@yegor256 OK, I will release it now. Please check the progress here

@rultor
Copy link
Contributor

rultor commented Dec 4, 2014

@rultor release, tag is 0.9

@yegor256 Done! FYI, the full log is here (took me 17min)

@yegor256
Copy link
Member

yegor256 commented Dec 4, 2014

@seanf version 0.9 is in Maven Central already. many thanks for your contribution!

@yegor256
Copy link
Member

yegor256 commented Dec 4, 2014

@sbelov please close the issue if the solution is good enough

@yegor256
Copy link
Member

@sbelov ping...

@seanf
Copy link
Contributor

seanf commented Jan 30, 2015

FWIW, I did see the temp table problem (#50 (comment)) again, but not since I started using the new <socket> parameter. Moving the data out of /tmp seems to have helped.

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

No branches or pull requests

4 participants