Try the fastest and simplest way to install ONLYOFFICE

Porting to XStreamOS / llumos

Porting to XStreamOS / llumos

Postby gbulfon » Mon Apr 30, 2018 4:42 pm

Hello,

we're working on integrating OnlyOffice to our WebTop 5 collaboration platform.
Most of our cloud and customers on premis systems are based on our own XStreamOS distribution, based on illumos, OpenSolaris.
So, we're also porting OnlyOffice DocumentServer to our OS.

We already have packages and installed all the requirements (RabbitMQ, Redis, Postgres).

With some work, we managed to build DocumentServer against v8 taken from our nodejs package.
We obviously had to make some patches to support SunOS and Solaris here and there on your code base.
Luckily enough, we already had a phantomjs binary needed during the install phase.

So, we have now an installed OnlyOffice DocumentServer with illumos binaries, customized for our needs inside an onlyoffice folder, containing everything from "etc" to "var" and so on.
We also had to create a production-xstreamos.json copying it from production-linux.json, and customized it to point to the customized folders.
Finally, because we don't run nginx yet, we configured our standard apache installation to proxypass what was needed, including the webscockets.

It almost works, I could point to the apis javascript file and retrieve them via http, then I wrote a simple html file locally with your instruction to open a file.
So I uploaded a docx to a known reachable http location here, and modified the javascript code in the html file to point to that document.

I managed to have all the interface start, websocket works and sends instructions, document server and file converter are contacted and I get websocket responses.
Then I receive an error on the browser, with the last websocket message being:

"{"type":"documentOpen","data":{"type":"open","status":"err","data":-80}}"

I cannot see other errors out of the 3 onlyoffice daemons outputs.

Any idea how can I dig into this?

Thanks!
Gabriele
gbulfon
 
Posts: 4
Joined: Mon Apr 30, 2018 4:13 pm

Re: Porting to XStreamOS / llumos

Postby Maxim » Fri May 11, 2018 2:35 pm

Hello gbulfon!
-80 error is a conversion error. You should dig into x2t. Take a look into converter's logs maybe it will help you. Maybe there is a lack of library.
Onlyoffice Document Server doesn't support this OS and maybe it will lead to this.
Maxim
 
Posts: 1744
Joined: Tue Oct 11, 2016 2:34 pm

Re: Porting to XStreamOS / llumos

Postby gbulfon » Fri Aug 10, 2018 2:29 pm

Hi,

after some time I could put my head on this again, and I found the reason.
It works great on XStreamOS/illumos, but I had to cleanup the task_result table that was holding an old error of my test url file.
truncating the table, it works fine!

But....fonts :)

Looks like the AllFontsGen tool is not working, just creating few bytes AllFonts.js and font_selection.bin.
Looked at the code and tried adding some "if defined(__sun) .." in fontengine/ApplicationFonts.cpp to allow for some system folders to be read: no way.
The code just ends without finding any fonts.
This is what runs at the end of install:

Code: Select all
LD_LIBRARY_PATH=/sonicle/onlyoffice/lib:  "/sonicle/onlyoffice/var/www/onlyoffice/documentserver/server/tools/AllFontsGen/AllFontsGen" \
        "--input=../core-fonts" \
        "--allfonts=/sonicle/onlyoffice/var/www/onlyoffice/documentserver/sdkjs/common/AllFonts.js" \
        "--images=/sonicle/onlyoffice/var/www/onlyoffice/documentserver/sdkjs/common/Images" \
        "--selection=/sonicle/onlyoffice/var/www/onlyoffice/documentserver/server/FileConverter/bin/font_selection.bin"


Any idea?

Gabriele
gbulfon
 
Posts: 4
Joined: Mon Apr 30, 2018 4:13 pm

Re: Porting to XStreamOS / llumos

Postby Maxim » Mon Aug 13, 2018 8:28 am

Hello gbulfon!
AllFontsGen tool is supposed to link fonts from the system fonts folder to the document editor.
Maxim
 
Posts: 1744
Joined: Tue Oct 11, 2016 2:34 pm

Re: Porting to XStreamOS / llumos

Postby gbulfon » Thu Aug 30, 2018 12:04 pm

AFAIK, looking at the code base, it's actually expected to generate the AllFonts.js and font_selection.bin, but I just get an empty copy of these two files.
Maybe this is because the links you talk about are not created? Where are they supposed to be done? What part of the build code is expected to do this?

Thanks!
Gabriele
gbulfon
 
Posts: 4
Joined: Mon Apr 30, 2018 4:13 pm

Re: Porting to XStreamOS / llumos

Postby gbulfon » Wed Oct 10, 2018 11:58 am

Hi, I managed to go a little further.

I found some pieces of code ending up as empty function on my system, because of various ifdef linux / ifdef osx etc.
I could manage to put my own ifdef __sun and translate code from linux to solaris, very similar.

The AllFontsGen utility started converting files (not only linking), but ended up with errors / core dumps on some of them.
I actually had to move away some complex fonts (chinese and so on) from the DocumentServer fonts directory to have it go through and do the job.
What may be wrong with this? Any idea?

Then I could startup onlyoffice again with fonts setup.
Now, accessing breaks after almost 95% of document load, and this error appears both on the server log, on the last websocket message, and on the browser js console:

Uncaught TypeError: Cannot read property 'j6' of undefined
at f.ypb (sdk-all.js:1958)
at fe.Jh (sdk-all.js:6800)
at db.ETb (sdk-all.js:7029)
at db.fv (sdk-all.js:7029)
at Ua.MEe (sdk-all.js:7580)
at Ua.GEe (sdk-all.js:7564)
at Ua.vEe (sdk-all.js:7562)
at Ua.Vhb (sdk-all.js:7557)
at Ua.uk (sdk-all.js:7553)
at rb.uk (sdk-all.js:8054)

Any idea about this?
Gabriele
gbulfon
 
Posts: 4
Joined: Mon Apr 30, 2018 4:13 pm


Return to Miscellaneous

Who is online

Users browsing this forum: No registered users and 1 guest