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

Can't locate the server executable (mysqld) #2745

Closed
oshliaer opened this issue Apr 12, 2020 · 9 comments
Closed

Can't locate the server executable (mysqld) #2745

oshliaer opened this issue Apr 12, 2020 · 9 comments

Comments

@oshliaer
Copy link

OK. I'm newbie.

The next command

$>  docker run -it -p 3000:3000 -v /raid/huginn/mysql-data:/var/lib/mysql huginn/huginn

returns

2020-04-12 18:49:08,236 INFO spawned: 'bootstrap' with pid 370
2020-04-12 18:49:08,248 INFO success: bootstrap entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-04-12 18:49:08,254 INFO exited: bootstrap (exit status 1; not expected)
2020-04-12 18:49:09,262 INFO success: stdout entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
bootstrap stdout | DATABASE_HOST=localhost
bootstrap stdout | 2020-04-12 18:49:08 [WARNING] mysql_install_db is deprecated. Please consider switching to mysqld --initialize
bootstrap stderr | 2020-04-12 18:49:08 [ERROR]   Can't locate the server executable (mysqld).

I know about

Additionals

$> docker -v
Docker version 19.03.8, build afacb8b7f0

$> docker images -a
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
huginn/huginn       latest              fe74dfe838ba        3 days ago          1.1GB

$> sudo ls -ln /raid/huginn
total 4
drwxrwxrwx 2 1001 1001 4096 Apr 12 21:30 mysql-data

It seems I don't know a secret of chmod/chown/"empty volume" for mysqld.
Any advice?

@oshliaer
Copy link
Author

There is a workaround for me now (it doesn't close the issue)

  1. Create a volume with an older docker tag $> docker run blah-blah huginn/huginn:123456_TAG_UID. You're still have to be a cmod-hacker.
  2. Stop the container
  3. Re-connect/re-run with the latest version $> docker run blah-blah huginn/huginn
  4. Remove the older image force

The next tags work fine:

  • huginn/huginn:5ab1bd28d98bed3783091361d7cce82afba4da05
    • Ubuntu 16
    • Ubuntu 18
    • COS latest

@dsander
Copy link
Collaborator

dsander commented Apr 15, 2020

Sorry about that, I did test upgrading from a previous version, but did not expect the newer mysql version not being able to create a database on new volumes.

Using a named volume works for some reason:

docker run -it -p 3000:3000 --rm -v mysql-data:/var/lib/mysql huginn/huginn

If you are starting fresh I'd recommend looking into the single-process image, it decouples the database from the Huginn container which is generally better practice.

We did not intend to break it but might use it as an opportunity to remove support for new installations of the build in mysql server because it's such an annoyance to maintain.

@oshliaer
Copy link
Author

@dsander Thanks for your reply!

Unfortunately It's not work yet.

I intend to strengthen my knowledge in Docker and come back to help this issue.

Also I tried run prevoice tag and it falls too. I have to use the tag (image) of eight months ago for a successful launch. I didn't test any between them yet.

Thanks for the single-p advice. I'm just interested in multi-export from an automatic Huginn MySQL/Maria base to mine.

The great app & the cool support!

@universeroc
Copy link

I've the same problem

@danb-optimizely
Copy link

I had the same problem. The fix in the second commented worked for me, but is not a long-term solution for future users.

@rc1
Copy link

rc1 commented Apr 23, 2020

#2757 seems related

dsander added a commit to dsander/huginn that referenced this issue May 1, 2020
The Ubuntu upgrade (or changes to MySQL after the update was initially
tested) broke the usage of mounting a directory as the MySQL data volume
for the multi-process image.

Why `--admin-auth-plugin=mysql_native_password` was needed (or I thought
it was needed) is beyond me now. Passing the `mysqld` process the
`--init-file` option which creates our database user seems to work in
all use cases.

 huginn#2745
 huginn#2757
@dsander
Copy link
Collaborator

dsander commented May 1, 2020

Can you please check if the image huginnbuilder/huginn:pr-2768 from #2768 fixes the issue?

@mihird4
Copy link

mihird4 commented May 1, 2020

huginnbuilder/huginn:pr-2768 fixes the issue. The following parameters were used to launch the container.

docker run --rm -it -p -d 3000:3000 -v /Users/mdass/huginn/mysql-data:/var/lib/mysql huginnbuilder/huginn:pr-2768

See the output below .. mysqld was spawned with pid 402

2020-05-01 19:34:28,667 INFO spawned: 'bootstrap' with pid 371
2020-05-01 19:34:28,680 INFO success: bootstrap entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-05-01 19:34:29,706 INFO success: stdout entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
bootstrap stdout | DATABASE_HOST=localhost
bootstrap stdout | Starting mysql server...
2020-05-01 19:34:35,706 INFO spawned: 'mysqld' with pid 402
mysqld stdout | 2020-05-01T19:34:35.974602Z mysqld_safe Logging to syslog.
mysqld stdout | 2020-05-01T19:34:35.986624Z mysqld_safe Logging to '/var/log/mysql/error.log'.
mysqld stdout | 2020-05-01T19:34:36.044412Z mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql

@dsander
Copy link
Collaborator

dsander commented May 3, 2020

Thanks for testing!

This should be fixed in the latest huginn/huginn image. Feel free to reopen the issue if you are still having issues.

@dsander dsander closed this as completed May 3, 2020
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

6 participants