DocumentServer icon indicating copy to clipboard operation
DocumentServer copied to clipboard

Ability to not install `ds:example` service

Open hahaxd35 opened this issue 4 years ago • 18 comments

Do you want to request a feature or report a bug? Bug What is the current behavior? remove /etc/nginx/includes/ds-example.conf an put this file maybe in /etc/onlyoffice/ or something simple but not in productive system... its the second time that the "NGINX" Webserver wont start because i have remove the "/etc/onlyoffice/nginx/includes/ds-example.conf" but not the symlink... after logrotate server dont start again after every update i have to remove this files over and over again.....

nginx: [emerg] open() "/etc/nginx/includes/ds-example.conf" failed (2: No such file or directory) in /etc/nginx/conf.d/ds.conf:63

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. remove the "example" conf from onlyoffice Dir and restart nginx

What is the expected behavior? let example be example -> ask if you to install "example" conf but mostly you don't want to install this configuration

Did this work in previous versions of DocumentServer? nope

Operating System: Debian 10.3

hahaxd35 avatar May 25 '20 08:05 hahaxd35

ds:example service is disabled by default So I don't think we'll remove it in future

Why you need to remove this config if it stopped by default?

ShockwaveNN avatar May 25 '20 09:05 ShockwaveNN

Oh sorry forget to say: OK

BUT: after upgrade the package create the symbolic Link again (but not the original file) and restart is not possible.

hahaxd35 avatar Jun 12 '20 09:06 hahaxd35

To be clear

  1. You remove /etc/nginx/includes/ds-example.conf
  2. After update it appear again

This is correct, since this is part of package

I still do not understand why do you need to remove this file - this service is disabled by default, just ignore it

ShockwaveNN avatar Jun 15 '20 08:06 ShockwaveNN

Don't know witch file was the symbolic link and original Nope.... the symbolic link appear again not that file

  1. I removed the original file -> now i dont wont remove it again
  2. after logrotate nginx wont start because -> file does exist
  3. removed the symbolic link -> nginx start again 3.1 after some time
  4. upgrading Onlyoffice
  5. after logrotate nginx wont start again -> file does not exist
  6. remove symbolic link again

The user who has done the upgrades says he has not removed any file after the upgrade.

hahaxd35 avatar Jun 15 '20 10:06 hahaxd35

I removed the original file

You still not answered my question - why to remove this file

ShockwaveNN avatar Jun 15 '20 11:06 ShockwaveNN

it called example and example was not needed.

Plank installation is allays better And ATM where i delete this file i don't now that's was disabled by default. Its easy to move to the Dirs -> autocomplete i also removed the part of /welcome in configuration for not necessary

we have users and there like "OOH i can see something" its a security issue or try to do something.

hahaxd35 avatar Jun 15 '20 13:06 hahaxd35

51M /var/www/onlyoffice/documentserver-example/ Its also a reason

we using small installations

hahaxd35 avatar Jun 15 '20 13:06 hahaxd35

Ok, I understand you now and agree, especially 51M

We'll discuss ability not to install test-example

ShockwaveNN avatar Jun 15 '20 14:06 ShockwaveNN

ds:example service is disabled by default So I don't think we'll remove it in future

Why you need to remove this config if it stopped by default?

@ShockwaveNN This is incorrect, it is by default, following the install-guide on the docs enabled and has to be disabled. And even if it were disabled, it messes up with the nginx config by having the link to the ds-example.conf in there. The welcome page is messed up by default that way and should not be showing an "example" index.html, at least not for an "enterprise-edition".

If you installed the Enterprise-Edition and have the same problem as I had - the welcome page was the example index.html, do the following steps to get rid of the silly example:

rm -rf /etc/onlyoffice/documentserver-example/  #Removes the whole unnessecary "example"
rm /etc/nginx/includes/ds-example.conf   #This will delete the link that stops nginx from starting with error like you mentioned
service nginx restart   #Should restart without problem
service supervisord restart  #As Example-Service is gone, it will re-register to only four active packets 
supervisorctl restart docservice   #Restart docservice and now you can see the green checkmark

Voila, the OnlyOffice-Server should show you now a green checkmark on the welcome page that everything is running correctly.

Hope this fixes your problem @hahaxd35 . @ShockwaveNN: It would be great to include these steps in the Installation documentation found here for the installing parts and close this ticket with the mentioned workaround.

CSchmidtDD avatar Feb 12 '21 10:02 CSchmidtDD

it is by default, following the install-guide on the docs enabled and has to be disabled

You mean this install guide? https://helpcenter.onlyoffice.com/de/installation/docs-enterprise-install-ubuntu.aspx

I don't see any lines enabling documentserver-example service in there

ShockwaveNN avatar Feb 12 '21 10:02 ShockwaveNN

it is by default, following the install-guide on the docs enabled and has to be disabled

You mean this install guide? https://helpcenter.onlyoffice.com/de/installation/docs-enterprise-install-ubuntu.aspx

I don't see any lines enabling documentserver-example service in there

I refer to any install guide except docker and windows. Does not matter if it is enabled or not, still it is messing with nginx, see my comment here:

And even if it were disabled, it messes up with the nginx config by having the link to the ds-example.conf in there. The welcome page is messed up by default that way and should not be showing an "example" index.html, at least not for an "enterprise-edition".

CSchmidtDD avatar Feb 12 '21 11:02 CSchmidtDD

@CSchmidtDD I've got a talk with our dev team and they said that this feature in implementing now As usual I cannot give any ETA, since there may be some unpredicted troubles

ShockwaveNN avatar Feb 12 '21 13:02 ShockwaveNN

@ShockwaveNN Thank you for taking your time to discuss this and to propose a way forward. For now, the mentioned workaround works after every install / update of the document server - but it's still a hassle.

Would be greatly appreciated if there were a better solution or the "dockserver-example" taken out of the equation or moved to another resource like /example/welcome so it will not mess with anything else.

CSchmidtDD avatar Feb 12 '21 14:02 CSchmidtDD

This "problem" is around 9 months old and still not removed.

SKB-CGN avatar Nov 18 '21 14:11 SKB-CGN

@CSchmidtDD

cat /etc/apt/apt.conf.d/100install.conf DPkg::Post-Invoke {"/opt/remove-oo-example.sh";};

cat /opt/remove-oo-example.sh #!/bin/bash

rm -r /var/www/onlyoffice/documentserver-example &> /dev/null rm -r /var/log/onlyoffice/documentserver-example &> /dev/null rm /etc/nginx/includes/ds-example.conf &> /dev/null rm /etc/supervisor/conf.d/ds-example.conf &> /dev/null rm -r /etc/onlyoffice/documentserver-example &> /dev/null exit 0

this removes "document-example" after update

hahaxd35 avatar Nov 18 '21 14:11 hahaxd35

cat ... [...] this removes "document-example" after update

Sorry, but in my earlier post I already had a working solution that we used for this. Yours is more sophsticated maybe, but my point was the forced installation and runtime of the example service, which is literally trash in a production environment.

@ShockwaveNN I would be happy to know the ETA, now that 9 months passed already (as it was in implementing at time of comment)?

CSchmidtDD avatar Nov 18 '21 14:11 CSchmidtDD

This "problem" is around 9 months old and still not removed.

I don't consider this is a "problem", since ds:example service is not started by default and there is several workarounds, for example, mentioned by @hahaxd35 (thank you for that) if you need to save space

(as it was in implementing at time of comment

It was implemented but new more important tasks were raised and it's still not implemented. What's why I didn't mention any ETA at first place

If you consider this problem is really important for you - feel free to contact [email protected] and discuss it

ShockwaveNN avatar Nov 18 '21 15:11 ShockwaveNN

I have a question,why do we need this commends?Onlyoffice doesn't recommend ds:example in production.So we need to start ds:example frist for test and disable it after in production.Can't onlyoffice use file config like traefik?It would be much understandable and easy to tweak.And is there any documents show me how to config it?

docker exec onlyoffice sudo supervisorctl start ds:example
docker exec onlyoffice sudo sed 's,autostart=false,autostart=true,' -i /etc/supervisor/conf.d/ds-example.conf

basicallynewbie avatar Jul 28 '22 09:07 basicallynewbie