tus / tusd

Reference server implementation in Go of tus: the open protocol for resumable file uploads

Home Page:https://tus.github.io/tusd

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TemporaryError "Lockfile created, but doesn't exist"

floodico opened this issue · comments

Why does it raise and how to avoid this error?

tusd creates a lock file for each upload to ensure that only one client accesses the upload at a time. Apparently the creation of this lockfile can fail causing the error you are seeing.
What OS are you using? What file system are you using?

I'm using macOS. But project setup is executed on VM with Vagrant. On VM i'm using Ubuntu 16.04.5 LTS.
At first everything worked fine. After i made synced folder of project for development directly on VM, and then i got this error. Where must be created that lockfile? Can i check?

Ok, that makes sense. I assume that you use VirtualBox since that is the default provider for Vagrant. Due to security reasons (according to https://stackoverflow.com/a/24365338), VirtualBox has disabled symbolic links in shared folders. However, these lock files use symbolic links internally, which explains why this error occurs. The linked question on StackOverflow contains a way to allow symbolic links, so you might try it out. If that does not work, you should try running tusd not inside a shared folder.

I forgot to write about log i get:
default: Created symlink from /etc/systemd/system/multi-user.target.wants/tusd.service to /etc/systemd/system/tusd.service.
default: Job for tusd.service failed because a timeout was exceeded. See "systemctl status tusd.service" and "journalctl -xe" for details.

Where is this log from? I am not really sure where it belongs. But since the log mentions it, what's the output of systemctl status tusd.service?

Also, did you try the suggestions I gave you in the comment above?

when i run sudo systemctl start tusd.service, then i get this log:
default: Job for tusd.service failed because a timeout was exceeded.

Output of systemctl status tusd.service is:

   Loaded: loaded (/etc/systemd/system/tusd.service; enabled; vendor preset: enabled)
   Active: activating (start) since Thu 2018-08-09 13:05:55 UTC; 1min 20s ago
  Control: 6261 (tusd.sh)
    Tasks: 5
   Memory: 2.0M
      CPU: 9ms
   CGroup: /system.slice/tusd.service
           ├─6261 /bin/sh /home/vagrant/services/tusd.sh
           └─6263 tusd -dir ./public/uploads/cache -hooks-dir ./lib/hooks

Yes, i tried to put that to my Vagrantfile:

config.vm.provider "virtualbox" do |v|
    v.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/v-root", "1"]
end

But i get the same

Ok, thanks.

Did you try following yet?

If that does not work, you should try running tusd not inside a shared folder.

@Acconut Yes, that worked. Thank you!