Have you looked at why it can't remove the pid file?
Actually though, I think I can guess. You're going to find it is owned by the wrong user.
I think you have installed Confluence, set to run it as a new user called Conf or Atlassian or Confluence or something like that, then you started it manually while you were logged in as root. That process then took ownership of a load of files and runs fine until you try to stop it. The systemctl start command runs Confluence as the non-privileged user who can't delete or edit root's files.
If my guess there is correct, you will need to shutdown confluence completely (you'll need to be root to do it with the scripts, which is the better way to do it, but you could just kill the processes - kill Confluence and Synchrony if they are running). Then change ownership of all the clobbered files back to the confluence user, in both the confluence installation and data (home) directories, then restart confluence as the confluence user (systemctl will do that)
My installation directory, accessories, database, etc. are all in the "home" directory.My everything is installed in a virtual machine. I copy a new one from the original virtual machine. At this time, I backup the "home" directory of the original virtual machine and replace the "home" directory of the new virtual machine. At this time,the error message shown in the screenshot appears.
I used the command "ps -ef|grep confluence" to make sure that no confluence process was running.
I tried to follow the prompt to switch the confluence user running the startup script, but the same error message is prompted
Calling all Confluence Cloud Admins! We created a new Community Group to support your unique needs as Confluence admins. This is a group where you can ask questions, access resou...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events