"Something Bad Happened" - unable to open exclude file

Q: Date/Time this occurred (Provide your time zone also)
A: Thu Mar 2 20:29:34 PST 2023

Q: DevKinsta Version
A: 2.9.0

Q: OS Version
A:macOS 12.6.3

Q: Docker Desktop Version
A:4.17.0

Q: Were any error codes or messages observed? If so, what were they?
A:

Q: Detailed Description of the Problem
**A: I am a new Kinsta customer. I created a new WordPress site on MyKinsta and then tried to create a new site in DevKinsta using the import feature. It seems to be dying when it tries to rsync files from the origin to the local environment. Looking at the main.log file and the error reported “failed to open exclude file /tmp/rsync/rsync_exclude_create_import_1036d421bf3a46e190ae02769e42dcc6.tmp: No such file or directory” there is no such file on the remote system when I SSH to check.

[2023-03-02 20:25:33.276] [info] [downloadSite] Download files
[2023-03-02 20:25:33.713] [warn] [terminalExec] Error: rsync: [client] failed to open exclude file /tmp/rsync/rsync_exclude_create_import_1036d421bf3a46e190ae02769e42dcc6.tmp: No such file or directory (2)
rsync error: error in file IO (code 11) at exclude.c(1188) [client=3.2.3]

[2023-03-02 20:25:33.861] [info] [terminalExec] Child process exited with code 11
[2023-03-02 20:25:33.861] [error] [downloadSite] Error while downloading files Error: Encountered an error in child process 50701: 11. rsync: [client] failed to open exclude file /tmp/rsync/rsync_exclude_create_import_1036d421bf3a46e190ae02769e42dcc6.tmp: No such file or directory (2)
rsync error: error in file IO (code 11) at exclude.c(1188) [client=3.2.3]

**

main.log (18.4 KB)

Hi @darryl.dieckman (Darryl) :wave: Welcome to DevKinsta Community!

As I can see from that main.log, it seems you tried to import the Staging site (Krenov) from your MyKinsta account .

I myself have never experienced that error message ( [terminalExec] Error: rsync: [client] failed to open exclude file /tmp/rsync/rsync_exclude_create_import_... ) on my Linux and Windows machines each time I tried to import my sites from my own MyKinsta account (both Live and Staging sites).

I don’t have Mac and have never used it either myself, but could you please open the Terminal program on your Mac computer and there see if there’s such folder: /tmp/rsync/ ? cause based on that error message, looks like DevKinsta was unable to open that file/directory on your local computer (not on the remote/MyKinsta server side).

I checked my own Linux computer just now, when I tried to import my Staging site from MyKinsta, I could see that `/tmp/rsync/’ sub-folder was created and also could see the new (rsync_exclude_create_import_.XXXX.tmp) .tmp file there (though it’s just empty file).

Cheers,
Agus

There is no /tmp/rsync directory created on my laptop.

I ran a system trace on the app to see what files the application is trying to read/write. The exclude file appears to be created in a tmpfile stored in the /private directory tree.

I can find the files being created in a tmp filespace for the application:
/var/folders/j3/rz94_gqs2fjct6_vgx8xxlxm0000gn/T/rsync

The exclude file ‘rsync_exclude_create_import_296c582f3d224e258bb9e102d1c6564b.tmp’ can be found here and it is empty.

Unfortunately, even if I manually create the missing file in /tmp/rsync I still get the same error in main.log that it cannot find the file.

I’m not sure if the application is mixing up the tmpfile space with /tmp or if the log messages are misleading.

Is there any way to turn up the debugging on DevKinsta to see how the rsync command is being invoked?

Hi @darryl.dieckman,

Is there any way to turn up the debugging on DevKinsta to see how the rsync command is being invoked?

we’ll dig into it and let you know. In the meantime, can you confirm if:

  1. Creating a new empty site directly in DevKinsta works fine
  2. The issue is there even after updating DevKinsta to the latest version

Regards,
Alessandro

  1. creating a new empty WordPress site locally works fine.
  2. the issue persists even after updating to the latest version this AM (version 2.10.0)
  3. the issue also occurs when PUSHing from localhost to a Kinsta staging environment. Same error, unable to locate exclude file when uploading files to the remote.

Thank you for your reply and update @darryl.dieckman

We’ve reported this case to our internal team/devs, but have not received an update yet from them.

While we’re waiting for their updates, I’m a bit curious with the information you provided before:

The exclude file appears to be created in a tmpfile stored in the /private directory tree.

I can find the files being created in a tmp filespace for the application:
/var/folders/j3/rz94_gqs2fjct6_vgx8xxlxm0000gn/T/rsync

The exclude file ‘rsync_exclude_create_import_296c582f3d224e258bb9e102d1c6564b.tmp’ can be found here and it is empty.

I’ve never seen this case before (and as I mentioned that I don’t have Mac machines so couldn’t really check/replicate this either) :thinking: but if the rsync_exclude_create_import_296c582f3d224e258bb9e102d1c6564b.tmp empty file was created inside that sub-folder /var/folders/j3/rz94_gqs2fjct6_vgx8xxlxm0000gn/T/rsync - instead of inside the /tmp/rsync/ subfolder (which I assumed that DevKinsta would look into this subfolder instead),
then I’m wondering, what if you create a symlink for /tmp/rsync to that another subfolder of: /var/folders/j3/rz94_gqs2fjct6_vgx8xxlxm0000gn/T/rsync ?

With the following command inside your /tmp folder:

ln -s /var/folders/j3/rz94_gqs2fjct6_vgx8xxlxm0000gn/T/rsync/ rsync/

so that will create a symbolic link (shortcut) for the /tmp/rsync//var/folders/j3/rz94_gqs2fjct6_vgx8xxlxm0000gn/T/rsync/
(hopefully DevKinsta will be able to see/locate for that tmp file inside this /rsync symlink sub-folder)

After that, could you please try if you can Import and Push to Staging environment?

Please update us again if the workaround above will work or not.

Cheers,
Agus

I tried to create the site via import again this morning.

Here I am creating a symlink from /tmp/rsync into the tmp space

$ cd /tmp
$ ln -s /var/folders/j3/rz94_gqs2fjct6_vgx8xxlxm0000gn/T/rsync/ rsync
$ ls -l /tmp/rsync/rsync_exclude_create_import_e60ee80476cd48b783ddd7411e47d513.tmp

-rw-r–r-- 1 … staff 0 Mar 6 09:41 /tmp/rsync/rsync_exclude_create_import_e60ee80476cd48b783ddd7411e47d513.tmp

The rsync is now accessible from the /tmp/rsync location. I retry the import and this is what appears in the main.log.

[2023-03-06 09:43:46.300] [info] [downloadSite] Download files
[2023-03-06 09:43:46.952] [warn] [terminalExec] Error: rsync: [client] failed to open exclude file /tmp/rsync/rsync_exclude_create_import_e60ee80476cd48b783ddd7411e47d513.tmp: No such file or directory (2)
rsync error: error in file IO (code 11) at exclude.c(1188) [client=3.2.3]

[2023-03-06 09:43:47.077] [info] [terminalExec] Child process exited with code 11
[2023-03-06 09:43:47.078] [error] [downloadSite] Error while downloading files Error: Encountered an error in child process 56327: 11. rsync: [client] failed to open exclude file /tmp/rsync/rsync_exclude_create_import_e60ee80476cd48b783ddd7411e47d513.tmp: No such file or directory (2)
rsync error: error in file IO (code 11) at exclude.c(1188) [client=3.2.3]

at handleChildProcessClosure (/Applications/DevKinsta.app/Contents/Resources/app.asar/main.prod.js:2:790819)
at ChildProcess.<anonymous> (/Applications/DevKinsta.app/Contents/Resources/app.asar/main.prod.js:2:789776)
at ChildProcess.emit (node:events:527:28)
at ChildProcess.emit (node:domain:475:12)
at maybeClose (node:internal/child_process:1092:16)
at Socket.<anonymous> (node:internal/child_process:451:11)
at Socket.emit (node:events:527:28)
at Socket.emit (node:domain:475:12)
at Pipe.<anonymous> (node:net:709:12)

Thank you for your reply Darryl!

Looks like that symlink method didn’t help either :thinking: , though technically the path/file is accessible/actually there on your local machine.
Really strange indeed as the error kept showing that error message:

[terminalExec] Error: rsync: [client] failed to open exclude file /tmp/rsync/rsync_exclude_create_import_e60ee80476cd48b783ddd7411e47d513.tmp: No such file or directory (2)
rsync error: error in file IO (code 11) at exclude.c(1188) [client=3.2.3]

I’m out of idea at the moment, and have just updated asked our internal devs to double check and/or suggest any other idea. Will update you again once we have more information from them.

Cheers,
Agus

Hello again Darryl,

I’ve got an update from our internal devs team and am passing the info from them to you here.

So one of our internal devs mentioned that this seems to be a very mysterious one as none of the devs team face this issue during the development and testing. They will have a look at other scenarios where the error might occur and will keep trying to reproduce it as much as possible.

He also suggested one thing maybe that you could try is to re-install docker and said to make sure that it’s installed in a privileged mode (it will prompt for a password/fingerprint during the installation, and if provided, it should be fine with all the permissions for accessing the file system - and if not then it will skip and DevKinsta will probably not work properly).

Please let us know again with the results.

Cheers,
Agus