ERROR 2002 When Installing MaridaDB. Attempting to install NextCloud FreeNAS 11.1.

Status
Not open for further replies.

MomSpaghetti

Dabbler
Joined
Nov 16, 2017
Messages
17
I'm following This guide on installing NextCloud on FreeNAS 11.1.

Everything runs smoothly until I get to the Run Wizard Script part of the guide.
zmDEGMG

Code:
root@nextcloud:/ # mysql_secure_installation

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
	  SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

In order to log into MariaDB to secure it, we'll need the current
password for the root user.  If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none):
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2 "No such file or directory")



I've seen solutions that involve creating a symlink to mysql.sock, but I can't seem to find a mysql.sock file anywhere.

I'm not sure what to do from here.
 

mxmerz

Cadet
Joined
Mar 13, 2015
Messages
4
By chance I also tried to install Nextcloud and then MariaDB today, but using this guide and I think we got the same problem.

Observed Behaviour:

I created a clean jail today trough the Web-UI and tried to install MariaDB though pkg. All went well, but:

Code:
$ sudo service mysql-server status
mysql is not running.
$ sudo service mysql-server start
Starting mysql.
$ sudo service mysql-server status
mysql is not running.


This is also why mysql_secure_installation fails, because the server fails to start.

Where is the problem?

Whenever I try to start the MySQL server, I get a new line in /var/db/mysql/nextcloud.err ("nextcloud" is my hostname) with the following error message:
/usr/local/libexec/mysqld: Undefined symbol "fdatasync"

When I googled that, I found this discussion in the FreeBSD forums, where “Bobi M.” recommended to try objdump -T /lib/libc.so.7 | grep fdatasync and, when it produced no output, diagnosed that “fdatasync(2) function is not in libc.so.7; should be there since FreeBSD 11.1. […] Maybe you're still using libc.so.7 from FreeBSD 11.0?”

This reddit discussion inspired me to run
Code:
$ uname -r
11.1-STABLE
$ freebsd-version
11.0-RELEASE-p1


Which makes me think that my libc.so.7 is indeed outdated.

An overview:
  • My host system
    • uname -r: 11.1-STABLE
    • freebsd-version: 11.1-STABLE
    • shasum -a 256 /lib/libc.so.7: 148019b2537cdee4b3081a2bfe8a65b3d6f86c1512c645d200d3438232e6301b
  • The new nextcloud jail
    • uname -r: 11.1-STABLE
    • freebsd-version: 11.0-RELEASE-p1
    • shasum -a 256 /lib/libc.so.7: de23e2678a3ceeaf41fc81c3ec19e0659cf11612c3152b31f21b05827104d7de
  • An old jail, also on my system
    • uname -r: 11.1-STABLE
    • freebsd-version: 10.3-RELEASE
    • shasum -a 256 /lib/libc.so.7: 3d414cf7c8d495cb5c209608ea39f6b71c3d288395a93567cdc0108a57edb475
So, I assume that my libc.so.7 is outdated.

Idea for a solution:

Both on reddit and on the FreeBSD Forum they recommend to use freebsd-update -b $PATH_TO_JAIL fetch install from the host to update the jail. Of course, on FreeNAS, this is not possible because freebsd-update is not available on the host – and apparently it is intentional that jails can not be updated.

So I got no solution and also I don't know why this problem exists in the first place. Maybe the jail template for FreeNAS is broken?
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
Maybe the jail template for FreeNAS is broken?
Not broken but no longer supported through the current UI. Install using iocage using the CLI for any jails you create going forward.
 

mxmerz

Cadet
Joined
Mar 13, 2015
Messages
4
Created a new jail with iocage and everything works now, thank you! :)
(But I got no idea why they don't just disable the button in the UI if the old mechanism's no longer supported…)
 

MomSpaghetti

Dabbler
Joined
Nov 16, 2017
Messages
17
Not broken but no longer supported through the current UI. Install using iocage using the CLI for any jails you create going forward.
I'm decently new to FreeNAS (built 6 months ago) I'm not sure what iocage is, but I'll look into it and see if I can start over.
 
Status
Not open for further replies.
Top