CollaboraOnline / Docker-CODE

Dockerfile and scripts to generate CODE Docker image
147 stars 67 forks source link

Linking/Copying files from /opt/lool/systemplate is taking too much time #32

Open leoc opened 6 years ago

leoc commented 6 years ago

OS: Ubuntu 18.04 LTS (GNU/Linux 4.15.0-20-generic x86_64) Docker: Docker version 18.03.1-ce, build 9ee9f40 Docker-Compose: docker-compose version 1.21.2, build a133471

Running the container with nginx-letsencryptproxy via:

  collabora:
    image: collabora/code
    ports:
      - 9980:9980
    restart: always
    container_name: collabora
    environment:
      - VIRTUAL_HOST=collabora.domain
      - VIRTUAL_NETWORK=webproxy
      - VIRTUAL_PROTO=https
      - LETSENCRYPT_HOST=collabora.domain
      - LETSENCRYPT_EMAIL=${LETSENCRYPT_EMAIL}
      - domain=collabora.domain
    cap_add:
      - MKNOD

Just prints on the logs:

kit-00031-00029 12:39:16.968699 [ loolkit ] WRN  Linking/copying files from /opt/lool/systemplate to /opt/lool/child-roots/rdazZ2ks5jp2ON3p/ is taking too much time. Enabling verbose link/copy logging at information level.| kit/Kit.cpp:163

Does somebody have a hint on how to start the software correctly?

MSandro commented 6 years ago

I have the same issue, the start of the container takes several minutes until it crashes.

`Generating RSA private key, 2048 bit long modulus ............................................................+++ ...........................................................+++ e is 65537 (0x10001) Generating RSA private key, 2048 bit long modulus ........................................................................+++ ......+++ e is 65537 (0x10001) Signature ok subject=/C=DE/ST=BW/L=Stuttgart/O=Dummy Authority/CN=localhost Getting CA Private Key loolforkit version details: 3.3.1 - 0adc773 Init vcl preload: merged unordf ucpchelp1 msforms vbaobj pcr vbaswobj sw animcore hwp flash chartcore solver sc wpftcalc xof ucpcmis1 wpftdraw sd svgfilter evtatt ucpftp1 graphicfilter wpftimpress placeware sdfilt sm pdffilter PresentationMinimizer rptxml protocolhandler ucpdav1 wpftwriter msword lwpft writerfilter t602filter xmlfa basctl binaryurp uuresolver scd chartcontroller ldapbe2 dba sdbt dbu dbmm deploymentgui migrationoo2 migrationoo3 xsltfilter sdd embobj emboleobj log expwrap odfflatxml textfd storagefd xmlfd frm fwl fwm io textconversiondlgs smd mozbootstrap oox scfilt OGLTrans slideshow proxyfac cairocanvas vclcanvas canvasfactory mtfrenderer simplecanvas oglcanvas rptui rpt res dlgprov basprov stringresource dbaxml mork odbc sdbc2 calc dbase flat writer xsec_xmlsec reflection bootstrap introspection invocation invocadapt namingservice stocservices cmdmail syssh cached1 ucphier1 ucpimage ucppkg1 srtrs1 ucptdoc1 xsltdlg swd cui bib guesslang offacc scn scriptframe dbpool2 xmlsecurity analysis date pricing fps_office i18nsearch wizards.agenda.CallWizard wizards.fax.CallWizard wizards.letter.CallWizard wizards.web.CallWizard xsec_fw vbaevents PresenterScreen pdfimport abp dbp mysql ucpext hyphen spell lnth mailmerge for ctl passwordcontainer svgio updatefeed Preloading dictionaries: Whitelisted languages: de_DE en_GB en_US es_ES fr_FR it nl pt_BR pt_PT ru de_DE en_US fr_FR it_IT nl_NL pt_BR ru_RU en_GB nl_BE pt_PT es_ES Preloading thesauri: de_DE en_US fr_FR it_IT nl_NL pt_BR ru_RU en_GB nl_BE pt_PT es_ES Preload icons Preload languages kit-00036-00030 2018-08-28 09:46:45.530192 [ loolkit ] WRN Linking/copying files from /opt/collaboraoffice5.3 to /opt/lool/child-roots/DpvTaQgk9rbTXVTz/lo/ is taking too much time. Enabling verbose link/copy logging at information level.| kit/Kit.cpp:163 [ loolkit ] WRN Linking/copying files from /opt/collaboraoffice5.3 to /opt/lool/child-roots/DpvTaQgk9rbTXVTz/lo/ is taking too much time. Enabling verbose link/copy logging at information level.| kit/Kit.cpp:163wsd-00028-00028 2018-08-28 09:50:31.931438 [ loolwsd ] FTL Failed to fork child processes.| wsd/LOOLWSD.cpp:2730 FATAL: Failed to fork child processes. wsd-00028-00028 2018-08-28 09:50:31.932297 [ loolwsd ] FTL Failed to fork child processes.| wsd/LOOLWSD.cpp:2880 Failed to fork child processes. wsd-00028-00028 2018-08-28 09:50:31.933135 [ loolwsd ] WRN Waking up dead poll thread [admin], started: false, finished: false| ./net/Socket.hpp:550 wsd-00028-00028 2018-08-28 09:50:31.933254 [ loolwsd ] WRN Waking up dead poll thread [admin], started: false, finished: false| ./net/Socket.hpp:550 wsd-00028-00028 2018-08-28 09:50:31.934648 [ loolwsd ] WRN Waking up dead poll thread [delay_poll], started: false, finished: false| ./net/Socket.hpp:550 wsd-00028-00028 2018-08-28 09:50:31.934701 [ loolwsd ] WRN Waking up dead poll thread [delay_poll], started: false, finished: false| ./net/Socket.hpp:550

-00028 2018-08-28 09:50:31.937903 [ loolwsd ] WRN Waking up dead poll thread [accept_poll], started: false, finished: false| ./net/Socket.hpp:550 -00028 2018-08-28 09:50:31.937943 [ loolwsd ] WRN Waking up dead poll thread [accept_poll], started: false, finished: false| ./net/Socket.hpp:550 -00028 2018-08-28 09:50:31.937969 [ loolwsd ] WRN Waking up dead poll thread [websrv_poll], started: false, finished: false| ./net/Socket.hpp:550 -00028 2018-08-28 09:50:31.937987 [ loolwsd ] WRN Waking up dead poll thread [websrv_poll], started: false, finished: false| ./net/Socket.hpp:550 -00028 2018-08-28 09:50:31.938012 [ loolwsd ] WRN Waking up dead poll thread [accept_poll], started: false, finished: false| ./net/Socket.hpp:550 -00028 2018-08-28 09:50:31.938032 [ loolwsd ] WRN Waking up dead poll thread [accept_poll], started: false, finished: false| ./net/Socket.hpp:550 -00028 2018-08-28 09:50:31.938321 [ loolwsd ] WRN Waking up dead poll thread [websrv_poll], started: false, finished: false| ./net/Socket.hpp:550 -00028 2018-08-28 09:50:31.938368 [ loolwsd ] WRN Waking up dead poll thread [websrv_poll], started: false, finished: false| ./net/Socket.hpp:550 frk-00030-00030 2018-08-28 09:50:31.943674 [ forkit ] FTL Pipe closed.| common/IoUtil.cpp:308`
jlegido commented 6 years ago

I can reproduce the issue:

docker run \
 --name collabora \
 -e VIRTUAL_HOST=collabora.example.com \
 -e VIRTUAL_PORT=9980 \
 -e VIRTUAL_PROTO=http \
 -e LETSENCRYPT_HOST=collabora.example.com \
 -e LETSENCRYPT_EMAIL=user@example.com \
 -e RESOLVE_TO_PROXY_IP=true \
 -e 'domain=collabora\\.example\\.com' \
 --cap-add MKNOD \
 -d collabora/code

And the container logs, until crashed:

Generating RSA private key, 2048 bit long modulus
....+++
........................+++
e is 65537 (0x10001)
Generating RSA private key, 2048 bit long modulus
...........................................+++
................................................+++
e is 65537 (0x10001)
Signature ok
subject=/C=DE/ST=BW/L=Stuttgart/O=Dummy Authority/CN=localhost
Getting CA Private Key
loolforkit version details: 3.3.1 - 0adc773
Init vcl
preload: merged unordf ucpchelp1 msforms vbaobj pcr vbaswobj sw animcore hwp flash chartcore solver sc wpftcalc xof ucpcmis1 wpftdraw sd svgfilter evtatt ucpftp1 graphicfilter wpftimpress placeware sdfilt sm pdffilter PresentationMinimizer rptxml protocolhandler ucpdav1 wpftwriter msword lwpft writerfilter t602filter xmlfa basctl binaryurp uuresolver scd chartcontroller ldapbe2 dba sdbt dbu dbmm deploymentgui migrationoo2 migrationoo3 xsltfilter sdd embobj emboleobj log expwrap odfflatxml textfd storagefd xmlfd frm fwl fwm io textconversiondlgs smd mozbootstrap oox scfilt OGLTrans slideshow proxyfac cairocanvas vclcanvas canvasfactory mtfrenderer simplecanvas oglcanvas rptui rpt res dlgprov basprov stringresource dbaxml mork odbc sdbc2 calc dbase flat writer xsec_xmlsec reflection bootstrap introspection invocation invocadapt namingservice stocservices cmdmail syssh cached1 ucphier1 ucpimage ucppkg1 srtrs1 ucptdoc1 xsltdlg swd cui bib guesslang offacc scn scriptframe dbpool2 xmlsecurity analysis date pricing fps_office i18nsearch wizards.agenda.CallWizard wizards.fax.CallWizard wizards.letter.CallWizard wizards.web.CallWizard xsec_fw vbaevents PresenterScreen pdfimport abp dbp mysql  ucpext hyphen spell lnth mailmerge for ctl passwordcontainer svgio updatefeed 
Preloading dictionaries: Whitelisted languages: de_DE en_GB en_US es_ES fr_FR it nl pt_BR pt_PT ru 
de_DE en_US fr_FR it_IT nl_NL pt_BR ru_RU en_GB nl_BE pt_PT es_ES 
Preloading thesauri: de_DE en_US fr_FR it_IT nl_NL pt_BR ru_RU en_GB nl_BE pt_PT es_ES 
Preload icons
Preload languages
kit-00034-00030 2018-09-04 13:38:34.582112 [ loolkit ] WRN  Linking/copying files from /opt/collaboraoffice5.3 to /opt/lool/child-roots/3WFDYj2fRDl9tv0j/lo/ is taking too much time. Enabling verbose link/copy logging at information level.| kit/Kit.cpp:163
wsd-00028-00028 2018-09-04 13:42:18.254261 [ loolwsd ] FTL  Failed to fork child processes.| wsd/LOOLWSD.cpp:2730
FATAL: Failed to fork child processes.
wsd-00028-00028 2018-09-04 13:42:18.254512 [ loolwsd ] FTL  Failed to fork child processes.| wsd/LOOLWSD.cpp:2880
Failed to fork child processes.
wsd-00028-00028 2018-09-04 13:42:18.254856 [ loolwsd ] WRN  Waking up dead poll thread [admin], started: false, finished: false| ./net/Socket.hpp:550
wsd-00028-00028 2018-09-04 13:42:18.254929 [ loolwsd ] WRN  Waking up dead poll thread [admin], started: false, finished: false| ./net/Socket.hpp:550
wsd-00028-00028 2018-09-04 13:42:18.255927 [ loolwsd ] WRN  Waking up dead poll thread [delay_poll], started: false, finished: false| ./net/Socket.hpp:550
wsd-00028-00028 2018-09-04 13:42:18.255975 [ loolwsd ] WRN  Waking up dead poll thread [delay_poll], started: false, finished: false| ./net/Socket.hpp:550
<shutdown>-00028 2018-09-04 13:42:18.259449 [ loolwsd ] WRN  Waking up dead poll thread [accept_poll], started: false, finished: false| ./net/Socket.hpp:550
<shutdown>-00028 2018-09-04 13:42:18.259533 [ loolwsd ] WRN  Waking up dead poll thread [accept_poll], started: false, finished: false| ./net/Socket.hpp:550
<shutdown>-00028 2018-09-04 13:42:18.259564 [ loolwsd ] WRN  Waking up dead poll thread [websrv_poll], started: false, finished: false| ./net/Socket.hpp:550
<shutdown>-00028 2018-09-04 13:42:18.259594 [ loolwsd ] WRN  Waking up dead poll thread [websrv_poll], started: false, finished: false| ./net/Socket.hpp:550
<shutdown>-00028 2018-09-04 13:42:18.259638 [ loolwsd ] WRN  Waking up dead poll thread [accept_poll], started: false, finished: false| ./net/Socket.hpp:550
<shutdown>-00028 2018-09-04 13:42:18.259668 [ loolwsd ] WRN  Waking up dead poll thread [accept_poll], started: false, finished: false| ./net/Socket.hpp:550
<shutdown>-00028 2018-09-04 13:42:18.259913 [ loolwsd ] WRN  Waking up dead poll thread [websrv_poll], started: false, finished: false| ./net/Socket.hpp:550
<shutdown>-00028 2018-09-04 13:42:18.259947 [ loolwsd ] WRN  Waking up dead poll thread [websrv_poll], started: false, finished: false| ./net/Socket.hpp:550
frk-00030-00030 2018-09-04 13:42:18.262797 [ forkit ] FTL  Pipe closed.| common/IoUtil.cpp:308
usuario@servidor:/srv/data/computer/docker$ 

It took around 4 minutes to crash.

jlegido commented 6 years ago

As suggested here the workaround was to start up the container with below environment variable:

-e "SLEEPFORDEBUGGER=0"

Final working receipt in my case:

docker run \
 -t \
 --name collabora \
 -e "domain=cloud\\.example\\.com" \
 -e "username=admin" \
 -e "password=S3cRet" \
 --cap-add MKNOD \
 --expose 9980 \
 -e "SLEEPFORDEBUGGER=0" \
 -e VIRTUAL_HOST=collabora.example.com \
 -e VIRTUAL_PORT=9980 \
 -e VIRTUAL_PROTO=https \
 -e LETSENCRYPT_HOST=collabora.example.com \
 -e LETSENCRYPT_EMAIL=user@example.com \
 -e RESOLVE_TO_PROXY_IP=true \
 -d collabora/code

After around 6' you'll see below line in the logs:

office version details: { "ProductName": "Collabora Office", "ProductVersion": "5.3", "ProductExtension": ".10.53", "BuildId": "cf2ac11617bce9c49c92d8153ef12b55e5b903f3" }

So you're ready to test below URL:

https://collabora.example.com/loleaflet/dist/admin/admin.html