From owner-freebsd-questions@freebsd.org Fri Oct 11 04:26:49 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 B3B8B13C8F3 for ; Fri, 11 Oct 2019 04:26:49 +0000 (UTC) (envelope-from mafsys1234@gmail.com) Received: from mail-pf1-x42a.google.com (mail-pf1-x42a.google.com [IPv6:2607:f8b0:4864:20::42a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46qFK46hyGz3yBh for ; Fri, 11 Oct 2019 04:26:48 +0000 (UTC) (envelope-from mafsys1234@gmail.com) Received: by mail-pf1-x42a.google.com with SMTP id a2so5272277pfo.10 for ; Thu, 10 Oct 2019 21:26:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=IfS6GzWtk3NpHFlQf2pgr7+0Z4gazMXURFfps3ajf3k=; b=SYlNHhdWuodXmMFs3jBCUUFZr28LSSJPXbnpmIaOcXZoA17xjxy+gflU96Fz4RPp2A tH2P1jd5zvwD9mthpagIueby0+Wh3Conux5Se7tkXoUZrDolxvrY+ftCmKIEE+MCi6UN w4gMhIqZcf6HZoIBqWQ1YgNBAgFerm2YdPW4dN/MYze9tjLCX5ujIYcL4v9YmmAbvmf7 ZrbjvbhXpiMK/UsctbyKZj0rOwS59tsrnjF1uKfF2RvnMoYhLUc4BzEImafajum265kU Q80oxjLLATs80cKu3uuBoldsG60vBxUOGj4ylq/+G40jtPY8IWn44CWN2pBCXtyuiGCb osIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=IfS6GzWtk3NpHFlQf2pgr7+0Z4gazMXURFfps3ajf3k=; b=X3st/TWN59nhYTH1k2QMPn0fwoYdzLqkujMLBelaIrETVEP482SasJjiZO9eVyKneN mx8ZzhIvBOqFTrVNJqnQatDqFh0gAy37YpLQMGQUio4ED40HoBKPfFpWlzpdgEek3uEm 742BebwqwFHdOnXLDUGPEIoteO2uvSUZVWQwJA2Dg8HlfsS3T7yBZ4w/ucx+7l9CIwTp +xx0NgNhWITYTteEBUIKgfeN67z2OUiFzU9Y5UpORz3IMTnEbVXgw5E5RP7IZCHZJx1Z a+sa+z7WxEUml4clzHyOpSGMz7KZ1A+vEfGMa0J2csTuFEylei3USZvt8diQbu/ScOGE y/kg== X-Gm-Message-State: APjAAAVvAevYENqwPvcsC6KgccottX7ZysvLC34X6jDRxT1bktmDHEdJ 5IWdiTHP4M3oT77+5Tz5RgmVNU2u X-Google-Smtp-Source: APXvYqxEjYdp5PsnTpfOLIt4gUfoeFoI6Lp18KpKyFajd9904cb8oxRNPcFsZwHCYIlSmYc/v++jiA== X-Received: by 2002:a17:90a:d783:: with SMTP id z3mr15521997pju.142.1570768006981; Thu, 10 Oct 2019 21:26:46 -0700 (PDT) Received: from [192.168.1.10] (C-59-101-201-118.bur.connect.net.au. [59.101.201.118]) by smtp.gmail.com with ESMTPSA id e6sm9448370pfl.146.2019.10.10.21.26.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 10 Oct 2019 21:26:46 -0700 (PDT) Subject: Re: mysql socket disappears when restarting related jail with nullfs mount point To: "Luis P. Mendes" , freebsd-questions@freebsd.org References: <20191010144257.GA14181@leao.home> From: MJ Message-ID: Date: Fri, 11 Oct 2019 15:26:37 +1100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <20191010144257.GA14181@leao.home> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Rspamd-Queue-Id: 46qFK46hyGz3yBh X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=SYlNHhdW; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of mafsys1234@gmail.com designates 2607:f8b0:4864:20::42a as permitted sender) smtp.mailfrom=mafsys1234@gmail.com X-Spamd-Result: default: False [-3.00 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[gmail.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; FREEMAIL_TO(0.00)[gmx.com]; RECEIVED_SPAMHAUS_PBL(0.00)[118.201.101.59.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.10]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; IP_SCORE_FREEMAIL(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[a.2.4.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; IP_SCORE(0.00)[ip: (-8.96), ipnet: 2607:f8b0::/32(-2.53), asn: 15169(-2.13), country: US(-0.05)]; RCVD_TLS_ALL(0.00)[] 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: Fri, 11 Oct 2019 04:26:49 -0000 What's your security.jail.param.securelevel set to? Likely to be 0? In fact, what's your security.jail settings in both jails? Any obvious discrepancies? On 11/10/2019 1:42 am, Luis P. Mendes wrote: > 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       =  "webjail"; > path                =  "/usr/jails/webjail"; > mount.fstab         =  "/usr/local/etc/qjail.fstab/webjail"; > exec.consolelog     =  "/var/log/qjail.webjail.console.log"; > mount.devfs; > ip4.addr            =  127.0.0.85; > interface           =  "lo1"; > devfs_ruleset       =  "4"; > exec.start          =  "/bin/sh /etc/rc"; > exec.stop           =  "/bin/sh /etc/rc.shutdown"; > > > What's wrong with this? > Why starting a jail deletes a socket in another jail? > > > > > -- > > > Luís Mendes > _______________________________________________ > freebsd-questions@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"