Something Bad happened, again

Q: Date/Time this occurred (Provide your time zone also)
**A:**16:15 BST

Q: DevKinsta Version
**A:**latest

Q: OS Version
**A:**Linux Mint 21

Q: Docker Desktop Version
**A:**N/A using Latest Docker Engine

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

Q: Detailed Description of the Problem
A: Trying to create a new DevKinsta site from an existing Kinsta site.
Get the “Something bad happened” message while it is importing the DB. ( 4.5GB ) Retried and it seems to complete the import but then gives the same error.
Looking in Main.log I see one significant error …
2022-08-19 16:08:47.255] [error] [ipcMainStep] Error in operation SITE_CREATION, step rsync: Error: EACCES: permission denied, open ‘/home/ssoa/DevKinsta/public/cojahune/wp-config.php’

Looking at the permissions it seems completely confused!
/home/ssoa/DevKinsta is owned by root.
The new site is owned by my main admin userid ( NOT the id that DevKinsta is actually running, or was installed under. So I don’t understand where it is geting this from ).
My local ID does have sudo access.

So how do I get this to work correctly when running DevKinsta under a second ( project based ) ID?
I thought that sudoing to root when I installed DevKinsta would be enough, and the othe existing sites all work. But clearly not for importing new sites.

Any ideas?
Thanks
Alan

Hi @alanj, thanks for reaching out. What do the permissions on that wp-config.php file look like? Can you just chown it to your local user then retry the process? I’m not entirely sure of how the permissions work with DK on Linux but I can ask our devs for input if nothing works for you.

Hi Kevin,
Nope doesn’t work.
I tried changing the ownership of all to the current user, who is also an administrator. Id is also in the owning group. I have also reinstalled DevKinsta under the current ID.

What seems to happen is that when a new site is imported it fails when trying to update wpconfig.php. When I look at that its permissions are not the current ID, as I expected, but of my other ID who was the original root user. I have no idea where DevKinsta is getting this ID to use in the permissions of the files its is importing. Makes no sense to me.

I guess I’ll delete everything and start over yet again. :frowning:

Cheers
Alan

Very odd; okay I’ll ask our developers what’s going on or if there’s a workaround. I know people run into permission issues when they use the non-root user but I’m still not sure why that happens. I’ll let you know when they get back to me.

Lol yep pulling my hair out now.

Removed DK completely from all IDs.
Reinstalled under my sub ID. It does ask for root pwd as part of the install.
Install all ok.
I can create a new site - which still uses my other root ID as the owner … but despite this the site and DK all work fine.
But if I try and import a site then it fails with the same permission error when trying to access wpconfig.php

Time for a beer
Alan

Sorry one last question.

So the reinstalled DK works when creating a new site.
However it has now lost all the old sites. If I look in Home/ID/DevKinsta I see both the new and the old site folders.

How can I make DK see them too? I am guessing there must be someing in .config/devkinsta that tells it what sites exist and where, but I can’t see any obvious ini file.

Thanks
Alan

Everything should be coming from your config.json file if you can find that among the config files. Even if you point to the files your database would also need to have each site’s database intact. I’m assuming your reinstall deleted the database but I can’t be sure. If you create a new site you can see how the data is formatted in config.json.

Thanks Kevin,
Sadly lost my DB so I started over.

I deleted both DK and Docker.
Now on my original ( admin ) userid I installed Docker Engine ( NOT Docker Desktop ). I installed DK.
Both seem to work.
But if I create a new test site I am able to enable HTTPS/SSL ok.
But if I import a Kinsta site - import works ok - I am unable to enable HTTPS/SSL.

I get this error in the log.

[info] [installPlatformLinux] Verified = false / certutil command /usr/bin/certutil,-A,-d,sql:/home/alan/.pki/nssdb,-t,C,-n,‘localcert certificate for ssoaeval.local’,-i,/home/alan/DevKinsta/ssl/ssoaeval.local.crt
[2022-08-21 11:57:04.087] [error] [setSsl] Error while setting ssl to true {
e: “Error: Encountered an error: Error: Command failed: /usr/bin/certutil -A -d sql:/home/alan/.pki/nssdb -t C, -n ‘localcert certificate for ssoaeval.local’ -i /home/alan/DevKinsta/ssl/ssoaeval.local.crt\n” +
‘certutil: could not add certificate to token or database: SEC_ERROR_ADDING_CERT: Error adding certificate to database.\n’ +
‘\n’ +
’ at /opt/DevKinsta/resources/app.asar/main.prod.js:2:819693\n’ +
’ at ChildProcess.exithandler (node:child_process:413:5)\n’ +
’ at ChildProcess.emit (node:events:394:28)\n’ +
’ at ChildProcess.emit (node:domain:475:12)\n’ +
’ at maybeClose (node:internal/child_process:1064:16)\n’ +
’ at Socket. (node:internal/child_process:450:11)\n’ +
’ at Socket.emit (node:events:394:28)\n’ +
’ at Socket.emit (node:domain:475:12)\n’ +
’ at Pipe. (node:net:672:12)’

Any ideas?
Thanks
Alan

Update:
I deleted the nssdb and recreated it.
DK still refuses to enable SSL for the imported site.

Update2:
Yet another complete reinstall.

  1. Created a fresh blank test site. It works. I can enable HTTPS/SSL and it still works. So good with WP and SSL certs.
  2. Imported a site from Kinsta. Imports ok. But I am unable to enable HTTPS/SSL in DK. So I am unable to access the wpadmin as the site on Kinsta required https. Nor the homepage itself of course.
  3. Imported another Kinsta site. Imports ok and there was a long pause at 83% as it configured SSL certs, but it completed ok. In DK the https/ssl was already enabled. However I am unable to access the site as again the Kinsta site required https.

No idea where to go next, other than Local perhaps.

Cheers
Alan

Hi @alanj, our devs read through this thread and confirmed some of the issues you are seeing but also reiterated that we officially only support/QA for Ubuntu so there’s a chance that using Mint might be contributing to the issues you are having. And, yes, apparently there’s no real process for fixing the permissions issues with non-root user yet.

Sorry, not the greatest news, but I’m hoping we can create a more universal Linux version of DK in the future. You did bring up issues that might affect Ubuntu as well so please also be on the lookout for future updates. The SSL issue could definitely be fixed/start working in the future.

Again, sorry for the non-solution here. I’ll definitely update this thread in the future if we make major changes to the Linux release that could resolve these issues for you.

Thanks for looking Kevin,

I really wanted to like DK. The idea is good although flawed in only being able to sync with the full site. Really needs to be able to separate the design from the content so we could update designs and push only those to the live sites.
But I’m afraid I have not found it easy to work with. I know I use Linux Mint but that is based on Ubuntu. Sometimes DK does actually work but it is not reliable so I never know if I am going to be able to access my test site or not.

Sadly I’ve given up on DK now. Will build my own local server for testing/development.

Thanks for your help in the past.
Cheers
Alan

1 Like

I absolutely understand @alanj, and I generally appreciate all of the time you have put into trying to make DevKinsta work for you. Everything you’ve shared with us will always be invaluable and will help make DevKinsta better in the future.

Best of luck with all of your projects!