Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #226138 > unrolled thread
| Started by | Patrick Frank <sfsoc@gmx.de> |
|---|---|
| First post | 2020-08-12 15:10 +0200 |
| Last post | 2020-08-12 18:20 +0200 |
| Articles | 6 — 4 participants |
Back to article view | Back to linux.debian.user
dns cache for localdomain via djbdns Patrick Frank <sfsoc@gmx.de> - 2020-08-12 15:10 +0200
Re: dns cache for localdomain via djbdns Greg Wooledge <wooledg@eeg.ccf.org> - 2020-08-12 15:10 +0200
Re: dns cache for localdomain via djbdns Dan Ritter <dsr@randomstring.org> - 2020-08-12 15:30 +0200
Re: dns cache for localdomain via djbdns Greg Wooledge <wooledg@eeg.ccf.org> - 2020-08-12 16:00 +0200
Re: dns cache for localdomain via djbdns Patrick Frank <sfsoc@gmx.de> - 2020-08-12 16:00 +0200
Re: dns cache for localdomain via djbdns <tomas@tuxteam.de> - 2020-08-12 18:20 +0200
| From | Patrick Frank <sfsoc@gmx.de> |
|---|---|
| Date | 2020-08-12 15:10 +0200 |
| Subject | dns cache for localdomain via djbdns |
| Message-ID | <ACYFX-iA-5@gated-at.bofh.it> |
Hello, on a Debian 10 host I created a virtual machine with very basic features to build a dns cache for my home network with djbdns. I fail to understand how Daemontools are used properly. Following the instructions on http://cr.yp.to/djbdns/install.html went okay. http://cr.yp.to/djbdns/run-cache-x.html at step 5 is where I am stuck. When I go to /service/dnscache and execute "run" it says "starting" so I try svstat /service/dnscache which outputs: "/service/dnscache: unable to open supervise/ok: file does not exist" Any hints, please? P.
[toc] | [next] | [standalone]
| From | Greg Wooledge <wooledg@eeg.ccf.org> |
|---|---|
| Date | 2020-08-12 15:10 +0200 |
| Message-ID | <ACYFY-iA-7@gated-at.bofh.it> |
| In reply to | #226138 |
On Wed, Aug 12, 2020 at 02:59:23PM +0200, Patrick Frank wrote: > Hello, > > on a Debian 10 host I created a virtual machine with very basic features > to build a dns cache for my home network with djbdns. I fail to understand > how Daemontools are used properly. > > Following the instructions on http://cr.yp.to/djbdns/install.html went okay. > http://cr.yp.to/djbdns/run-cache-x.html at step 5 is where I am stuck. > > When I go to /service/dnscache and execute "run" it says "starting" so I > try svstat /service/dnscache which outputs: > "/service/dnscache: unable to open supervise/ok: file does not exist" You can execute the "./run" script by hand for testing purposes, to make sure you've written it correctly, but that's not how daemontools will run it. If your test is successful, you should Ctrl-C (or otherwise terminate) the ./run script that you ran manually. Make sure it dies. You tell daemontools to run the service by creating a symbolic link from the /service directory to the directory where the run script lives. For example: unicorn:~$ ls -l /service total 0 lrwxrwxrwx 1 root root 13 Jan 12 2018 dnscache -> /etc/dnscache/ lrwxrwxrwx 1 root root 39 Jan 12 2018 qmail-deliverabled -> /var/qmail/supervise/qmail-deliverabled/ lrwxrwxrwx 1 root root 31 Jan 12 2018 qmail-send -> /var/qmail/supervise/qmail-send/ lrwxrwxrwx 1 root root 28 Jan 12 2018 qpsmtpd -> /var/qmail/supervise/qpsmtpd/ unicorn:~$ ls -l /etc/dnscache/ total 24 drwxr-sr-x 2 root root 4096 Jan 12 2018 env/ drwxr-sr-x 4 root root 4096 Jan 12 2018 log/ drwxr-sr-x 4 root root 4096 Jan 12 2018 root/ -rwxr-xr-x 1 root root 142 Jan 12 2018 run* -rw------- 1 root root 128 Jan 12 2018 seed drwx--S--- 2 root root 4096 Aug 2 09:00 supervise/ The presence of the symlink /service/dnscache is picked up by svscan, which launches a supervisor process.
[toc] | [prev] | [next] | [standalone]
| From | Dan Ritter <dsr@randomstring.org> |
|---|---|
| Date | 2020-08-12 15:30 +0200 |
| Message-ID | <ACYZj-p2-1@gated-at.bofh.it> |
| In reply to | #226139 |
Greg Wooledge wrote: > On Wed, Aug 12, 2020 at 02:59:23PM +0200, Patrick Frank wrote: > > Hello, > > > > on a Debian 10 host I created a virtual machine with very basic features > > to build a dns cache for my home network with djbdns. I fail to understand > > how Daemontools are used properly. > > > > Following the instructions on http://cr.yp.to/djbdns/install.html went okay. > > http://cr.yp.to/djbdns/run-cache-x.html at step 5 is where I am stuck. > > > > When I go to /service/dnscache and execute "run" it says "starting" so I > > try svstat /service/dnscache which outputs: > > "/service/dnscache: unable to open supervise/ok: file does not exist" > > You can execute the "./run" script by hand for testing purposes, to > make sure you've written it correctly, but that's not how daemontools > will run it. If your test is successful, you should Ctrl-C (or otherwise > terminate) the ./run script that you ran manually. Make sure it dies. > > You tell daemontools to run the service by creating a symbolic link > from the /service directory to the directory where the run script > lives. > > For example: > > unicorn:~$ ls -l /service > total 0 > lrwxrwxrwx 1 root root 13 Jan 12 2018 dnscache -> /etc/dnscache/ > lrwxrwxrwx 1 root root 39 Jan 12 2018 qmail-deliverabled -> /var/qmail/supervise/qmail-deliverabled/ > lrwxrwxrwx 1 root root 31 Jan 12 2018 qmail-send -> /var/qmail/supervise/qmail-send/ > lrwxrwxrwx 1 root root 28 Jan 12 2018 qpsmtpd -> /var/qmail/supervise/qpsmtpd/ > > unicorn:~$ ls -l /etc/dnscache/ > total 24 > drwxr-sr-x 2 root root 4096 Jan 12 2018 env/ > drwxr-sr-x 4 root root 4096 Jan 12 2018 log/ > drwxr-sr-x 4 root root 4096 Jan 12 2018 root/ > -rwxr-xr-x 1 root root 142 Jan 12 2018 run* > -rw------- 1 root root 128 Jan 12 2018 seed > drwx--S--- 2 root root 4096 Aug 2 09:00 supervise/ > > The presence of the symlink /service/dnscache is picked up by svscan, > which launches a supervisor process. This is all correct, but in addition: svc -d /service/dnscache brings it down via the supervisor, similar to the action of "service dnscache stop" or "/etc/init.d/dnscache stop" svc -u /service/dnscache should start running it again All of this clashes with manual invocation of ./run, so that has to be killed before daemontools can take over. -dsr-
[toc] | [prev] | [next] | [standalone]
| From | Greg Wooledge <wooledg@eeg.ccf.org> |
|---|---|
| Date | 2020-08-12 16:00 +0200 |
| Message-ID | <ACZsl-z5-7@gated-at.bofh.it> |
| In reply to | #226140 |
On Wed, Aug 12, 2020 at 03:51:11PM +0200, Patrick Frank wrote: > Greg writes: You can execute the "./run" script by hand for testing > purposes [...] > > When I tried "exec envuidgid Gnscache ..." it logged me out. So don't do that. Test it with ./run instead, like I said. > Greg writes: unicorn:~$ ls -l /etc/dnscache/ > > This directory is missing the "supervise" directory. Because you haven't started the service yet. That will be created once daemontools runs it for the first time. > Dan writes: svc -d /service/dnscache > > It outputs: unable to control /service/dnscache: file does not exist Because you haven't started the service yet. You need to create the symlink to start the service.
[toc] | [prev] | [next] | [standalone]
| From | Patrick Frank <sfsoc@gmx.de> |
|---|---|
| Date | 2020-08-12 16:00 +0200 |
| Message-ID | <ACZsl-z5-9@gated-at.bofh.it> |
| In reply to | #226140 |
On 12.08.20 15:28, Dan Ritter wrote: > Greg Wooledge wrote: >> On Wed, Aug 12, 2020 at 02:59:23PM +0200, Patrick Frank wrote: Greg writes: You can execute the "./run" script by hand for testing purposes [...] When I tried "exec envuidgid Gnscache ..." it logged me out. Greg writes: unicorn:~$ ls -l /etc/dnscache/ This directory is missing the "supervise" directory. Dan writes: svc -d /service/dnscache It outputs: unable to control /service/dnscache: file does not exist P.
[toc] | [prev] | [next] | [standalone]
| From | <tomas@tuxteam.de> |
|---|---|
| Date | 2020-08-12 18:20 +0200 |
| Message-ID | <AD1DP-24c-1@gated-at.bofh.it> |
| In reply to | #226142 |
[Multipart message — attachments visible in raw view] — view raw
On Wed, Aug 12, 2020 at 03:51:11PM +0200, Patrick Frank wrote: > > On 12.08.20 15:28, Dan Ritter wrote: > >Greg Wooledge wrote: > >>On Wed, Aug 12, 2020 at 02:59:23PM +0200, Patrick Frank wrote: > > > Greg writes: You can execute the "./run" script by hand for testing > purposes [...] > > When I tried "exec envuidgid Gnscache ..." it logged me out. No, not "it" logged you out. When you say "exec", you say "replace the currently running process by that other". When "that other" terminates... it's done. So it won't come back to your shell. It's gone. Basically, with "exec" you logged you out yourself, kind of. Cheers - t
[toc] | [prev] | [standalone]
Back to top | Article view | linux.debian.user
csiph-web