Bug 2360947 - Netatalk pid file directory does not exist
Summary: Netatalk pid file directory does not exist
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: netatalk
Version: 42
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Andrew Bauer
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 2362265 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-04-18 10:35 UTC by DanF
Modified: 2025-04-27 02:03 UTC (History)
4 users (show)

Fixed In Version: netatalk-4.2.1-1.fc43 netatalk-4.2.1-1.fc42 netatalk-4.2.1-1.fc41
Clone Of:
Environment:
Last Closed: 2025-04-19 18:33:57 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description DanF 2025-04-18 10:35:25 UTC
Upon netatalk.server starting, we get this error:

Apr 18 20:09:38 nas systemd[1]: netatalk.service: Can't open PID file '/run/lock/netatalk/netatalk/netatalk' (yet?) after start: No such file or directory

Adding the following to the service file in the "[Service]" section fixes the issue:

ExecStartPre=mkdir -p /run/lock/netatalk/netatalk/

Reproducible: Always

Steps to Reproduce:
1. Start netatalk service
2.
3.
Actual Results:
Error creating and accessing the PIDFile

Expected Results:
The service should start without error

Additional Information:
Adding this to the "[Service]" section of the service file "fixes" this:

ExecStartPre=mkdir -p /run/lock/netatalk/netatalk/

Comment 1 Andrew Bauer 2025-04-18 11:49:13 UTC
We already set the folder using RuntimeDirectory in the service file:
https://src.fedoraproject.org/rpms/netatalk/blob/rawhide/f/netatalk.spec#_166

That creates the path when the service is started. 
Please verify you are using the service file provide by the package and the line referenced above exists.

Something isn't right, however. The path you have provided, /run/lock/netatalk/netatalk/netatalk, is not correct.

The full path to the pid file should be /run/lock/netatalk/netatalk

I need to check if upstream may re-defined the with-lockfile-path build parameter. I'll have to investigate, time permitting.

Comment 2 DanF 2025-04-18 12:06:35 UTC
(In reply to Andrew Bauer from comment #1)

> That creates the path when the service is started. 
> Please verify you are using the service file provide by the package and the
> line referenced above exists.
> 

I did originally have the service file from the package, I've pasted the original below:

```
# This file is part of Netatalk 4.1.2.

[Unit]
Description=Netatalk AFP fileserver for Macintosh clients
Documentation=man:afp.conf(5) man:netatalk(8) man:afpd(8) man:cnid_metad(8) man:cnid_dbd(8)
Documentation=https://netatalk.io/
After=network.target avahi-daemon.service atalkd.service

[Service]
Type=forking
GuessMainPID=no
ExecStart=/usr/bin/netatalk
RuntimeDirectory=lock/netatalk
PIDFile=/run/lock/netatalk/netatalk/netatalk
ExecReload=/bin/kill -HUP $MAINPID
Restart=always
RestartSec=1

[Install]
WantedBy=multi-user.target
```

Yep, no rush on my end - I have a work around.

Comment 3 DanF 2025-04-18 12:16:42 UTC
Also, changing the RuntimeDirectory as below also fixes the issue:

RuntimeDirectory=lock/netatalk/netatalk

Comment 4 Andrew Bauer 2025-04-18 12:32:27 UTC
I think the best solution is to adjust with-lockfile-path during build, so we don't end up with nested netatalk subfolders. 

This looks like the relevant PR that changed the behavior of the with-lockfile-path parameter:
https://github.com/Netatalk/netatalk/pull/1850

If the weather keeps me inside on Saturday, I spend my time working on a fix for this.

Comment 5 Fedora Update System 2025-04-19 18:31:18 UTC
FEDORA-2025-015c5a157e (netatalk-4.2.1-1.fc43) has been submitted as an update to Fedora 43.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-015c5a157e

Comment 6 Fedora Update System 2025-04-19 18:33:57 UTC
FEDORA-2025-015c5a157e (netatalk-4.2.1-1.fc43) has been pushed to the Fedora 43 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 7 Fedora Update System 2025-04-19 18:34:10 UTC
FEDORA-2025-3538438f4a (netatalk-4.2.1-1.fc42) has been submitted as an update to Fedora 42.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-3538438f4a

Comment 8 Fedora Update System 2025-04-19 18:34:44 UTC
FEDORA-2025-e89778e77b (netatalk-4.2.1-1.fc41) has been submitted as an update to Fedora 41.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-e89778e77b

Comment 9 Fedora Update System 2025-04-19 20:41:06 UTC
FEDORA-2025-e89778e77b has been pushed to the Fedora 41 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2025-e89778e77b`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2025-e89778e77b

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 10 Fedora Update System 2025-04-19 22:30:04 UTC
FEDORA-2025-3538438f4a has been pushed to the Fedora 42 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2025-3538438f4a`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2025-3538438f4a

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 11 Andrew Bauer 2025-04-25 11:46:12 UTC
*** Bug 2362265 has been marked as a duplicate of this bug. ***

Comment 12 Fedora Update System 2025-04-27 01:21:50 UTC
FEDORA-2025-3538438f4a (netatalk-4.2.1-1.fc42) has been pushed to the Fedora 42 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 13 Fedora Update System 2025-04-27 02:03:32 UTC
FEDORA-2025-e89778e77b (netatalk-4.2.1-1.fc41) has been pushed to the Fedora 41 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.