Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #263565 > unrolled thread
| Started by | "Russell L. Harris" <russell@rlharris.org> |
|---|---|
| First post | 2023-11-16 02:50 +0100 |
| Last post | 2023-11-16 12:40 +0100 |
| Articles | 11 — 4 participants |
Back to article view | Back to linux.debian.user
approx in debian 12 "Russell L. Harris" <russell@rlharris.org> - 2023-11-16 02:50 +0100
Re: approx in debian 12 Charles Curley <charlescurley@charlescurley.com> - 2023-11-16 03:50 +0100
Re: approx in debian 12 "Russell L. Harris" <russell@rlharris.org> - 2023-11-16 05:20 +0100
Re: approx in debian 12 Charles Curley <charlescurley@charlescurley.com> - 2023-11-16 06:20 +0100
Re: approx in debian 12 Charles Curley <charlescurley@charlescurley.com> - 2023-11-16 06:30 +0100
Re: approx in debian 12 "Russell L. Harris" <russell@rlharris.org> - 2023-11-16 06:50 +0100
Re: approx in debian 12 Charles Curley <charlescurley@charlescurley.com> - 2023-11-16 07:00 +0100
Re: approx in debian 12 "Russell L. Harris" <russell@rlharris.org> - 2023-11-16 07:20 +0100
Re: approx in debian 12 Anssi Saari <anssi.saari@debian-user.mail.kapsi.fi> - 2023-11-16 06:50 +0100
Re: approx in debian 12 "Russell L. Harris" <russell@rlharris.org> - 2023-11-16 07:30 +0100
Re: approx in debian 12 David <bouncingcats@gmail.com> - 2023-11-16 12:40 +0100
| From | "Russell L. Harris" <russell@rlharris.org> |
|---|---|
| Date | 2023-11-16 02:50 +0100 |
| Subject | approx in debian 12 |
| Message-ID | <HAzG1-5Jbn-3@gated-at.bofh.it> |
I installed approx in a Debian 12 system, but when I attempt to restart it the error message appears "Unit approx.service not loaded." The approx man page (dated May 2011) says that approx is invoked by inetd, but I think that in Debian 12 approx is invoked by systemctl or systemd. synaptic indicates that systemctl is available, but not installed. RLH
[toc] | [next] | [standalone]
| From | Charles Curley <charlescurley@charlescurley.com> |
|---|---|
| Date | 2023-11-16 03:50 +0100 |
| Message-ID | <HAAC5-5JId-1@gated-at.bofh.it> |
| In reply to | #263565 |
On Thu, 16 Nov 2023 01:39:32 +0000
"Russell L. Harris" <russell@rlharris.org> wrote:
> I installed approx in a Debian 12 system, but when I attempt to
> restart it the error message appears "Unit approx.service not loaded."
Please show us a complete copy and paste of the transaction, from the
initial prompt and the command you entered, through to the following
prompt, inclusive.
Then, similarly for "systemctl status approx".
You may need to run "systemctl daemon-reload".
>
> The approx man page (dated May 2011) says that approx is invoked by
> inetd, but I think that in Debian 12 approx is invoked by systemctl or
> systemd.
Correct, unless you've done a systemdectomy. It will be controlled by
systemd. systemctl is a user tool for managing systemd.
>
> synaptic indicates that systemctl is available, but not installed.
systemctl for use with systemd is provided by the systemd package. The
systemctl package conflicts with systemd. The systemctl package says, in
part,
Description: daemonless "systemctl" command to manage services
without systemd "systemctl" is a replacement command to control
system daemons without systemd. "systemctl" is useful in
application containers where systemd is not available to start/stop
services.
So if you have systemd installed, you don't want the systemctl package.
>
> RLH
>
--
Does anybody read signatures any more?
https://charlescurley.com
https://charlescurley.com/blog/
[toc] | [prev] | [next] | [standalone]
| From | "Russell L. Harris" <russell@rlharris.org> |
|---|---|
| Date | 2023-11-16 05:20 +0100 |
| Message-ID | <HAC1b-5KJS-3@gated-at.bofh.it> |
| In reply to | #263568 |
On Wed, Nov 15, 2023 at 07:41:03PM -0700, Charles Curley wrote: >On Thu, 16 Nov 2023 01:39:32 +0000 >"Russell L. Harris" <russell@rlharris.org> wrote: > >> I installed approx in a Debian 12 system, but when I attempt to >> restart it the error message appears "Unit approx.service not loaded." > >Please show us a complete copy and paste of the transaction, from the >initial prompt and the command you entered, through to the following >prompt, inclusive. > >Then, similarly for "systemctl status approx". > >You may need to run "systemctl daemon-reload". > root@mollydew:/home/rlh# systemctl daemon-reload root@mollydew:/home/rlh# systemctl restart approx Failed to restart approx.service: Unit approx.service not found. root@mollydew:/home/rlh# systemctl status approx Unit approx.service could not be found. root@mollydew:/home/rlh#
[toc] | [prev] | [next] | [standalone]
| From | Charles Curley <charlescurley@charlescurley.com> |
|---|---|
| Date | 2023-11-16 06:20 +0100 |
| Message-ID | <HACXf-5Lhm-1@gated-at.bofh.it> |
| In reply to | #263569 |
On Thu, 16 Nov 2023 04:11:37 +0000
"Russell L. Harris" <russell@rlharris.org> wrote:
> root@mollydew:/home/rlh# systemctl daemon-reload
> root@mollydew:/home/rlh# systemctl restart approx
> Failed to restart approx.service: Unit approx.service not found.
> root@mollydew:/home/rlh# systemctl status approx
> Unit approx.service could not be found.
> root@mollydew:/home/rlh#
Well, that's weird. I installed approx on a Debian 12 machine, and got
the same results you did. However:
root@tsalmoth:~# ll /lib/systemd/system/approx*
-rw-r--r-- 1 root root 165 Feb 12 2023 '/lib/systemd/system/approx@.service'
-rw-r--r-- 1 root root 167 Feb 12 2023 /lib/systemd/system/approx.socket
root@tsalmoth:~# systemctl status approx.service
Unit approx.service could not be found.
root@tsalmoth:~# systemctl status approx.socket
● approx.socket - caching proxy server for Debian archive files
Loaded: loaded (/lib/systemd/system/approx.socket; enabled; preset: enabled)
Active: active (listening) since Wed 2023-11-15 21:48:27 MST; 1min 47s ago
Docs: man:approx(8)
Listen: [::]:9999 (Stream)
Accepted: 0; Connected: 0;
Tasks: 0 (limit: 4469)
Memory: 8.0K
CPU: 642us
CGroup: /system.slice/approx.socket
Nov 15 21:48:27 tsalmoth systemd[1]: Listening on approx.socket - caching proxy server for Debian archive files.
root@tsalmoth:~#
So it seems to be running.
I made a minimal effort get get it to work with no success. You may
have better luck than I.
One thing I didn't like is that approx appears to require fiddling with
sources.list. apt-cacher-ng simply requires setting a proxy value, in
its own file in /etc/apt/apt.conf.d. E.g.:
root@hawk:/etc/apt/apt.conf.d# cat /etc/apt/apt.conf.d/02proxy
Acquire::http::Proxy "http://aptcacher.localdomain:3142";
root@hawk:/etc/apt/apt.conf.d#
--
Does anybody read signatures any more?
https://charlescurley.com
https://charlescurley.com/blog/
[toc] | [prev] | [next] | [standalone]
| From | Charles Curley <charlescurley@charlescurley.com> |
|---|---|
| Date | 2023-11-16 06:30 +0100 |
| Message-ID | <HAD6V-5Lqz-3@gated-at.bofh.it> |
| In reply to | #263571 |
On Wed, 15 Nov 2023 22:18:09 -0700 Charles Curley <charlescurley@charlescurley.com> wrote: > One thing I didn't like is that approx appears to require fiddling > with sources.list. apt-cacher-ng simply requires setting a proxy > value, in its own file in /etc/apt/apt.conf.d. E.g.: > > root@hawk:/etc/apt/apt.conf.d# cat /etc/apt/apt.conf.d/02proxy > Acquire::http::Proxy "http://aptcacher.localdomain:3142"; > root@hawk:/etc/apt/apt.conf.d# Or, even simpler, install auto-apt-proxy on your clients and let them find your proxy. The package description says it works for approx. And that worked! -- Does anybody read signatures any more? https://charlescurley.com https://charlescurley.com/blog/
[toc] | [prev] | [next] | [standalone]
| From | "Russell L. Harris" <russell@rlharris.org> |
|---|---|
| Date | 2023-11-16 06:50 +0100 |
| Message-ID | <HADqh-5LwF-3@gated-at.bofh.it> |
| In reply to | #263572 |
On Wed, Nov 15, 2023 at 10:23:45PM -0700, Charles Curley wrote: >On Wed, 15 Nov 2023 22:18:09 -0700 >Charles Curley <charlescurley@charlescurley.com> wrote: > >> One thing I didn't like is that approx appears to require fiddling >> with sources.list. apt-cacher-ng simply requires setting a proxy >> value, in its own file in /etc/apt/apt.conf.d. E.g.: >> >> root@hawk:/etc/apt/apt.conf.d# cat /etc/apt/apt.conf.d/02proxy >> Acquire::http::Proxy "http://aptcacher.localdomain:3142"; >> root@hawk:/etc/apt/apt.conf.d# > >Or, even simpler, install auto-apt-proxy on your clients and let them >find your proxy. The package description says it works for approx. And >that worked! > >-- >Does anybody read signatures any more? > >https://charlescurley.com >https://charlescurley.com/blog/ Thanks for checking, Charles. My schedule does not allow me to work on it until tomorrow evening. However, can auto-apt-proxy be specified during mirror selection with a netinstall? That is my primary need and use for approx. A friend gave me his old Windows XP machine. I installed on it Debian 12 with XFCE desktop. I intend to use it to replace an old machine on which is installed Debian 9, running a mail server (getmail) and an approx server. RLH
[toc] | [prev] | [next] | [standalone]
| From | Charles Curley <charlescurley@charlescurley.com> |
|---|---|
| Date | 2023-11-16 07:00 +0100 |
| Message-ID | <HADzX-5LzI-1@gated-at.bofh.it> |
| In reply to | #263573 |
On Thu, 16 Nov 2023 05:42:57 +0000 "Russell L. Harris" <russell@rlharris.org> wrote: > Thanks for checking, Charles. My schedule does not allow me to work > on it until tomorrow evening. However, can auto-apt-proxy be > specified during mirror selection with a netinstall? That I do not know. But the default port for approx is 9999 so you should be able to specify the approx server during the installation (or preseed it). That will result in a "Acquire::http::Proxy" line in /etc/apt/apt.conf similar to what I showed you earlier. > That is my > primary need and use for approx. > > A friend gave me his old Windows XP machine. I installed on it Debian > 12 with XFCE desktop. I intend to use it to replace an old machine on > which is installed Debian 9, running a mail server (getmail) and an > approx server. Do you really need approx if you have only the one machine? -- Does anybody read signatures any more? https://charlescurley.com https://charlescurley.com/blog/
[toc] | [prev] | [next] | [standalone]
| From | "Russell L. Harris" <russell@rlharris.org> |
|---|---|
| Date | 2023-11-16 07:20 +0100 |
| Message-ID | <HADTj-5LVM-5@gated-at.bofh.it> |
| In reply to | #263575 |
On Wed, Nov 15, 2023 at 10:55:51PM -0700, Charles Curley wrote: >Do you really need approx if you have only the one machine? I install Debian for friends. They are amazed at how fast their old Windows machines run with Debian. And approx has been a time saver for me. In the network mirror configuration step, all I have to type in is: 192.168.1.40:9999 I have not touched the approx server for a couple of years. RLH
[toc] | [prev] | [next] | [standalone]
| From | Anssi Saari <anssi.saari@debian-user.mail.kapsi.fi> |
|---|---|
| Date | 2023-11-16 06:50 +0100 |
| Message-ID | <HADqh-5LwF-1@gated-at.bofh.it> |
| In reply to | #263569 |
"Russell L. Harris" <russell@rlharris.org> writes: > root@mollydew:/home/rlh# systemctl daemon-reload > root@mollydew:/home/rlh# systemctl restart approx > Failed to restart approx.service: Unit approx.service not found. > root@mollydew:/home/rlh# systemctl status approx > Unit approx.service could not be found. > root@mollydew:/home/rlh# Looks like there's a cron job and a socket for it in the package. So are you sure you're even supposed to run it as a service? They do include an approx@.service so you could run it as whichever user you want but it makes me think that's not the idea here. Maybe the documents in /usr/share/doc/approx give more information about the intended usage. I've only taken a quick peek at the file list.
[toc] | [prev] | [next] | [standalone]
| From | "Russell L. Harris" <russell@rlharris.org> |
|---|---|
| Date | 2023-11-16 07:30 +0100 |
| Message-ID | <HAE2Z-5LZ2-11@gated-at.bofh.it> |
| In reply to | #263574 |
On Thu, Nov 16, 2023 at 07:48:44AM +0200, Anssi Saari wrote: >"Russell L. Harris" <russell@rlharris.org> writes: > >> root@mollydew:/home/rlh# systemctl daemon-reload >> root@mollydew:/home/rlh# systemctl restart approx >> Failed to restart approx.service: Unit approx.service not found. >> root@mollydew:/home/rlh# systemctl status approx >> Unit approx.service could not be found. >> root@mollydew:/home/rlh# > >Looks like there's a cron job and a socket for it in the package. So are >you sure you're even supposed to run it as a service? They do include an >approx@.service so you could run it as whichever user you want but it >makes me think that's not the idea here. > >Maybe the documents in /usr/share/doc/approx give more information about >the intended usage. I've only taken a quick peek at the file list. I am not familiar with the term "approx.service". I have not touched the approx server (running Debian 9) for a couple of years or more. It "just runs". I have used the server without change to the configuration files for netinstalls since Debian 8 or 9, and the latest was to install Debian 12. In the mirror selection of netinstall, I only have to type in the host ip address and port: "192.168.1.40:9999". RLH
[toc] | [prev] | [next] | [standalone]
| From | David <bouncingcats@gmail.com> |
|---|---|
| Date | 2023-11-16 12:40 +0100 |
| Message-ID | <HAISZ-5OOt-1@gated-at.bofh.it> |
| In reply to | #263569 |
On Thu, 16 Nov 2023 at 04:12, Russell L. Harris <russell@rlharris.org> wrote:
> On Wed, Nov 15, 2023 at 07:41:03PM -0700, Charles Curley wrote:
> >On Thu, 16 Nov 2023 01:39:32 +0000 "Russell L. Harris" <russell@rlharris.org> wrote:
> >> I installed approx in a Debian 12 system, but when I attempt to
> >> restart it the error message appears "Unit approx.service not loaded."
> >Please show us a complete copy and paste of the transaction, from the
> >initial prompt and the command you entered, through to the following
> >prompt, inclusive.
> >
> >Then, similarly for "systemctl status approx".
> >
> >You may need to run "systemctl daemon-reload".
> root@mollydew:/home/rlh# systemctl daemon-reload
> root@mollydew:/home/rlh# systemctl restart approx
> Failed to restart approx.service: Unit approx.service not found.
> root@mollydew:/home/rlh# systemctl status approx
> Unit approx.service could not be found.
> root@mollydew:/home/rlh#
Hi, the reason that the above commands fail is that there is no
systemd unit named neither 'approx' nor 'approx.service'.
systemd assumes '.service' for unit names that dont have any
type specified, see 'man 1 systemd'.
The name of the systemd unit is 'approx.socket'. So you need to use
that complete name all commands. If you put that complete name in
the above commands, then they will have a chance to succeed.
Examples:
[root@kablamm ~]# systemctl list-sockets | grep -E 'LISTEN|approx' -
LISTEN UNIT ACTIVATES
[::]:9999 approx.socket -
[root@kablamm ~]# systemctl status approx.socket
● approx.socket - caching proxy server for Debian archive files
Loaded: loaded (/lib/systemd/system/approx.socket; enabled;
vendor preset: enabled)
Active: active (listening) since Thu 2023-11-16 22:20:21 AEDT; 11min ago
Docs: man:approx(8)
Listen: [::]:9999 (Stream)
Accepted: 0; Connected: 0;
Tasks: 0 (limit: 19049)
Memory: 4.0K
CPU: 780us
CGroup: /system.slice/approx.socket
Nov 16 22:20:21 kablamm systemd[1]: Listening on caching proxy server
for Debian archive files.
[root@kablamm ~]# cat /lib/systemd/system/approx.socket
[Unit]
Description=caching proxy server for Debian archive files
Documentation=man:approx(8)
[Socket]
ListenStream=9999
Accept=yes
[Install]
WantedBy=sockets.target
[toc] | [prev] | [standalone]
Back to top | Article view | linux.debian.user
csiph-web