HowTo: Install Onlineoffice on Ubuntu/Debian (No Docker No Limitation)


#61

thats why my first point was,
Is it possible to reduce size of integration?


#62

You can delete /opt/libreoffice/workdir. it’s 7GB.
I added it to script.


#63

Can we get a “Barney and Friends” tutorial for this? For those of us who don’t know how to run the script?


#64

@husisusi
@Nemskiller

what is the installation size?
will it fit on pi’s with 8.5 gb left,

thanks


#65

No, you need >15 GB. Ark74 told you “remember Google is your friend”.


#66

#67

Been there, tried that. There’s a typo at the end:

systemctl status loolwsdy

should be

systemctl status loolwsd

instead.

Nevertheless, service loolwsd fails to start - here’s the output of sudo systemctl status loolwsd:

● loolwsd.service - LibreOffice On-Line WebSocket Daemon
   Loaded: loaded (/lib/systemd/system/loolwsd.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since So 2017-03-05 12:10:47 CET; 37min ago
 Main PID: 20652 (code=exited, status=203/EXEC)
Mär 05 12:10:47 cardhu systemd[1]: Started LibreOffice On-Line WebSocket Daemon.
Mär 05 12:10:47 cardhu systemd[20652]: loolwsd.service: Failed at step EXEC spawning /opt/online/loolwsd: No such file or directory
Mär 05 12:10:47 cardhu systemd[1]: loolwsd.service: Main process exited, code=exited, status=203/EXEC
Mär 05 12:10:47 cardhu systemd[1]: loolwsd.service: Unit entered failed state.
Mär 05 12:10:47 cardhu systemd[1]: loolwsd.service: Failed with result 'exit-code'.

ls -l /opt/online/:

insgesamt 940
-rw-r--r-- 1 lool lool  49853 Mär  5 12:42 aclocal.m4
-rw-r--r-- 1 lool lool      0 Mär  5 12:42 AUTHORS
-rwxr-xr-x 1 lool lool    440 Mär  5 12:42 autogen.sh
drwxr-xr-x 1 lool lool    112 Mär  5 12:42 autom4te.cache
drwxr-xr-x 1 lool lool     14 Mär  5 12:35 bundled
-rw-r--r-- 1 lool lool     27 Mär  5 12:42 ChangeLog
drwxr-xr-x 1 lool lool    574 Mär  5 12:42 common
lrwxrwxrwx 1 lool lool     32 Mär  5 12:35 compile -> /usr/share/automake-1.14/compile
lrwxrwxrwx 1 lool lool     37 Mär  5 12:35 config.guess -> /usr/share/automake-1.14/config.guess
-rw-r--r-- 1 lool lool   2354 Mär  5 12:35 config.h.in
-rw-r--r-- 1 lool lool  38660 Mär  5 12:42 config.log
lrwxrwxrwx 1 lool lool     35 Mär  5 12:35 config.sub -> /usr/share/automake-1.14/config.sub
-rwxr-xr-x 1 lool lool 597153 Mär  5 12:42 configure
-rw-r--r-- 1 lool lool  11544 Mär  5 12:42 configure.ac
-rw-r--r-- 1 lool lool    240 Mär  5 12:42 COPYING
drwxr-xr-x 1 lool lool    174 Mär  5 12:42 debian
lrwxrwxrwx 1 lool lool     32 Mär  5 12:35 depcomp -> /usr/share/automake-1.14/depcomp
-rw-r--r-- 1 lool lool  10718 Mär  5 12:42 discovery.xml
drwxr-xr-x 1 lool lool     76 Mär  5 12:42 etc
-rw-r--r-- 1 lool lool   1150 Mär  5 12:42 favicon.ico
-rw-r--r-- 1 lool lool     35 Mär  5 12:42 INSTALL
lrwxrwxrwx 1 lool lool     35 Mär  5 12:35 install-sh -> /usr/share/automake-1.14/install-sh
drwxr-xr-x 1 lool lool    230 Mär  5 12:42 kit
drwxr-xr-x 1 lool lool    592 Mär  5 12:42 loleaflet
-rwxr-xr-x 1 lool lool   2635 Mär  5 12:42 loolstat
-rw-r--r-- 1 lool lool    426 Mär  5 12:42 loolwsd.service
-rw-r--r-- 1 lool lool   7791 Mär  5 12:42 loolwsd.spec.in
-rwxr-xr-x 1 lool lool   2612 Mär  5 12:42 loolwsd-systemplate-setup
-rw-r--r-- 1 lool lool   6422 Mär  5 12:42 loolwsd.xml.in
lrwxrwxrwx 1 lool lool     35 Mär  5 12:35 ltmain.sh -> /usr/share/libtool/config/ltmain.sh
drwxr-xr-x 1 lool lool    116 Mär  5 12:35 m4
-rw-r--r-- 1 lool lool   8178 Mär  5 12:42 Makefile.am
-rw-r--r-- 1 lool lool 121428 Mär  5 12:42 Makefile.in
-rw-r--r-- 1 lool lool    437 Mär  5 12:42 maketarballfordeb.sh.in
lrwxrwxrwx 1 lool lool     32 Mär  5 12:35 missing -> /usr/share/automake-1.14/missing
-rw-r--r-- 1 lool lool     22 Mär  5 12:42 NEWS
-rw-r--r-- 1 lool lool   2552 Mär  5 12:42 PROBLEMS
-rw-r--r-- 1 lool lool    375 Mär  5 12:42 README
-rw-r--r-- 1 lool lool     26 Mär  5 12:42 robots.txt
drwxr-xr-x 1 lool lool    146 Mär  5 12:42 scripts
-rw-r--r-- 1 lool lool    160 Mär  5 12:42 sysconfig.loolwsd
drwxr-xr-x 1 lool lool    700 Mär  5 12:42 test
lrwxrwxrwx 1 lool lool     36 Mär  5 12:35 test-driver -> /usr/share/automake-1.14/test-driver
-rw-r--r-- 1 lool lool   1019 Mär  5 12:42 TODO
drwxr-xr-x 1 lool lool    136 Mär  5 12:42 tools
drwxr-xr-x 1 lool lool    814 Mär  5 12:42 wsd

No dangling symlinks here, but there’s no binary ‘loolwsd’ either.

Debian Jessie (up-to-date), nginx and PHP7.0 from dotdeb.org


#68

I can’t say for sure what the problem is but it looks like make run hasn’t been issued properly, because that should create a systemplate and jails folder etc. and there’s not a loolforkit executable in your directory either. You could try cd /opt/online && sudo make run or else I don’t really know.

Also, I have only tested the script on Debian Testing, not Jessie, which means that some builds might fail without you getting prompted about it because I ran some builds with -i (ignore errors flag).


#69

OK, that’s the problem I’d say. Building with the original script right now. ETA unknown :wink:


#70

ich hoffe Du hast dein “opt” Ordner vorher aufgeräumt.


#71

Aber klar :slight_smile:

EDIT:
ps aux | grep lool:

lool     36191  0.1  0.2 293632 14220 ?        Ssl  08:25   0:00 /opt/online/loolwsd --o:sys_template_path=/opt/online/systemplate --o:lo_template_path=/opt/libreoffice/instdir --o:child_root_path=/opt/online/jails --o:storage.filesystem[@allow]=true --o:admin_console.username=CHANGED --o:admin_console.password=CHANGED
lool     36202  5.0  3.0 1150632 187680 ?      Sl   08:25   0:00 /opt/online/loolforkit --losubpath=lo --systemplate=/opt/online/systemplate --lotemplate=/opt/libreoffice/instdir --childroot=/opt/online/jails/ --clientport=9980 --masterport=9981

By the looks it seems to work - but nginx won’t get the connection, gives me an error “502 Bad Gateway”. Opening an office file within NC returns “Access denied” in NC UI.

Config for office host is copy-pasted from official collabora docs. loolwsd.xml has
<host desc="Regex pattern of hostname to allow or deny." allow="true">cloud\.domain\.tld</host>
configured correctly, user lool is a member of group ssl-cert (to allow for access to letsencrypt certificates)

Looking at syslog I notice that forking the primary process fails repeatedly.

Mar  6 08:42:53 cardhu systemd[1]: Started LibreOffice On-Line WebSocket Daemon.
Mar  6 08:42:53 cardhu loolwsd[40298]: Full log is available in: /tmp/loolwsd.log
Mar  6 08:42:53 cardhu loolwsd[40298]: Launch this in your browser:
Mar  6 08:42:53 cardhu loolwsd[40298]:     https://localhost:9980/loleaflet/1b5594f/loleaflet.html?file_path=file:///opt/online/test/data/hello-world.odt
Mar  6 08:42:53 cardhu loolwsd[40298]: Or for the Admin Console:
Mar  6 08:42:53 cardhu loolwsd[40298]:     https://admin:CHANGED@localhost:9980/loleaflet/dist/admin/admin.html
Mar  6 08:43:23 cardhu loolwsd[40298]: Failed to fork child processes.
Mar  6 08:43:23 cardhu systemd[1]: loolwsd.service: Main process exited, code=exited, status=70/n/a
Mar  6 08:43:23 cardhu systemd[1]: loolwsd.service: Unit entered failed state.
Mar  6 08:43:23 cardhu systemd[1]: loolwsd.service: Failed with result 'exit-code'.
Mar  6 08:43:23 cardhu systemd[1]: loolwsd.service: Service hold-off time over, scheduling restart.
Mar  6 08:43:23 cardhu systemd[1]: Stopped LibreOffice On-Line WebSocket Daemon.
Mar  6 08:43:23 cardhu systemd[1]: Started LibreOffice On-Line WebSocket Daemon.
Mar  6 08:43:23 cardhu loolwsd[40431]: Full log is available in: /tmp/loolwsd.log
Mar  6 08:43:23 cardhu loolwsd[40431]: Launch this in your browser:
Mar  6 08:43:23 cardhu loolwsd[40431]:     https://localhost:9980/loleaflet/1b5594f/loleaflet.html?file_path=file:///opt/online/test/data/hello-world.odt
Mar  6 08:43:23 cardhu loolwsd[40431]: Or for the Admin Console:
Mar  6 08:43:23 cardhu loolwsd[40431]:     https://admin:CHANGED@localhost:9980/loleaflet/dist/admin/admin.html

Strangely /tmp.loolwsd.log won’t get extra entries after a restart, neither manual nor afters the syslog errors cited above. Here’s its content:

frk-41424-41424 07:47:55.614080 [ loolforkit ] INF  Initializing frk. Local time: Mon 2017-03-06 08:47:55+0100. Log level is [8].| common/Log.cpp:171
frk-41424-41424 07:47:55.614172 [ loolforkit ] INF  Have capability cap_sys_chroot| kit/ForKit.cpp:163
frk-41424-41424 07:47:55.614192 [ loolforkit ] INF  Have capability cap_mknod| kit/ForKit.cpp:163
frk-41424-41424 07:47:55.614206 [ loolforkit ] INF  Have capability cap_fowner| kit/ForKit.cpp:163
frk-41424-41424 07:47:55.614233 [ loolforkit ] TRC  dlopen(/opt/libreoffice/instdir/program/libsofficeapp.so, RTLD_GLOBAL|RTLD_NOW)| kit/Kit.cpp:1903
frk-41424-41424 07:47:55.750182 [ loolforkit ] TRC  lok_preinit(/opt/libreoffice/instdir/program", "file:///user")| kit/Kit.cpp:1932
frk-41424-41424 07:47:56.414497 [ loolforkit ] INF  Preinit stage OK.| kit/ForKit.cpp:453
frk-41424-41424 07:47:56.414540 [ loolforkit ] DBG  Forking a loolkit process.| kit/ForKit.cpp:224
frk-41424-41424 07:47:56.416344 [ loolforkit ] INF  Forked kit [41429].| kit/ForKit.cpp:265
frk-41424-41424 07:47:56.416418 [ loolforkit ] INF  ForKit process is ready.| kit/ForKit.cpp:465
kit-41429-41429 07:47:56.416667 [ loolkit ] INF  Initializing kit. Local time: Mon 2017-03-06 08:47:56+0100. Log level is [8].| common/Log.cpp:171
kit-41429-41429 07:47:56.416747 [ loolkit ] DBG  Process started.| kit/Kit.cpp:1586
kit-41429-41429 07:47:56.416800 [ loolkit ] INF  Jail path: /opt/online/jails/41429/| kit/Kit.cpp:1600
kit-41429-41429 07:47:56.416977 [ loolkit ] ERR  Poco Exception: Access to file denied: /opt/online/jails/41429| kit/Kit.cpp:1861
kit-41429-41429 07:47:56.416996 [ loolkit ] INF  Process finished.| kit/Kit.cpp:1870
frk-41424-41424 07:47:56.916993 [ loolforkit ] INF  Child 41429 has exited, removing its jail '/opt/online/jails/41429'.| kit/ForKit.cpp:201

/opt/online/jails/ is empty.
What’s the problem here?

Debian Jessie, compile ran overnight in screen session, ended with the dialog screen.


#72

The domain should be without \

my.ncserver.com

Save and reload


#73

lsof -i :9980
Your output?


#74

nothing returned

Seems like poco fails because of a permission problem:

kit-46668-46668 13:59:41.766888 [ loolkit ] INF  Jail path: /opt/online/jails/46668/| kit/Kit.cpp:1600
kit-46668-46668 13:59:41.767072 [ loolkit ] ERR  Poco Exception: Access to file denied: /opt/online/jails/46668| kit/Kit.cpp:1861

Chowning /opt/online/jails to user lool makes lsof -i :9980 return this:

loolwsd 48099 lool 9u IPv4 10902441 0t0 TCP *:9980 (LISTEN)

But now I get that “lovely” error

Well, this is embarrassing, we cannot connect to your document. Please try again.

Had that problem with collabora/docker, too :-/ Maybe I’ll figure it out after all…


#75

You didn’t run the script until the end. Right?
Dialog screen is not the last script todo. Mann muss es lesen. :smiley:


#76

Which script are you talking about? Your script from github? I ran that to install.
Solution to stop loolwsd from failing to start was to chown that dir :smiley:


#77

I need help to make “Barney and Friends” tutorial.


Prerequisites, Installation, … …


#78

So if you are using CentOS X, it would appear you are on your own for the entire NextCloud project. I simply do not understand this. I had to fix short URL’s with hours of work and troubleshooting. I look at your script and there are a great many things I cannot port to CentOS directly. Maybe I should start a poll or thread asking for other users running CentOS to band together to jump all of these hurdles.

For the love of God, why do so many people want to run Ubuntu???


#79

Maybe because Ubuntu is less conservative than CentOS and Ubuntu has a lot of free tutorial and online communities ready to help.


#80

Yes it’s too bad for CentOS.
It was my first distrib as server.

Now i’m working with mint, suse, debian, ubuntu and fedora.

CentOS disappeared of my informatic life for the moment.