Try the fastest and simplest way to install ONLYOFFICE

Unable to remove onlyoffice-documentserver

Issues during installation and related to database

Unable to remove onlyoffice-documentserver

Postby sophie_jane » Mon May 29, 2017 4:45 pm

I installed onlyoffice-documentserver on my home Linux server via apt-get. Now, I am unable to remove onlyoffice-documentserver. When I run either sudo apt-get remove or sudo apt-get purge with onlyoffice-documentserver specified as the package, I get the following:

Code: Select all
Preparing for shutdown, it can take a lot of time, please wait...Done
Stoping documentserver services...
error: <class 'xmlrpclib.Fault'>, <Fault 10: 'BAD_NAME: onlyoffice-documentserver'>: file: /usr/lib/python2.7/xmlrpclib.py line: 794
dpkg: error processing package onlyoffice-documentserver (--purge):
 subprocess installed pre-removal script returned error exit status 2
Errors were encountered while processing:
 onlyoffice-documentserver
E: Sub-process /usr/bin/dpkg returned an error code (1)

I get basically the same message if I try apt-get remove. FYI, I messed up some of the nginx config files (they weren't working with my nginx config so I attempted some modifications). I can't find a copy of them anywhere on the web (I found a single docker config for nginx, but there are something like 7 nginx config files for Onlyoffice). So, I was going to purge Onlyoffice and re-install.
sophie_jane
 
Posts: 16
Joined: Mon May 29, 2017 2:57 pm

Re: Unable to remove onlyoffice-documentserver

Postby Maxim » Tue May 30, 2017 7:02 am

Hello sophie_jane!
Please specify what is OS of your home Linux server and version of supervisor and onlyoffice-documentserver version?
Maxim
 
Posts: 1179
Joined: Tue Oct 11, 2016 2:34 pm

Re: Unable to remove onlyoffice-documentserver

Postby sophie_jane » Wed May 31, 2017 1:55 am

I am running a Linux distro based on Ubuntu 14.04 called Cub Linux. According to dpkg, onlyoffice-documentserver version 4.3.4-10 is installed along with Supervisor version 3.0b2-1.
sophie_jane
 
Posts: 16
Joined: Mon May 29, 2017 2:57 pm

Re: Unable to remove onlyoffice-documentserver

Postby sophie_jane » Thu Jun 01, 2017 1:40 pm

Where can I find a list of the files that are removed when the onlyoffice-documentserver package is removed? I accidentally found it somewhere the other day, perhaps in an apt/ config folder (though I checked /etc/apt and I'm not seeing it now). If I knew what it removes, I'll just remove it all manually to see if that fixes the issue. I suspect the issue is that it's trying to remove the config files it places in /etc/nginx/, but I already removed them manually myself, so apt-get remove fails. Alternatively, I can try placing empty files with the correct names in /etc/nginx in hopes that onlyoffice-documentserver removal will proceed without error.
sophie_jane
 
Posts: 16
Joined: Mon May 29, 2017 2:57 pm

Re: Unable to remove onlyoffice-documentserver

Postby Maxim » Fri Jun 02, 2017 7:22 am

Hello sophie_jane!
Use this help
Or just delete
Code: Select all
rm -rf /var/www/onlyoffice
Maxim
 
Posts: 1179
Joined: Tue Oct 11, 2016 2:34 pm

Re: Unable to remove onlyoffice-documentserver

Postby sophie_jane » Sat Jun 03, 2017 1:04 pm

Thank you. Deleting /var/www/onlyoffice didn't solve the issue, so I had to edit some dpkg config files, with help from the AskUbuntu page you linked to. It was a little tricky, here's what I did: First, I looked to see where the error is happening, is it post-installation or post-removal? Then, edit the appropriate file, in my case it was the /var/lib/dpkg/info/onlyoffice-documentserver.postrm file. In there, I commented out a few things, but ultimately had to go in a few times and insert "echo THIS" at various points in the script and then try to remove onlyoffice. Doing this, I was able to determine which line was causing the error code 2 and subsequent failure. The following was causing the issue, solved by commenting out clean_ds_files and inserting ":" on a newline underneath clean_ds_files, with no quotes) so the script doesn't fail with nothing to do. And of course, make sure to undo your changes after successfully removing onlyoffice. I suspect those files in /var/lib/dpkg/info are overwritten when you install the package again, but I'm not certain.

Code: Select all
        remove|upgrade)
                  clean_ds_files


Solution:
Code: Select all
        remove|upgrade)
                 # clean_ds_files
                   : 
sophie_jane
 
Posts: 16
Joined: Mon May 29, 2017 2:57 pm

Re: Unable to remove onlyoffice-documentserver

Postby sophie_jane » Sat Jun 03, 2017 1:14 pm

Looks like I spoke too soon. post-installation is now failing with an error code 1. However, it should be easy to fix now. Thanks!
sophie_jane
 
Posts: 16
Joined: Mon May 29, 2017 2:57 pm

Re: Unable to remove onlyoffice-documentserver

Postby Maxim » Mon Jun 05, 2017 6:33 am

Hello sophie_jane!
Thank you for the information!
I hope you deleted successfully.
Maxim
 
Posts: 1179
Joined: Tue Oct 11, 2016 2:34 pm


Return to Installation issues

Who is online

Users browsing this forum: No registered users and 1 guest

cron