[Solved] Lock directory on NFS


This is not really a support request anymore since I figured it out myself but I think this might be good knowledge if anyone else is ignorant/stupid enough to do what I did.

Describe the problem you’re having:
Update daemon would not start. An empty lockfile was created but then the script died with “error: Can’t create lockfile ($lock_filename). Maybe another update process is already running.” Same issue with both update.php and update_daemon2.php.

If possible include steps to reproduce the problem:
Install tt-rss on NFS share…

tt-rss version (including git commit id):

Platform (i.e. Linux distro, PHP, PostgreSQL, etc) versions:
FreeBSD 11.1
Nginx 1.12.1
Postgresql 9.5.10
PHP 5.6

Please provide any additional information below:
I fixed this by putting the lock directory on local storage. It appears that flock in include/functions.php/make_lockfile fails if the lock files are on NFS storage. Not being an NFS expert, the best solution for me is to put the lock directory elsewhere.


flock() syscall works just fine on nfs on linux btw

(something about freebsd always being inferior and stuck in the past)


@greatgoran needs to enable the lock daemon on his NFS server by adding this line to /etc/rc.conf:

It’s easy to say that this is user error but I think FreeBSD is to blame as well for having a stupid default in which lockd doesn’t run by default when you’re an NFS server. See the default settings in the /etc/defaults directory:

$ grep rpc_lockd_enable /etc/defaults/rc.conf
rpc_lockd_enable=“NO” # Run NFS rpc.lockd needed for client/server.


Thanks @Kapowee, I kind of figured it was something like that. In my case, it is FreeNAS serving this share, so will need to check how to get lockd going there.

It’s a bit weird but it says lockd is running:

[me@freenas /etc/defaults]$ sudo service lockd status
lockd is running as pid 1894.

Anyway, this is clearly not a tt-rss problem, like so many others, but still might be useful for someone else. Maybe there could be a note in config.php or in the UpdatingFeeds information that you may have trouble if the lock directory is on (broken) NFS.


adding notes about every broken platform under the sun to the wiki and config files would make them completely incomprehensible. niche stuff like that is why we have this forum.


Yup, you’re right. I’m off to the BSD forums to get to the bottom with this.