Try the fastest and simplest way to install ONLYOFFICE

Sphinx Settings - Full Text Search deamon not running

Questions/problems on Docker

Sphinx Settings - Full Text Search deamon not running

Postby penzoiders » Tue Dec 01, 2015 11:21 pm

I'm running community server linked to a document server with docker, version 8.6.0.24
I'm using a clean ubuntu server 14.04 LTS and docker-engine from docker repo

I followed the istructions on how to link and run document and community server on https here http://helpcenter.onlyoffice.com/it/ser ... index.aspx

these are the docker commands I've set to start the containers
Code: Select all
docker run -i -t -d --name onlyoffice-document-server --restart=always onlyoffice/documentserver

docker run -i -t -d -p 80:80 -p 443:443 -p 5222:5222 --name onlyoffice-community-server --restart=always --link onlyoffice-document-server:document_server -v /opt/onlyoffice/Logs:/var/log/onlyoffice -v /opt/onlyoffice/Data:/var/www/onlyoffice/Data  -v /opt/onlyoffice/MySQL:/var/lib/mysql  onlyoffice/communityserver


I've fixed an external folder permission issue by entering the container and giving these commands (worked fine)
Code: Select all
docker attach onlyoffice-community-server
chown -R --reference /var/www/onlyoffice/Services /var/www/onlyoffice/Data
chmod -R --reference /var/www/onlyoffice/Services /var/www/onlyoffice/Data


everything works except for the full text search.

I've entered the container and the onlyofficeIndex service is up and running
Code: Select all
:/# service onlyofficeIndex status
onlyofficeIndex is running (pid 644)


sphinx is installed into the container and version is ok
Code: Select all
:/# dpkg -s sphinxsearch
Package: sphinxsearch
Status: install ok installed
Priority: optional
Section: misc
Installed-Size: 21557
Maintainer: Sphinx package builds <builds@sphinxsearch.com>
Architecture: amd64
Version: 2.2.9-release-0ubuntu12~trusty


everything is to default in the settings page for sphinx settings: "localhost" and "9306"

as I test I get an error that the service is not running (am I supposed to set some other port, container ip, open some firewall port or configure something into the container in order to make it work?)

thanks for the advice and for the great piece of software, really enjoying it so far.

Lorenzo
Attachments
Selezione_122.png
full text search deamon not running
Selezione_122.png (32.5 KiB) Viewed 3292 times
penzoiders
 
Posts: 7
Joined: Tue Dec 01, 2015 10:55 pm

Re: Sphinx Settings - Full Text Search deamon not running

Postby Dean » Wed Dec 02, 2015 8:44 am

Hello,

Could you please check the following folder on host to contain data:

/opt/onlyoffice/Data/Index

If there is no data, please perform:

Code: Select all
sudo chmod 777 /opt -R
Dean
 
Posts: 700
Joined: Tue Sep 30, 2014 11:04 am

Re: Sphinx Settings - Full Text Search deamon not running

Postby penzoiders » Wed Dec 02, 2015 9:25 am

Thanks Dean for the quick response,

there's data in there

from outside the container
Code: Select all
root@docs:~# ls -l /opt/onlyoffice/Data/Index/
total 0
drwxr-xr-x  8 landscape messagebus  79 Dec  1 14:51 community
drwxr-xr-x 10 landscape messagebus 103 Dec  1 14:51 crm
drwxr-xr-x  4 landscape messagebus  30 Dec  1 14:51 files
drwxr-xr-x  4 landscape messagebus  32 Dec  1 14:51 mail
drwxr-xr-x  7 landscape messagebus  80 Dec  1 14:51 projects


from inside the container
Code: Select all
root@docs:~# docker attach onlyoffice-community-server
root@469b131337f2:/# ls -l /var/www/onlyoffice/Data/Index/
total 0
drwxr-xr-x  8 onlyoffice onlyoffice  79 Dec  1 14:51 community
drwxr-xr-x 10 onlyoffice onlyoffice 103 Dec  1 14:51 crm
drwxr-xr-x  4 onlyoffice onlyoffice  30 Dec  1 14:51 files
drwxr-xr-x  4 onlyoffice onlyoffice  32 Dec  1 14:51 mail
drwxr-xr-x  7 onlyoffice onlyoffice  80 Dec  1 14:51 projects


and seems to be effectively written
Code: Select all
root@469b131337f2:/# ls -l /var/www/onlyoffice/Data/Index/files/file/
total 56
-rw-r--r-- 1 onlyoffice onlyoffice  84 Dec  2 09:15 delta.new.spa
-rw-r--r-- 1 onlyoffice onlyoffice  79 Dec  2 09:15 delta.new.spd
-rw-r--r-- 1 onlyoffice onlyoffice   1 Dec  2 09:15 delta.new.spe
-rw-r--r-- 1 onlyoffice onlyoffice 354 Dec  2 09:15 delta.new.sph
-rw-r--r-- 1 onlyoffice onlyoffice 665 Dec  2 09:15 delta.new.spi
-rw-r--r-- 1 onlyoffice onlyoffice   0 Dec  2 09:15 delta.new.spk
-rw-r--r-- 1 onlyoffice onlyoffice   0 Dec  2 09:15 delta.new.spm
-rw-r--r-- 1 onlyoffice onlyoffice   1 Dec  2 09:15 delta.new.spp
-rw-r--r-- 1 onlyoffice onlyoffice   1 Dec  2 09:15 delta.new.sps
-rw-r--r-- 1 onlyoffice onlyoffice   0 Dec  1 14:51 main.new.spa
-rw-r--r-- 1 onlyoffice onlyoffice   1 Dec  1 14:51 main.new.spd
-rw-r--r-- 1 onlyoffice onlyoffice   1 Dec  1 14:51 main.new.spe
-rw-r--r-- 1 onlyoffice onlyoffice 354 Dec  1 14:51 main.new.sph
-rw-r--r-- 1 onlyoffice onlyoffice   1 Dec  1 14:51 main.new.spi
-rw-r--r-- 1 onlyoffice onlyoffice   0 Dec  1 14:51 main.new.spk
-rw-r--r-- 1 onlyoffice onlyoffice   0 Dec  1 14:51 main.new.spm
-rw-r--r-- 1 onlyoffice onlyoffice   1 Dec  1 14:51 main.new.spp
-rw-r--r-- 1 onlyoffice onlyoffice   1 Dec  1 14:51 main.new.sps
-rw-r--r-- 1 onlyoffice onlyoffice   1 Dec  1 14:51 main.tmp.tmps


any clues?

should I really use chmod 777 -R on all opt?
or is there anything else I should seek for?
penzoiders
 
Posts: 7
Joined: Tue Dec 01, 2015 10:55 pm

Re: Sphinx Settings - Full Text Search deamon not running

Postby penzoiders » Wed Dec 02, 2015 1:17 pm

I had a test and on a brand new and empty /opt/onlyoffice folder I tried to give 777
I've restarted the container and it worked. (did not work by chmodding 777 a populated /opt folder.. worked only by starting from scratch)

anyway I'm not too keen in putting in production my data folder with 777 permissions.
can someone share the correct chmod for all the data folders?

I'll try now another run by giving the uid and gid of user and group onlyoffice to the external /opt folder to see if default permissions work whitout chmodding it badly.
any advice is welcome.
penzoiders
 
Posts: 7
Joined: Tue Dec 01, 2015 10:55 pm

Re: Sphinx Settings - Full Text Search deamon not running

Postby Dean » Wed Dec 02, 2015 1:57 pm

It can be enough to be 755, but let me ask you, what was the purpose of performing that commands:

Code: Select all
docker attach onlyoffice-community-server
chown -R --reference /var/www/onlyoffice/Services /var/www/onlyoffice/Data
chmod -R --reference /var/www/onlyoffice/Services /var/www/onlyoffice/Data


The access rights inside the container should be:

Code: Select all
drwxr-xr-x  7 onlyoffice onlyoffice 4096 Dec  2 10:57 Services
drwxrwxrwx  7 root       root       4096 Dec  2 10:28 Data


So please give 755 to the /opt and re-create the Community Server container with the default access rights.
Dean
 
Posts: 700
Joined: Tue Sep 30, 2014 11:04 am

Re: Sphinx Settings - Full Text Search deamon not running

Postby penzoiders » Wed Dec 02, 2015 8:02 pm

Hi Dean
Dean wrote:It can be enough to be 755, but let me ask you, what was the purpose of performing that commands:

Code: Select all
docker attach onlyoffice-community-server
chown -R --reference /var/www/onlyoffice/Services /var/www/onlyoffice/Data
chmod -R --reference /var/www/onlyoffice/Services /var/www/onlyoffice/Data


This was because I had an error while creating new documents (and aswell I had no sample docs when running the container the first time

The access rights inside the container should be:

Code: Select all
drwxr-xr-x  7 onlyoffice onlyoffice 4096 Dec  2 10:57 Services
drwxrwxrwx  7 root       root       4096 Dec  2 10:28 Data


So please give 755 to the /opt and re-create the Community Server container with the default access rights.

by giving 755 to the /opt folder I get this
Code: Select all
drwxr-xr-x  7 onlyoffice onlyoffice 4096 Dec  2 18:57 Services
drwxr-xr-x   7 root       root       4096 Dec  2 18:28 Data

so it is different than yours (your data folder there shows 777.. so it's really supposed to be so in production?
in this mode on the start of the container there where no sample docs on the docuents tab and the sphinx-settings test gave negative result.

I've found a thing by the way.
on the ubuntu host I removed completely the /opt/onlyoffice folder then created again and chowned with the same UID and GID that is in the container for the onlyoffice user and group:
Code: Select all
mkdir /opt/onlyoffice
chown -R 103:106 /opt/onlyoffice

then started the container again and everything worked fine without chmodding -R 777 (that's actually something that makes me shivering every time I hear) and left the default 755

on the first run everything worked fine, in setting - sphinx-setting the full text search deamon was showing as running when I pressed "test", but the search tool was not actually giving any result even in searching the title of a test document.

then after a while (eg: creating a document or saving some portal customization settings) it stopped working (the sphinx-test was showing negative results again) tried to restart the container but no luck.

re-tried everything with 777 permissions but same results.

to double check I stopped and removed the container and re-run but nothing changed.

is there anything I can look at into the logs or by attaching to the container?

thanks again for support

NOTE: test done with firewall off on the host (ufw disable)
penzoiders
 
Posts: 7
Joined: Tue Dec 01, 2015 10:55 pm

Re: Sphinx Settings - Full Text Search deamon not running

Postby penzoiders » Wed Dec 02, 2015 9:47 pm

I've tested the container itself. without the external data directory.
and the full text search is not working either.

Code: Select all
docker run -i -t -d --name onlyoffice-document-server --restart=always onlyoffice/documentserver
docker run -i -t -d -p 80:80 --name onlyoffice-community-server --restart=always --link onlyoffice-document-server:document_server   onlyoffice/communityserver


or better.. it works in the first minutes when the container is started then the test stops and the search tool does not find anything.

by restarting the container or the whole host (eg: for a kernel update, a simulation I often do while testing a software), you end up with the full text search not working.

which are the log files to inspect ? anyone else can reproduce this behavior?

anyway after analyzing the default container permissions the best way to set owner and group for the external folder seem to be
Code: Select all
chown -R 103:106 /opt/onlyoffice

in this way the permissions when linking the external folder to the container are completely the same that the default data directories in the container.
am I wrong?
penzoiders
 
Posts: 7
Joined: Tue Dec 01, 2015 10:55 pm

Re: Sphinx Settings - Full Text Search deamon not running

Postby Dean » Thu Dec 03, 2015 1:15 pm

OK, let's start from the very beginning.

1) Stop onlyofficeIndex. Stop processes: searchd, indexer.
2) Clean the folder /var/www/onlyoffice/Data/Index
3) Clear table in the db: webstudio_index
4) Start onlyofficeIndex

In fact, it shall re-launch the Indexation service. Contact us and inform of the results, please.
Dean
 
Posts: 700
Joined: Tue Sep 30, 2014 11:04 am

Re: Sphinx Settings - Full Text Search deamon not running

Postby penzoiders » Mon Dec 14, 2015 4:57 pm

Sorry for replying this late:

I've restored to a clean state the community-server container and data folders
Code: Select all
docker stop onlyoffice-community-server
docker rm onlyoffice-community-server

rm -rf /opt/onlyoffice

mkdir -p /opt/onlyoffice/Data/certs
cp /opt/onlyoffice_BAK/Data/certs/* /opt/onlyoffice/Data/certs

chown -R 103:106 /opt/onlyoffice
chmod -R 755 /opt/onlyoffice
chmod 600 /opt/onlyoffice/Data/certs/onlyoffice.key
chmod 600 /opt/onlyoffice/Data/certs/dhparam.pem


started a new one
Code: Select all
docker run -i -t -d -p 80:80 -p 443:443 -p 5222:5222 --name onlyoffice-community-server --restart=always --link onlyoffice-document-server:document_server -v /opt/onlyoffice/Logs:/var/log/onlyoffice -v /opt/onlyoffice/Data:/var/www/onlyoffice/Data  -v /opt/onlyoffice/MySQL:/var/lib/mysql  onlyoffice/communityserver


stated that the sphinx test won't work
Image

attached to the container and did what Dean suggested:
Code: Select all
docker attach onlyoffice-community-server
service onlyofficeIndex stop
service onlyofficeIndex status
rm -rf /var/www/onlyoffice/Data/Index/*
mysql -u root
mysql> use onlyoffice;
mysql> Truncate table webstudio_index;
mysql> quit
service onlyofficeIndex start
service onlyofficeIndex status


then stated again that shpinx test gives "Full text search service is not running"
checked the folder and the table Dean has suggested:

folder is populated:
Code: Select all
root@1d42e2c0aa6a:/# ls -l /var/www/onlyoffice/Data/Index/
total 0
drwxr-xr-x  8 onlyoffice onlyoffice  79 Dec 14 16:25 community
drwxr-xr-x 10 onlyoffice onlyoffice 103 Dec 14 16:25 crm
drwxr-xr-x  4 onlyoffice onlyoffice  30 Dec 14 16:25 files
drwxr-xr-x  4 onlyoffice onlyoffice  32 Dec 14 16:25 mail
drwxr-xr-x  7 onlyoffice onlyoffice  80 Dec 14 16:25 projects


table is empty:
Code: Select all
mysql> use onlyoffice;
Database changed
mysql> select * from webstudio_index;
Empty set (0.00 sec)


should I update something inside of the docker container somehow after running it first time?
Dean, do you want an access to it so you can sneak-a-peek.. maybe can be useful for you guys to test this behaviour. I can give you a test VM with root access of course.

thanks for support.
cheers
penzoiders
 
Posts: 7
Joined: Tue Dec 01, 2015 10:55 pm

Re: Sphinx Settings - Full Text Search deamon not running

Postby Dean » Tue Dec 15, 2015 5:37 am

We've just detected the bug with a new Sphinx version 2.10 and shall fix it in the future release. Sorry for the inconvenience.
Dean
 
Posts: 700
Joined: Tue Sep 30, 2014 11:04 am

Next

Return to Docker Version

Who is online

Users browsing this forum: No registered users and 1 guest