Bug#1031200: /usr/sbin/faxgetty: Re: hylafax-server: faxgetty.service doesn't work with iaxmodem

2024-03-05 Thread Benoit Panizzon
Package: hylafax-server
Version: 3:6.0.7-5
Followup-For: Bug #1031200

Dear Maintainer,

Experienced same issue and I'm not sure when it was introduced and what the 
exact cause ist but I
don't recall I experiencing it on the last reboot (probably several months ago)

But what I suspect the cause to be:

iaxmodem creates a link from /dev/ttyIAX to a dynamic /dev/pts device.

The faxgetty systemd script contains:

BindsTo=dev-%i.device
After=dev-%i.device

And if %i is a link and not a real device, udev never triggers an event and the 
device binding is never true.

Commenting out those two statements solved the issue for me for now.

-Benoit-

-- System Information:
Debian Release: 12.5
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.1.0-9-amd64 (SMP w/4 CPU threads; PREEMPT)
Kernel taint flags: TAINT_SOFTLOCKUP
Locale: LANG=de_CH.UTF-8, LC_CTYPE=de_CH.UTF-8 (charmap=UTF-8), 
LANGUAGE=de_CH:de
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages hylafax-server depends on:
ii  adduser  3.134
ii  bsd-mailx [mailx]8.1.2-0.20220412cvs-1
ii  debconf [debconf-2.0]1.5.82
ii  ghostscript  10.0.0~dfsg-11+deb12u3
ii  hylafax-client   3:6.0.7-5
ii  init-system-helpers  1.65.2
ii  libc62.36-9+deb12u4
ii  libcrypt11:4.4.33-2
ii  libgcc-s112.2.0-14
ii  libjbig0 2.1-6.1
ii  libpam0g 1.5.2-6+deb12u1
ii  libstdc++6   12.2.0-14
ii  libtiff-tools4.5.0-6+deb12u1
ii  libtiff6 4.5.0-6+deb12u1
ii  lsb-base 11.6
ii  psmisc   23.6-1
ii  sed  4.9-1
ii  sendmail-bin [mail-transport-agent]  8.17.1.9-2
ii  systemd  252.22-1~deb12u1
ii  sysvinit-utils [lsb-base]3.06-4
ii  zlib1g   1:1.2.13.dfsg-1

hylafax-server recommends no packages.

Versions of packages hylafax-server suggests:
pn  mgetty  
pn  psrip   

-- Configuration Files:
/etc/hylafax/hosts.hfaxd changed:
localhost


-- debconf information:
  hylafax-server/start_now: true
  hylafax-server/setup_failed:

-- debsums errors found:
debsums: changed file /lib/systemd/system/faxgetty@.service (from 
hylafax-server package)



Bug#1031200: /usr/sbin/faxgetty: Re: hylafax-server: faxgetty.service doesn't work with iaxmodem

2024-03-06 Thread Giuseppe Sacco
Hello Benoit,
thank you for adding this information. The problem is indeed that one: udev
is not triggering any event when the IAX modem device is created. This lead
to a not existing dev-%i.device and hence, to a non activation of the
faxgetty by systemd.

The solution is to start the device manually. In your case, if the IAX modem
are started at boot, you may just leave the changes you have done to the
unit, and enable it for starting at boot time.

I am looking for a different approach that could starts faxgetty when an IAX
device is created, and stops it when it is removed. I do not have a solution
yet.

Bye,
Giuseppe



Bug#1031200: /usr/sbin/faxgetty: Re: hylafax-server: faxgetty.service doesn't work with iaxmodem

2024-08-27 Thread Camaleón
Hello,

Well, just installed a fresh new Debian 12 and I'm facing the same 
situation BUT using /dev/ttyS0 and /dev/ttyS1 external serial modems, 
instead.

ago 27 09:38:58 stt005 kernel: printk: console [tty0] enabled
ago 27 09:38:58 stt005 kernel: 00:03: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 
115200) is a 16550A
ago 27 09:38:58 stt005 kernel: 00:04: ttyS1 at I/O 0x2f8 (irq = 3, base_baud = 
115200) is a 16550A
ago 27 09:38:58 stt005 systemd[1]: Created slice system-getty.slice - Slice 
/system/getty.
ago 27 09:39:01 stt005 (udev-worker)[283]: ttyS0: Failed to create/update 
device symlink '/dev/ttyS0', ignoring: File exists
ago 27 09:39:01 stt005 (udev-worker)[283]: ttyS1: Failed to create/update 
device symlink '/dev/ttyS1', ignoring: File exists
ago 27 09:39:01 stt005 (udev-worker)[281]: ttyS2: Failed to create/update 
device symlink '/dev/ttyS2', ignoring: File exists
ago 27 09:39:01 stt005 (udev-worker)[279]: ttyS3: Failed to create/update 
device symlink '/dev/ttyS3', ignoring: File exists
ago 27 09:39:02 stt005 systemd[1]: getty-static.service - getty on tty2-tty6 if 
dbus and logind are not available was skipped because of an unmet condition 
check (ConditionPathExists=!/usr/bin/dbus-daemon).
ago 27 09:39:07 stt005 systemd[1]: Started getty@tty1.service - Getty on tty1.
ago 27 09:39:07 stt005 systemd[1]: Reached target getty.target - Login Prompts.

root@stt005:/etc# systemctl -a | grep ttyS[01]
  sys-devices-pnp0-00:03-tty-ttyS0.device   
   loadedactive   plugged   /sys/devices/pnp0/00:03/tty/ttyS0  
  sys-devices-pnp0-00:04-tty-ttyS1.device   
   loadedactive   plugged   /sys/devices/pnp0/00:04/tty/ttyS1

It seems to fail the same way :-(

By commenting out the «offending» lines (as comment #60 suggests) 
faxgetty service can be enabled and started and all runs smoothly on 
HylaFAX side:

ago 27 16:55:21 stt005 systemd[1]: Created slice system-faxgetty.slice - Slice 
/system/faxgetty.
ago 27 16:55:21 stt005 systemd[1]: Started faxgetty@192.168.0.5.service - 
HylaFAX faxgetty 192.168.0.5.
ago 27 17:00:21 stt005 systemd[1]: Started faxgetty@ttyS1.service - HylaFAX 
faxgetty ttyS1.
ago 27 17:00:21 stt005 FaxGetty[6342]: OPEN /dev/ttyS1  HylaFAX (tm) Version 
6.0.7
ago 27 17:00:31 stt005 FaxGetty[6342]: MODEM ACF3_V1.088-V90_P21_FSH 56000/
ago 27 17:03:37 stt005 FaxGetty[6163]: LOCKWAIT

root@stt005:/etc# systemctl -a | grep ttyS[01]
  dev-ttyS0.device  
   loadedactive   plugged   /dev/ttyS0
  dev-ttyS1.device  
   loadedactive   plugged   /dev/ttyS1
  sys-devices-pnp0-00:03-tty-ttyS0.device   
   loadedactive   plugged   /sys/devices/pnp0/00:03/tty/ttyS0
  sys-devices-pnp0-00:04-tty-ttyS1.device   
   loadedactive   plugged   /sys/devices/pnp0/00:04/tty/ttyS1
  faxgetty@ttyS0.service
   loadedactive   running   HylaFAX faxgetty ttyS0
  faxgetty@ttyS1.service
   loadedactive   running   HylaFAX faxgetty ttyS1

ago 27 09:38:58 stt005 kernel: 00:03: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 
115200) is a 16550A
ago 27 09:38:58 stt005 kernel: 00:04: ttyS1 at I/O 0x2f8 (irq = 3, base_baud = 
115200) is a 16550A
ago 27 09:39:01 stt005 (udev-worker)[283]: ttyS0: Failed to create/update 
device symlink '/dev/ttyS0', ignoring: File exists
ago 27 09:39:01 stt005 (udev-worker)[283]: ttyS1: Failed to create/update 
device symlink '/dev/ttyS1', ignoring: File exists

(...)

ago 27 16:56:07 stt005 systemd[1]: Started faxgetty@ttyS0.service - HylaFAX 
faxgetty ttyS0.
ago 27 16:56:07 stt005 FaxGetty[6163]: OPEN /dev/ttyS0  HylaFAX (tm) Version 
6.0.7
ago 27 17:00:21 stt005 systemd[1]: Started faxgetty@ttyS1.service - HylaFAX 
faxgetty ttyS1.
ago 27 17:00:21 stt005 FaxGetty[6342]: OPEN /dev/ttyS1  HylaFAX (tm) Version 
6.0.7

BUT not sure if this approach is the RIGHT one for standard serial 
modems nor if this will work for the two (2) modems (ttyS0 and ttyS1) 
to gte properly initializated after system reboots.

Any advice or comment on this would be appreciated :-)

P.S. Sorry for this kinda «bug hijacking». Just tell me should I better 
open a new bug report instead of keeping the new stuff into this one.

Greetings,

-- 
Camaleón 



Bug#1031200: /usr/sbin/faxgetty: Re: hylafax-server: faxgetty.service doesn't work with iaxmodem

2024-08-27 Thread Camaleón
On Tue, 27 Aug 2024 17:58:58 +0200 =?utf-8?B?Q2FtYWxlw7Nu?= 
 wrote:

Just an update on this...

> Well, just installed a fresh new Debian 12 and I'm facing the same
> situation BUT using /dev/ttyS0 and /dev/ttyS1 external serial modems,
> instead.

(...)

> By commenting out the «offending» lines (as comment #60 suggests)
> faxgetty service can be enabled and started and all runs smoothly on
> HylaFAX side:

(...)

> BUT not sure if this approach is the RIGHT one for standard serial
> modems nor if this will work for the two (2) modems (ttyS0 and ttyS1)
> to gte properly initializated after system reboots.
>
> Any advice or comment on this would be appreciated :-)

After a system restart, all seems to be working fine (both modems are 
up and listenig, HylaFAX services up and runing, in-out-faxing service 
working...).

root@stt005:~# journalctl -b0 | grep -i fax
ago 28 05:14:21 stt005 systemd[1]: Created slice system-faxgetty.slice - Slice 
/system/faxgetty.
ago 28 05:14:27 stt005 systemd[1]: Started faxgetty@192.168.0.5.service - 
HylaFAX faxgetty 192.168.0.5.
ago 28 05:14:27 stt005 systemd[1]: Started faxgetty@ttyS0.service - HylaFAX 
faxgetty ttyS0.
ago 28 05:14:27 stt005 systemd[1]: Started faxgetty@ttyS1.service - HylaFAX 
faxgetty ttyS1.
ago 28 05:14:27 stt005 systemd[1]: Starting hylafax.service - HylaFAX...
ago 28 05:14:28 stt005 systemd[1]: Finished hylafax.service - HylaFAX.
ago 28 05:14:28 stt005 systemd[1]: Starting faxq.service - HylaFAX queue 
manager process for outbound facsimile jobs...
ago 28 05:14:30 stt005 systemd[1]: Started faxq.service - HylaFAX queue manager 
process for outbound facsimile jobs.
ago 28 05:14:30 stt005 FaxQueuer[343]: HylaFAX (tm) Version 6.0.7
ago 28 05:14:30 stt005 FaxQueuer[343]: Copyright (c) 1990-1996 Sam Leffler
ago 28 05:14:30 stt005 FaxQueuer[343]: Copyright (c) 1991-1996 Silicon 
Graphics, Inc.
ago 28 05:14:30 stt005 FaxGetty[308]: OPEN /dev/ttyS1  HylaFAX (tm) Version 
6.0.7
ago 28 05:14:31 stt005 FaxGetty[307]: OPEN /dev/ttyS0  HylaFAX (tm) Version 
6.0.7
ago 28 05:14:33 stt005 HylaFAX[408]: Listening to 0.0.0.0:4559
ago 28 05:14:33 stt005 HylaFAX[408]: HylaFAX INET Protocol Server: restarted.
ago 28 05:14:33 stt005 HylaFAX[408]: HylaFAX SNPP Protocol Server: restarted.
ago 28 05:14:32 stt005 systemd[1]: Started hfaxd.service - HylaFAX 
client-server protocol server.
ago 28 05:14:40 stt005 FaxGetty[308]: MODEM ACF3_V1.088-V90_P21_FSH 56000/
ago 28 05:14:40 stt005 FaxGetty[307]: MODEM ACF3_V1.088-V90_P21_FSH 56000/

ago 28 05:15:31 stt005 FaxQueuer[343]: NOTIFY exit status: 0 (1068)

ago 28 07:40:10 stt005 FaxGetty[307]: log/seqf: open: Permission denied
ago 28 07:40:10 stt005 FaxGetty[307]: Couldn't get next seqnum for session log: 
Unable to open sequence number file log/seqf; Permission denied.
ago 28 07:40:16 stt005 FaxGetty[307]: ANSWER: FAX CONNECTION  DEVICE 
'/dev/ttyS0'
ago 28 07:41:07 stt005 FaxGetty[307]: MODEM ACF3_V1.088-V90_P21_FSH 56000/
ago 28 08:07:01 stt005 HylaFAX[1496]: `-> Got a: 127.0.0.1[13]
ago 28 08:07:01 stt005 HylaFAX[1496]: `-> Got a: 41661[19]

root@stt005:~# systemctl status faxgetty@*
● faxgetty@ttyS1.service - HylaFAX faxgetty ttyS1
 Loaded: loaded (/lib/systemd/system/faxgetty@.service; enabled; preset: 
enabled)
 Active: active (running) since Wed 2024-08-28 05:14:27 CEST; 3h 25min ago
   Main PID: 308 (faxgetty)
  Tasks: 1 (limit: 9509)
 Memory: 1.4M
CPU: 68ms
 CGroup: /system.slice/system-faxgetty.slice/faxgetty@ttyS1.service
 └─308 /usr/sbin/faxgetty ttyS1

ago 28 05:14:27 stt005 systemd[1]: Started faxgetty@ttyS1.service - HylaFAX 
faxgetty ttyS1.
ago 28 05:14:30 stt005 FaxGetty[308]: OPEN /dev/ttyS1  HylaFAX (tm) Version 
6.0.7
ago 28 05:14:40 stt005 FaxGetty[308]: MODEM ACF3_V1.088-V90_P21_FSH 56000/

● faxgetty@ttyS0.service - HylaFAX faxgetty ttyS0
 Loaded: loaded (/lib/systemd/system/faxgetty@.service; enabled;preset: 
enabled)
 Active: active (running) since Wed 2024-08-28 05:14:27 CEST; 3h25min ago
   Main PID: 307 (faxgetty)
  Tasks: 1 (limit: 9509)
 Memory: 1.3M
CPU: 73ms
 CGroup: /system.slice/system-faxgetty.slice/faxgetty@ttyS0.service
 └─307 /usr/sbin/faxgetty ttyS0

ago 28 05:14:27 stt005 systemd[1]: Started faxgetty@ttyS0.service - HylaFAX 
faxgetty ttyS0.
ago 28 05:14:31 stt005 FaxGetty[307]: OPEN /dev/ttyS0  HylaFAX (tm) Version 
6.0.7
ago 28 05:14:40 stt005 FaxGetty[307]: MODEM ACF3_V1.088-V90_P21_FSH 56000/
ago 28 07:40:10 stt005 FaxGetty[307]: log/seqf: open: Permission denied
ago 28 07:40:10 stt005 FaxGetty[307]: Couldn't get next seqnum for session log: 
Unable to open sequence number file log/seqf; Permis>
ago 28 07:40:16 stt005 FaxGetty[307]: ANSWER: FAX CONNECTION  DEVICE 
'/dev/ttyS0'
ago 28 07:41:07 stt005 FaxGetty[307]: MODEM ACF3_V1.088-V90_P21_FSH 56000/

So far so good, but when systemd package is updated, edited init script 
will be gone and faxgetty will fail again.

Until this is solved upstream and globall