Solved No database will run on my 10.2

Can't just say anything these days. So what up everyone. I installed, uninstalled and re-installed most of these, all in this order, in jail; mysql57, mysql56, mysql55, mariadb101, mariadb55, mysql51, postgresql92, postgresql95, sqlite3. I found the best, though they were few how-to for FreeBSD. Here is one about postgresql posted in Apr 7, 2011 with no solution to date. I searched every keyword I could think of, and I read as much as I could along the way. https://forums.freebsd.org/threads/23114/

First I had to hunt down this file liblz4.so.1 to clear a bunch of errors, then from there, no matter what I do, every single MySQL version for FreeBSD end with this error:
Code:
/usr/local/etc/rc.d/mysql-server: WARNING: failed precmd routine for mysql

So I went for mariadb. I did not bother hunting down any files because it ended with the same error as MySQL.
Code:
WARNING: failed precmd routine for mysql

For postgresql I had to hunt down these files libpq.so.5, libxml2.so.2, libxml2.so.2.9.3 ,pam_unix.so, and pam_unix.so.5.

to get anywhere, then it all ended with this crazy error:


Code:
# /usr/local/etc/rc.d/postgresql initdb
su: pam_start: system error

So I installed sqlite3 since I had no more options. I did not play with this one.

I'm running 10.2 and I tried them all in a jail. I read one thread that said he had no problem because he use EzJail. I hope that is not the only way because I use http://tutorials.section6.net/home/creating-a-freebsd-jail. I got a feeling people did not get these error if they used MySQL-5.1 between FreeSD-8.2 - 9.0, so many would have no experience with these issues. But those that do, did you overcame the problem? Could you please post the solution(s)? Btw, for MySQL and mariadb I get the same error even on FreeBSD-10.2 host. I did not try postgresql because I am beat, and running on host was not plan, I just did not want to miss the chance to test it... and it was all the same.
 
Hi, something is very wrong. I run databases/mysql57-server just fine in a jail.

How you doing jails ? Did you made a world from a source, installed it and distributed it to jails or you doing it other way ? Do you use sysutils/ezjail or maybe sysutils/iocage or you doing jails by hands ?

Please post contents of /etc/make.conf on host system

I really hope you have an empty /etc/make.conf in jailed system - if not - just delete it or rename it and try to re-install database service.

How you install database software by using ports or by using packages ?

and lastly, PostgreSQL server need some options to be setup on host machine in /etc/sysctl.conf to allow PostgreSQL server to be run in jailed environment

Code:
security.jail.sysvipc_allowed=1
or just execute this command sysctl security.jail.sysvipc_allowed=1
 
Thanks ab2k,

I understand everything you said and if I can’t find the missing part() before 11.0 is released I’m just going to take it from the top! I get what I done wrong! All I been concern about was to build the tinyest jail possible. Thanks to the files below, I got it down to 66.3MB and it works. Late week, I added all the programs I need but SQL brought it all to a halt! I always wanted to do this so that I can easily see what could be missing from a tiny jail and I learn so much about, like everything, last week.

Luckily, there were only a few files missing. It was a piece of cake finding them. If I don’t find what MySQL need, no big deal today because I research deep about sqlite and it did install without a hitch. Anyway, unless you get lucky and see it below, don’t worry about it, I’m going to do it all over again, with some ab2k in it this time.

…….
Back then, there was so much more in my make.conf and I posted here about it, and many members tried to warn me… Anyway, I InstallWorld on host: https://forums.freebsd.org/threads/50257/
Code:
CPUTYPE?=native
MAKE_JOBS_NUMBER=8
BUILD_STATIC=yes
OPTIONS_UNSET=DEBUG
OPTIONS_UNSET=PROFILE
OPTIONS_UNSET=IPV6
OPTIONS_UNSET=TESTS
OPTIONS_UNSET=WARNING_PKG_INSTALL_EOL="YES"
WITH_OPENSSL_PORT=yes
#FORCE_PKG_REGISTER=yes
#DISABLE_VULNERABILITIES=yes
... then I do this for the obj for jail .... Here, I’m sure I mess this member src.conf up. I dumped my for his after matching a few things up: https://forums.freebsd.org/threads/12022/
Code:
#    graudeejs, Mar 20, 2010
#    Here's what I use for my jails.
#    Currently I have no problems

# This is src.conf for jails
WITHOUT_ACCT="YES"                    # ok
WITHOUT_ACPI="YES"                    # ok
WITHOUT_AMD="YES"                    # ok
WITHOUT_APM="YES"                    # ok
WITHOUT_ASSERT_DEBUG="YES"                # ok
WITHOUT_AT="YES"                    # ok
WITHOUT_ATM="YES"                    # ok
WITHOUT_AUDIT="YES"                    # ok
WITHOUT_AUTHPF="YES"                    # ok
WITHOUT_BIND="YES"                    # ok
WITHOUT_BIND_DNSSEC="YES"                # ok
WITHOUT_BIND_ETC="YES"                    # ok
WITHOUT_BIND_LIBS_LWRES="YES"                # ok
WITHOUT_BIND_MTREE="YES"                # ok
WITHOUT_BIND_NAMED="YES"                # ok
WITHOUT_BIND_UTILS="YES"                # ok
WITHOUT_BLUETOOTH="YES"                    # ok
WITHOUT_BOOT="YES"                    # ol
WITHOUT_BSD_CPIO="YES"                    # ok
WITHOUT_BSNMP="YES"                    # ok
# WITHOUT_BZIP2="YES"                    # ok
WITHOUT_CALENDAR="YES"                    # ok
WITHOUT_CDDL="YES"                    # ok
# WITHOUT_CPP="YES"                    # ok
# WITHOUT_CRYPT="YES"                    # ok, if uncommented no openssl and no openssh
WITHOUT_CTM="YES"                    # ok
WITHOUT_CVS="YES"                    # ok
# WITHOUT_CXX="YES"                    # ok
WITHOUT_DICT="YES"                    # ok
# WITHOUT_DYNAMICROOT="YES"                # ok
WITHOUT_EXAMPLES="YES"                    # ok
WITHOUT_FLOPPY="YES"                    # ok
WITHOUT_FORTH="YES"                    # ok
# WITHOUT_FP_LIBC="YES"                    # ok
WITHOUT_FREEBSD_UPDATE="YES"                # ok
WITHOUT_GAMES="YES"                    # ok
# WITHOUT_GCOV="YES"                    # ok
WITHOUT_GDB="YES"                    # ok
# WITHOUT_GNU="YES"                    # ok
# WITHOUT_GNU_GREP="YES"                # ok
WITHOUT_GPIB="YES"                    # ok
# WITHOUT_GROFF="YES"                    # pl
WITHOUT_GSSAPI="YES"                    # ok
WITHOUT_HTML="YES"                    # ok
# WITH_IDEA="YES"                    # might be illigal to use
WITHOUT_INET6="YES"                    # ok
# WITHOUT_INFO="YES"                    # Some ports fail to build without
# WITHOUT_INSTALLLIB="YES"                # fails to build if uncommented
WITHOUT_IPFILTER="YES"                    # ok
WITHOUT_IPFW="YES"                    # ok
WITHOUT_IPX="YES"                    # ok
WITHOUT_JAIL="YES"                    # ok
WITHOUT_KERBEROS="YES"                    # ok
WITHOUT_KVM="YES"                    # ok
WITHOUT_LEGACY_CONSOLE="YES"                # ok
WITHOUT_LIB32="YES"                    # ok so far, fails to build if selected, don't know why
# WITHOUT_LIBPTHREAD="YES"                # ok. seams that this can be removed, but ....
# WITHOUT_LIBTHR="YES"                    # ok. seams that this can be removed, but ....
# WITHOUT_LOCALES="YES"                    # ok
WITHOUT_LOCATE="YES"                    # ok
WITHOUT_LPR="YES"                    # ok
# WITHOUT_MAIL="YES"                    # ok
WITHOUT_MAILWRAPPER="YES"                # ok, at least seams so
# WITHOUT_MAKE="YES"                    # ok
WITHOUT_MAN="YES"                    # ok
WITHOUT_NCP="YES"                    # ok
WITHOUT_NDIS="YES"                    # ok
WITHOUT_NETCAT="YES"                    # ok
# WITHOUT_NETGRAPH="YES"                # ok        ???
WITHOUT_NIS="YES"                    # ok
WITHOUT_NLS="YES"                    # ok
WITHOUT_NLS_CATALOGS="YES"                # ok
WITHOUT_NS_CACHING="YES"                # ok
WITHOUT_NTP="YES"                    # ok
# WITHOUT_OBJC="YES"                    # ok
# WITHOUT_OPENSSH="YES"                    # ok
# WITHOUT_OPENSSL="YES"                    # ok
# WITHOUT_PAM="YES"                    # ok
WITHOUT_PF="YES"                    # ok
# WITHOUT_PKGTOOLS="YES"                # ok
WITHOUT_PMC="YES"                    # ok
WITHOUT_PORTSNAP="YES"                    # ok
WITHOUT_PPP="YES"                    # ok
WITHOUT_PROFILE="YES"                    # ok
WITHOUT_QUOTAS="YES"                    # ok
WITHOUT_RCMDS="YES"                    # ok
WITHOUT_RCS="YES"                    # ok
WITHOUT_RESCUE="YES"                    # ok
WITHOUT_ROUTED="YES"                    # ok
WITHOUT_SENDMAIL="YES"                    # ok
# WITHOUT_SETUID_LOGIN="YES"                # ok
WITHOUT_SHAREDOCS="YES"                    # ok
# WITHOUT_SSP="YES"                    # ok, good thing to build
# WITHOUT_SYMVER="YES"                    # ok
WITHOUT_SYSCONS="YES"                    # ok
WITHOUT_SYSINSTALL="YES"                # ok
# WITHOUT_TCSH="YES"                    # ok
WITHOUT_TELNET="YES"                    # ok
# WITHOUT_TEXTPROC="YES"                # ok
# WITHOUT_TOOLCHAIN="YES"                # ok
WITHOUT_USB="YES"                    # ok
WITHOUT_WIRELESS="YES"                    # ok
WITHOUT_WPA_SUPPLICANT_EAPOL="YES"            # ok
WITHOUT_ZFS="YES"                    # ok
# WITHOUT_ZONEINFO="YES"
Above all, I’m glad to know it works for others or I would have never tried again.

BTW, I build jail using section6 way, but a bit little more cool and I fix a few mistakes. I got it down to a science and kind of build my own framework with no system interference. I learn better by doing things manually. I posted the link about section6 above.

What do you use?

Hi, something is very wrong. I run databases/mysql57-server just fine in a jail.

How you doing jails ? Did you made a world from a source, installed it and distributed it to jails or you doing it other way ? Do you use sysutils/ezjail or maybe sysutils/iocage or you doing jails by hands ?
 
I think I got it! While trying to install something else I got these errors:
Code:
php70 has a missing dependency: libxml2
php70-extensions has a missing dependency: php70-iconv

Read the OP final reply. He could not install MySQL!

https://forums.freebsd.org/threads/10325/

I can’t wait for FreeBSD 11 to get here.
 
Hi, I see that you have turned off many features off the base system, I bet some of those options are in charge why you cannot install database server software. Well, a good place to start from is to clear /etc/make.conf file as you have there some optimizations and try to build again (some databases don't like compiler optimizations). Also please note that options in your /etc/src.conf are outdated - there are no more dns/bind910 software in base system for example. Full list of those options you can always find on corresponding man page - src.conf(5).

If you are in lack of hdd space I really recommend you to try sysutils/ezjail. It works like this: at beginning it creates the base jail where a full system reside and when you create a new jail it will symlink to base jail from it. It will save you alot of space. Also it will mount base jail as read only filesystem, what is very good for security too.
 
Hi, I see that you have turned off many features off the base system, I bet some of those options are in charge why you cannot install database server software.

I did not use my/etc/make.conf, but I did use SirDice old /etc/src.conf.internetz. That was my first src conf up until last year. graudeejs file generated an amazing 66.3MB tarball and SirDice file produced a 92.6MB tar. graudeejs file works for everything else except MySQL and maybe Java, at least for me. But still 92.6MB tar is not bad at all and I can still see my way around smaller jails. I’ll take on that src.conf(5) before 11.0 release. That thing is huge and I am going to learn to use every bit possible and this time I'm going to know why..

Anyway, after a year of trying off and on, I’ll be databasing soon after I find out what is wrong with php7. You got me up and running .... :)

Thanks again ab2k
 
ab2k, after seeing this post just minutes ago I think it was all about order or I was missing a single dependency. It still don't work on the host either. But I’m still glad I use SirDice file to get back what could have been needed to run all of this:

https://forums.freebsd.org/threads/56619/

It is sloppy but this is the order as each popped up. And I uninstalled until I needed the main application who said he need no more dependencies.
I’ll clean this up soon after I’m done with the rest of PHP and his xml file. The truth is down there somewhere and they demanded every bit of it except python stuff to denyhosts.

Code:
# ......................................................................  install -  01
pkg-1.8.5.txz

# ......................................................................  install -  02
perl5-5.20.3_13.txz
# ......................................................................  install -  03
pcre-8.38_1.txz           PERL bring Jails to LIFE !!!
# ......................................................................  install -  04
openssl: 1.0.2_12
# ......................................................................  install -  05
libxml2: 2.9.3
                Needed by php7
# ......................................................................  install -  06
liblz4-131.txz
                Needed by mysql
# ......................................................................  install -  07
db48-4.8.30.0_2.txz
# ......................................................................  install -  08
indexinfo-0.2.4.txz
                Needed by autoconf-2.69_1  >>> for 
# ......................................................................  install -  09
autoconf-wrapper-20131203.txz
                Needed by autoconf-2.69_1  >>> for 
# ......................................................................  install -  10
php70: 7.0.7
                NOW it is 100% installed
# ......................................................................  install -  11
libevent2
                Needed by mysql57-client: 5.7.12_1
# ......................................................................  install -  12
libedit-3.1.20150325_2.txz
                Needed by mysql57-client: 5.7.12_1
# ......................................................................  install -  13
mysql57-client-5.7.12_1.txz
                            100% installed but ....
# ......................................................................  install -  14
mysql57-server-5.7.12_1:
                   NOW it is 100% installed with client
# ......................................................................
# ......................................................................
# ......................................................................
# ......................................................................
# ......................................................................  install -  15
gettext-runtime: 0.19.7
                Needed by bison
# ......................................................................  install -  16
m4-1.4.17_1,1.txz
                Needed by bison
# ......................................................................  install -  17
bison-2.7.1,1.txz
                100% installed
# ......................................................................  install -  108
expat-2.1.1_1.txz
                Needed by cmake-3.5.2_1
# ......................................................................  install -  19
cmake-3.5.2_1.txz
                100% installed  - > php something
# ......................................................................  install -  20
gdbm-1.12.txz
                        (01) Needed by apache24  ****
# ......................................................................  install -  20
db5-5.3.28_4.txz
                        (01) Needed by apache24 ****
# ......................................................................  install -  20
jsoncpp-1.7.2_1.txz
                        (01) Needed by apache24
# ......................................................................  install -  20
ca_root_nss
                        (01) Needed by apache24
# ......................................................................  install -  20
curl-7.49.0.txz
                        (01) Needed by apache24
# ......................................................................  install -  20
lzo2-2.09.txz
                        (01) for curl - Needed by apache24
# ......................................................................  install -  20
cmake-modules-3.5.2.txz
                        (01) Needed by apache24
# ......................................................................  install -  20
libarchive: 3.2.0_1,1
                        (01) Needed by apache24 100%

# ......................................................................  install -  20
apr-1.5.2.1.5.4.txz
                        (01) Needed by apache24 100%
# ......................................................................  install -  20
apache24-2.4.20_1.txz
                        (01) NOW it is 100% installed
# .....................................................................
# .....................................................................
# ......................................................................  install -  20
apache-struts-1.2.9.txz
                        (01) Needs openjdk8
# ......................................................................
nginx-1.10.1,2.txz
                        (01) 100%
# ......................................................................  install -  20
libffi-3.2.1.txz
                        (01) Needed by python27 for denyhosts
# ......................................................................  install -  20
python27-2.7.11_2:
                        (01) 100%
# ......................................................................  install -  20
python27-2.7.11_2:
                        (01) 100%n
# ......................................................................  install -  20
py27-setuptools27-20.0.txz
                        (01) Needed by python27 for denyhosts

python2-2_3.txz
                        (01) Needed by python27 for denyhosts

denyhosts-2.6_6.txz
                        (01) 100%n
# ......................................................................
# ......................................................................
# ......................................................................  install -  20
php70-ctype-7.0.7.txz
                100% installed  - > php stuff
# ......................................................................  install -  20
php70-iconv
                Needed by php70-extensions-1.1

# ......................................................................  install -  21
libiconv-1.14_9.txz
                Needed by php70-iconv  for  php70-extensions-1.1
# ......................................................................  install -  22
php70-iconv-7.0.7
                100% installed  - > php stuff
# ......................................................................  install -  23
php70-json-7.0.7
                Needed by php70-extensions-1.1

# ......................................................................  install -  24
php70-opcache-7.0.7
                Needed by php70-extensions-1.1

# ......................................................................  install -  25
LOTS OF PDO for PHP7
# ......................................................................  install -  26
php70-pdo_odbc-7.0.7.txz

# ......................................................................  install -  27
php70-pdo_mysql-7.0.7.txz
                100% installed  - > php stuff
# ......................................................................  install -  28

                          P D 0     all done!
# ......................................................................  install -  29
php70-xmlreader-7.0.7.txz
# ......................................................................  install -  29
mod_php70-7.0.7

# ......................................................................  install -  30

This GOT TO BE IT!

At least 95% of dependencies are in this exact order, and

it’s Working Now!
 
I had all the dependencies already. This proves to me that order is sometime important. It took a delete and reinstall, in a certain order, to get it to work. Perl and pcre must be closer to the bottom and not after everything has been install. FreeBSD moved Perl out the base-system not too long ago. If so, that was a bad move. It brought all of this stuff up. Without Perl and/or pcre jails would have no life, causing other apps not to work..

Code:
ln: kernel: File exists
# /usr/local/etc/rc.d/php-fpm onestart
/etc/rc.conf: php-fpm_enable=YES: not found
Performing sanity check on php-fpm configuration:
[16-Jun-2016 13:56:54] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20151012/xmlreader.so' - /usr/local/lib/php/20151012/xmlreader.so: Undefined symbol "dom_node_class_entry" in Unknown on line 0
[16-Jun-2016 13:56:54] NOTICE: configuration file /usr/local/etc/php-fpm.conf test is successful
#
# ...........................................
# pkg delete php70-xmlreader-7.0.7.txz
.cshrc				php70-extensions-1.1.txz
.profile			php70-xmlreader-7.0.7.txz

# ...........................................

# pkg install php70-xmlreader-7.0.7.txz

# pkg install php70-extensions-1.1.txz
# hash -r
# 
# ...........................................
# 
# /usr/local/etc/rc.d/php-fpm onestart
/etc/rc.conf: php-fpm_enable=YES: not found
Performing sanity check on php-fpm configuration:
[16-Jun-2016 14:04:51] NOTICE: configuration file /usr/local/etc/php-fpm.conf test is successful

Starting php_fpm.
 
Back
Top