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

Empty!?!? :hushed:

I run the sript in linux mint 18.1. How do I uninstall? (I am completely new with linux :sweat:

hallo husisusi et al,

thanks a lot for the script. iā€™m sorry but it didnā€™t work for me although i started with a fresh ubuntu 16.04.

i think that libreoffice might not be compiled the right way. but iā€™m not used in compiling. maybe someone can help me.

lets start from the end: loolwsd.log is

frk-21201-21201 10:25:16.735216 [ loolforkit ] INF  Initializing frk. Local time: Mon 2017-03-13 11:25:16+0100. Log level is [8].| common/Log.cpp:171
frk-21201-21201 10:25:16.735254 [ loolforkit ] INF  Have capability cap_sys_chroot| kit/ForKit.cpp:163
frk-21201-21201 10:25:16.735261 [ loolforkit ] INF  Have capability cap_mknod| kit/ForKit.cpp:163
frk-21201-21201 10:25:16.735265 [ loolforkit ] INF  Have capability cap_fowner| kit/ForKit.cpp:163
frk-21201-21201 10:25:16.735275 [ loolforkit ] FTL  Neither /opt/libreoffice/instdir/program/libsofficeapp.so or /opt/libreoffice/instdir/program/libmergedlo.so exist.| kit/Kit.cpp:1914
wsd-21190-21190 10:25:16.725838 [ loolwsd ] INF  Initializing wsd. Local time: Mon 2017-03-13 11:25:16+0100. Log level is [8].| common/Log.cpp:171
wsd-21190-21190 10:25:16.725892 [ loolwsd ] INF  SSL support: SSL is enabled.| wsd/LOOLWSD.cpp:1908
wsd-21190-21190 10:25:16.725953 [ loolwsd ] INF  Maximum concurrent open Documents limit: 300| wsd/LOOLWSD.cpp:1946
wsd-21190-21190 10:25:16.725957 [ loolwsd ] INF  Maximum concurrent client Connections limit: 600| wsd/LOOLWSD.cpp:1947
wsd-21190-21190 10:25:16.726039 [ loolwsd ] INF  Command trace dumping enabled to file: /tmp/looltrace-%.gz| wsd/LOOLWSD.cpp:1974
wsd-21190-21190 10:25:16.726061 [ loolwsd ] INF  Adding trusted WOPI host: [localhost].| wsd/Storage.cpp:85
wsd-21190-21190 10:25:16.726073 [ loolwsd ] INF  Adding trusted WOPI host: [10\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}].| wsd/Storage.cpp:85
wsd-21190-21190 10:25:16.726082 [ loolwsd ] INF  Adding trusted WOPI host: [172\.1[6789]\.[0-9]{1,3}\.[0-9]{1,3}].| wsd/Storage.cpp:85
wsd-21190-21190 10:25:16.726090 [ loolwsd ] INF  Adding trusted WOPI host: [172\.2[0-9]\.[0-9]{1,3}\.[0-9]{1,3}].| wsd/Storage.cpp:85
wsd-21190-21190 10:25:16.726098 [ loolwsd ] INF  Adding trusted WOPI host: [172\.3[01]\.[0-9]{1,3}\.[0-9]{1,3}].| wsd/Storage.cpp:85
wsd-21190-21190 10:25:16.726106 [ loolwsd ] INF  Adding trusted WOPI host: [192\.168\.[0-9]{1,3}\.[0-9]{1,3}].| wsd/Storage.cpp:85
wsd-21190-21190 10:25:16.726114 [ loolwsd ] INF  Adding blocked WOPI host: [192\.168\.1\.1].| wsd/Storage.cpp:90
wsd-21190-21190 10:25:16.726223 [ loolwsd ] INF  SSL Cert file: /etc/loolwsd/cert.pem| wsd/LOOLWSD.cpp:2000
wsd-21190-21190 10:25:16.726240 [ loolwsd ] INF  SSL Key file: /etc/loolwsd/key.pem| wsd/LOOLWSD.cpp:2003
wsd-21190-21190 10:25:16.726249 [ loolwsd ] INF  SSL CA file: /etc/loolwsd/ca-chain.cert.pem| wsd/LOOLWSD.cpp:2006
wsd-21190-21190 10:25:16.728055 [ loolwsd ] DBG  FileServerRoot: /opt/online/| wsd/LOOLWSD.cpp:2421
wsd-21190-21190 10:25:16.728746 [ loolwsd ] INF  Starting prisoner server listening on 9981| wsd/LOOLWSD.cpp:2468
wsd-21190-21190 10:25:16.728766 [ loolwsd ] INF  Creating new forkit process.| wsd/LOOLWSD.cpp:2290
wsd-21190-21190 10:25:16.728788 [ loolwsd ] INF  AdminModel ctor.| wsd/AdminModel.hpp:143
wsd-21190-21190 10:25:16.728821 [ loolwsd ] INF  Admin ctor.| wsd/Admin.cpp:290
wsd-21190-21190 10:25:16.729238 [ loolwsd ] TRC  Total memory used: 10225| wsd/Admin.cpp:294
wsd-21190-21190 10:25:16.729247 [ loolwsd ] DBG  Memory stat ctor| wsd/Admin.hpp:127
wsd-21190-21190 10:25:16.729278 [ loolwsd ] DBG  Cpu stat ctor| wsd/Admin.hpp:150
wsd-21190-21190 10:25:16.729286 [ loolwsd ] INF  Launching forkit process: /opt/online/loolforkit --losubpath=lo --systemplate=/opt/online/systemplate --lotemplate=/opt/libreoffice/instdir --childroot=/opt/online/jails/ --clientport=9980 --masterport=9981| wsd/LOOLWSD.cpp:2334
wsd-21190-21190 10:25:16.729464 [ loolwsd ] INF  Forkit process launched: 21201| wsd/LOOLWSD.cpp:2345
wsd-21190-21190 10:25:16.729478 [ loolwsd ] TRC  Waiting for a new child for a max of 15000 ms.| wsd/LOOLWSD.cpp:443
wsd-21190-21199 10:25:21.731619 [ loolwsd ] TRC  Total memory used: 10241| wsd/Admin.cpp:338
wsd-21190-21199 10:25:26.732325 [ loolwsd ] TRC  Total memory used: 10244| wsd/Admin.cpp:338
wsd-21190-21190 10:25:31.729675 [ loolwsd ] WRN  ForKit not responsive for 15000 ms forking 1 children. Resetting.| wsd/LOOLWSD.cpp:406
wsd-21190-21190 10:25:31.729744 [ loolwsd ] DBG  prespawnChildren: Have 0 spare children, and 0 outstanding, forking 1 more.| wsd/LOOLWSD.cpp:418
wsd-21190-21190 10:25:31.729793 [ loolwsd ] DBG  MasterToForKit: spawn 1| wsd/LOOLWSD.cpp:351
wsd-21190-21190 10:25:31.729809 [ loolwsd ] TRC  Writing to pipe. Data: [spawn 1].| common/IoUtil.cpp:211
wsd-21190-21190 10:25:31.729863 [ loolwsd ] ERR  Failed to write to pipe. Data: [spawn 1
]. (errno: DatenĆ¼bergabe unterbrochen (broken pipe))| common/IoUtil.cpp:220
wsd-21190-21190 10:25:31.730215 [ loolwsd ] ERR  No forkit pipe while rebalancing children.| wsd/LOOLWSD.cpp:360
wsd-21190-21190 10:25:31.730238 [ loolwsd ] TRC  Waiting for a new child for a max of 15000 ms.| wsd/LOOLWSD.cpp:450
wsd-21190-21199 10:25:31.734479 [ loolwsd ] TRC  Total memory used: 10302| wsd/Admin.cpp:338
wsd-21190-21190 10:25:46.730523 [ loolwsd ] FTL  Failed to fork child processes.| wsd/LOOLWSD.cpp:454
wsd-21190-21199 10:25:46.739607 [ loolwsd ] TRC  Total memory used: 10444| wsd/Admin.cpp:338
wsd-21190-21190 10:25:46.775361 [ loolwsd ] INF  ~Admin dtor.| wsd/Admin.cpp:306
wsd-21190-21200 10:25:46.775533 [ loolwsd ] DBG  Cpu stat dtor| wsd/Admin.hpp:155
wsd-21190-21199 10:25:46.775803 [ loolwsd ] DBG  Memory stat dtor| wsd/Admin.hpp:132
wsd-21190-21190 10:25:46.775910 [ loolwsd ] INF  AdminModel dtor.| wsd/AdminModel.hpp:148
  • so loolwsd is listening on port 9981, nothing happens on port 9980
  • its true that ā€œNeither /opt/libreoffice/instdir/program/libsofficeapp.so or /opt/libreoffice/instdir/program/libmergedlo.so existā€!

after ā€œRunning LibreOffice build configuration.ā€

i get

"JAVA_HOME was not explicitly informed with --with-jdk-home. the configure script attempted to find JAVA_HOME automatically, but apparently it failed in case JAVA_HOME is incorrectly set, some projects with not be built correctly"

even then, when JAVA_HOME is set by hand before running the script.

later

/opt/libreoffice/bean/Library_officebean.mk:12: die Regel fĆ¼r Ziel ā€ž/opt/libreoffice/instdir/program/libofficebean.soā€œ scheiterte
Makefile:263: die Regel fĆ¼r Ziel ā€žbuildā€œ scheiterte

and at the end of the script, short after ā€œloolwsd is running. Enjoy!!!ā€ i got

ā€œMakefile:1976: die Regel fĆ¼r Ziel ā€žrunā€œ scheiterteā€

after trying a lot iā€™ve no idea what to do now.

thanks for you patience, tmb

Your disk size? what you get if you run "sudo apt-get build-dep libreoffice -y"
go in /opt/libreoffice and run ā€œmake checkā€ as lool user

With my first try i got Loolwsd on 9981 with a non usable software, because i add a argument in the script.
So i deleted all and restart with the original script and then it work !

hi husisusi,
disk size is 2 TB. ā€œsudo apt-get build-dep libreoffice -yā€ ā†’ was installed without a problem.

ā€œsudo -H -u lool make checkā€ shows that jawt is not found in usr/bin.

mkdir -p /opt/libreoffice/instdir
/opt/libreoffice/solenv/bin/install-gdb-printers -a /opt/libreoffice/instdir -c
make -j 8  -rs -f /opt/libreoffice/Makefile.gbuild all  subsequentcheck check
[build CXX] sal/textenc/context.cxx
...
[build GPF] CustomTarget/oox/generated/tokenhash.inc
[build UPK] expat-2.2.0.tar.bz2
/usr/bin/ld: cannot find -ljawt
collect2: error: ld returned 1 exit status
make[1]: *** [/opt/libreoffice/instdir/program/libofficebean.so] Fehler 1
/opt/libreoffice/bean/Library_officebean.mk:12: die Regel fĆ¼r Ziel ā€ž/opt/libreoffice/instdir/program/libofficebean.soā€œ scheiterte
make[1]: *** Auf noch nicht beendete Prozesse wird gewartet ā€¦
make: *** [build] Fehler 2
Makefile:263: die Regel fĆ¼r Ziel ā€žbuildā€œ scheiterte

thats true. ā€œlocate libjawtā€ shows

/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/libjawt.so
/usr/lib/jvm/java-8-openjdk-amd64/lib/amd64/libjawt.so
/usr/lib/jvm/java-9-openjdk-amd64/lib/amd64/libjawt.so

is there a way to link one of these libraries in your script?

thanks for helping, tmb

thanks, tried that. must be something different.

maybe you still have to install some libjawt-dev?

what I do wrong:
getting error when try running that script

./officeonlin-install.sh line7: syntax error near unexpected token ā€˜newlineā€™
./officeonlin-install.sh line 7 : ā€˜ā€™

You have end of line in windows format that are wrongly interpreted by bash.
hereā€™s various solution for fixing this issue.

I have successfully installed this using husisusi/officeonlin-install.sh

When I access a file I get an Access Denied and Iā€™m not sure why but I think because of some non-valid SSL certificate ?

I hope someone can help out.

Hi. Can you tell us a little bit more about the file youā€™re opening, how and from where ? :slightly_smiling_face:
If you changed collabora by libreoffice online installed from the script you still need to add your nextcloud domain in /opt/online/loolwsd.xml as a wopi allowed host.

just some odt file from the files section.

I have added my nexcloud domain there, but does it also check fqdn of the host ? as this differsā€¦ 2 seperate machines for both.

A non signed cert is not the issue ?

Aha! Found what I get on my LibreOffice Online server when I access a file and get Access Denied:

Mar 23 00:23:12 ofco-01 loolwsd[1656]: SSL Exception [in file ā€œsrc/ErrorHandler.cppā€, line 40]
Mar 23 00:23:12 ofco-01 loolwsd[1656]: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Hi.
I have no idea about your system setup and from where you intend to use libreoffice online :thinking:
Blindly, I whould recommend you to adapt your collabora initial reverse proxy ( if you had one) to point to your new lool host.

after weeks of trying I gave up to use collabra. In the meantime Iā€™ve found a better Online Office: https://www.onlyoffice.com/ and they have recently added a Nextcloud App doing all the handling. My suggestion is to install OnlyOffice Community Document Server on different machine and subdomain and using their NC App for redirecting all Office Documents

I think you got lostā€¦
This Howto is not collabra.

1 Like

ops you might be rightā€¦ :stuck_out_tongue:

I get that error from your script when I did a successfull build, do you have any suggestion ?

Yes I have.
Just install clean Ubuntu 16.04 and run the script.
You need 16 GB in opt and min. 4 GB RAM and a lot of time to compiling.
After that reboot your system and try to access:
https://YOUR-IP:9980/loleaflet/YOUR-ID/loleaflet.html?file_path=file:///opt/online/test/data/hello-world.odt
If you able to access it, our part is done.

1 Like