From owner-freebsd-questions@freebsd.org Thu Oct 10 15:07:21 2019 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B618C13EFE9 for ; Thu, 10 Oct 2019 15:07:21 +0000 (UTC) (envelope-from luislupe@gmx.com) Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.gmx.net", Issuer "TeleSec ServerPass Class 2 CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46pvZc2TBQz4B0h for ; Thu, 10 Oct 2019 15:07:19 +0000 (UTC) (envelope-from luislupe@gmx.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1570720031; bh=gOERtBtaWpuWBiQSnjXhhPQmYYkjQa+D8wNCAqrFE+s=; h=X-UI-Sender-Class:Date:From:To:Subject; b=Cl3vlmiGpsMi0gdmitwkKDBRlCk3EMyTMAn1ga6FpF48C++sVJ2FnOm1x0YPK/i0b pVi90j/K5vn+fwhm/Rq9dLgRQ8YL5DIyUBpOzW9l+afJWjOTlRqjdDr5lnu0UHtrHn Umjt93S+aa1/ATjYFlPC3MHPz7WrTfFRyCbJAO+M= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from localhost ([144.64.85.65]) by mail.gmx.com (mrgmx005 [212.227.17.184]) with ESMTPSA (Nemesis) id 1MbRfv-1hh2ys1o7N-00bt48 for ; Thu, 10 Oct 2019 16:43:03 +0200 Date: Thu, 10 Oct 2019 15:42:57 +0100 From: "Luis P. Mendes" To: freebsd-questions@freebsd.org Subject: mysql socket disappears when restarting related jail with nullfs mount point Message-ID: <20191010144257.GA14181@leao.home> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Disposition: inline Content-Transfer-Encoding: quoted-printable User-Agent: Mutt/1.12.2 (2019-09-21) X-Provags-ID: V03:K1:F/95Pa6mSLdvd38EFbLdEA3mw5onnDvaZUHKIR1l3tssFhWSEzQ QMjASPnjlUapOl80uUai3cRva8CyHPZMNDNSuelBbdM67f4tcLaN2V5D9+/DPS6Ac+urXut eZC4XcZT2YI3jeOXDaJYmhzL4ni1wKePtANLUk63I2jXS9LFAXA2Q2CSFOAEFCxLsM+iwlz dleJCo+24dObIv0DOZ9SA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:FBaVGn9nt6I=:1Qfa67kBmewiVQcnimb2zW do10qvXVWKB7TMS2SEScxxPk8AciHXCvHJ0x24fai/WY9qtgRDqVc9g/D/CeIQBqEAej5gPX5 b8ipdGeet1d2qn5zJhGxjPzudlVCc7Gs3Tzct/0zO5MnUvPfxH8XYiXJrJ14809ZJswOREZyn 8c/EWZfZvZkNpIF7X81kA4fkOR4/IKNApCKE/icQNIP9lJQTe3SDvlXWAInxB1YpgH71ATP48 lD86XyNwUt4jdq+SeXr+YFIpeo9QUbIl9b4Jl0JRJdRRgp/mRWmUS9mW3FvmgKvJvtDZDc/ah JQ7MkIyves+mgT6fn5ddZnYvuedKN7BXNfMp6Kzn6IA+I7WLM4R24rmMRb7leoTk8tLL9MDPR kH0SIweOBsPllAqWoIZ+bt8QByMVwXiRT5lF1632unfTXw4EkzYAs1oLdSwvfAjzZuEE/Nt4q HMBHjKdpgBm5QkBY9h+PsWPQ/6vSlwrqIOtaHnzASSMqXQR+t5ws6AhIq745r+QUgGOs1pvO1 4RFo0VLV1bM/F5NL8U47AhI7EDkc6VE85/qa33hyyLEdW4/0kEjoJNVHYWAehFB7m7HborNu8 i9QXEGrFtp++aCJLmYTuQNERATlTCYnclaxS7BTWIBgC28pmNPftgb42dz4Lr1LlTgFXwnxqP 6V+W3THE7MMfZQuhHaHQkbWHu1z6+xmuQFVYX4xEcMhBVUZ5FKHJRJB3LhmGKK95rqggnsCZv icFBy+n3zn+3lVjINCvcHpmaNQALua4R2hC707XEcDvv6R1teUAC5XW8nM+v/M1g5U/COEskW UEDRR5+QqVUAI+U/fQoV9AGce5cDVphOiYhwhVbxFQmNpIStYl6s3MdJ1CHPmsvbvVF0hAr3s eezltiihpVQpsEx9menIE0Z0Z/RWSXdTqk/MYW+PP72nxM47D/GhM4qb2VfSrvC3Nqbm+cn/j IaXHFjZQhbjXs4Lg4SExnzq90oMo78DnFELmZYri3tnn1x+lTvGSU9L+suGXz40XZexwkYChg ntYEBCBgxdmRqhgBVdPYHe/AJUEidM+HSOQZtoYD/35lY6fFvNxOvwV6pVEOWg39b8q3y1CGK Mm4PUzSTcU6RA997S20Yy21D/4drHBTQKaxSt/F4VQ9+Sj6/uVEQPXy8PQffDlrCHVxZYyP6Q 5s+8oq9kDkgLsr9BDWtVIRgPGrsn/0nTEIsLW4ppBaaT6gAo7cRBwDVTg6dBlrV2luw2zJt/9 JFAeB7HfOdik4uxgdW5Zvi3fUPSrTy+MTDhBVeA== X-Rspamd-Queue-Id: 46pvZc2TBQz4B0h X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmx.net header.s=badeba3b8450 header.b=Cl3vlmiG; dmarc=none; spf=pass (mx1.freebsd.org: domain of luislupe@gmx.com designates 212.227.15.19 as permitted sender) smtp.mailfrom=luislupe@gmx.com X-Spamd-Result: default: False [-2.50 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[gmx.net:s=badeba3b8450]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:212.227.15.0/24]; FREEMAIL_FROM(0.00)[gmx.com]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; TO_DN_NONE(0.00)[]; IP_SCORE_FREEMAIL(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; DMARC_NA(0.00)[gmx.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DKIM_TRACE(0.00)[gmx.net:+]; RCVD_IN_DNSWL_NONE(0.00)[19.15.227.212.list.dnswl.org : 127.0.3.0]; IP_SCORE(0.00)[ip: (-6.48), ipnet: 212.227.0.0/16(-1.32), asn: 8560(2.04), country: DE(-0.01)]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmx.com]; ASN(0.00)[asn:8560, ipnet:212.227.0.0/16, country:DE]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[65.85.64.144.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.11] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Oct 2019 15:07:21 -0000 I'm running FreeBSD 11.3-RELEASE-p3 on a VPS. The jail manager is qjail, version 5.4. The server has two jails: a database `mariadb` and a web `webjail`. Access to the database is done only through a unix socket to be null mounted at the latter jail. When started, 'service mysql-server start' on the `mariadb` jail places the socket at /var/run/mysql/mysql.sock When started, the `webjail` should mount that socket in its own /var/run/mysql directory. This is the line of the corresponding /usr/local/etc/qjail.fstab/webjail file: /usr/jails/mariadb/var/run/mysql /usr/jails/webjail/var/run/mysql nullfs rw 0 0 What happens is that everytime that the `webjail` is started (the first time or when restarted), the socket at `mariadb`'s /var/run/mysql/mysql.sock is deleted somehow. Although this happens, the mysqld_safe and mysqld daemons keep running. As a note, when `webjail` is stopped, nothing happens to the socket at the jail of the mariadb database server. If the `mariadb` jail is started after `webjail`, the socket is correctly mounted at the latter /var/run/mysql directory. Using qjail's archive and restore commands, I copied these two jails to another FreeBSD 11.3-RELEASE virtual machine, at my own computer, and the strange behavior still happens. There are no rc.d scripts made by me. The contents of the config file for the `webjail` are: /usr/local/etc/qjail.config/webjail webjail { host.hostname =3D "webjail"; path =3D "/usr/jails/webjail"; mount.fstab =3D "/usr/local/etc/qjail.fstab/webjail"; exec.consolelog =3D "/var/log/qjail.webjail.console.log"; mount.devfs; ip4.addr =3D 127.0.0.85; interface =3D "lo1"; devfs_ruleset =3D "4"; exec.start =3D "/bin/sh /etc/rc"; exec.stop =3D "/bin/sh /etc/rc.shutdown"; What's wrong with this? Why starting a jail deletes a socket in another jail? =2D- Lu=C3=ADs Mendes