FreeBSD/LibreOffice/Firefox/Zotero java error
Hello. I know I'm weird for using BSD on my desktop, but I'm an old sysadmin and BSD bigot, so that colors my system. I still use twm for my window manager, because I don't have any use for the heavy stuff that slows the system down.
I am getting a java exception error when trying to use Zotero after a large system update. Therefore, it is very possible that the problem is purely on my end (i.e., I get to keep both halves).
However, just in case you have any pointers... Here are the relevant versions:
FreeBSD: 11.0-RELEASE-p2
Firefox: 51.0.1 (64 bit)
LibreOffice: 5.2.4.2.0+
Java: OpenJDK8-8.121.13
Zotero: 4.0.29.16
LO integration: 3.5.12 (according to firefox) 3.5.9 (according to libreoffice)
I start libreoffice, create a new text file, click on the zotero configuration button, and get the following in a popup:
An error occurred communicating with Zotero:
java.net.SocketException: Connection reset by peer
at java.net.PlainSocketImpl.socketSetOption(Native Method)
at java.net.AbstractPlainSocketImpl.setOption(AbstractPlainSocketImpl.java:269)
at java.net.Socket.setTcpNoDelay(Socket.java:952)
at org.zotero.integration.ooo.comp.CommServer.run(CommServer.java:23)
at java.lang.Thread.run(Thread.java:745)
Any clues?
(Standalone zotero is not an option at the moment, as you're only distributing binary. I'd be happy to try to get it working on FreeBSD myself if you released the source.)
I am getting a java exception error when trying to use Zotero after a large system update. Therefore, it is very possible that the problem is purely on my end (i.e., I get to keep both halves).
However, just in case you have any pointers... Here are the relevant versions:
FreeBSD: 11.0-RELEASE-p2
Firefox: 51.0.1 (64 bit)
LibreOffice: 5.2.4.2.0+
Java: OpenJDK8-8.121.13
Zotero: 4.0.29.16
LO integration: 3.5.12 (according to firefox) 3.5.9 (according to libreoffice)
I start libreoffice, create a new text file, click on the zotero configuration button, and get the following in a popup:
An error occurred communicating with Zotero:
java.net.SocketException: Connection reset by peer
at java.net.PlainSocketImpl.socketSetOption(Native Method)
at java.net.AbstractPlainSocketImpl.setOption(AbstractPlainSocketImpl.java:269)
at java.net.Socket.setTcpNoDelay(Socket.java:952)
at org.zotero.integration.ooo.comp.CommServer.run(CommServer.java:23)
at java.lang.Thread.run(Thread.java:745)
Any clues?
(Standalone zotero is not an option at the moment, as you're only distributing binary. I'd be happy to try to get it working on FreeBSD myself if you released the source.)
There used to be a problem with Word integration using 64-bit Firefox -- that's fixed, but its possible something similar is going on and in that case Standalone might help.
Beyond that, from the error it's looking like something is preventing Zotero/LO communication so maybe looking at any proxies, firewalls, or other security stuff you have running could be an option.
I will also look into what is required to get it added to the freebsd ports tree.
Just for the record, the list of privacy/security plugins I use are: privacy badger, umatrix, ublock, flashblock, beeftaco, right to click, https everywhere, lightbeam, disconnect, and google untracker. If I find that one or more of those is in fact the culprit, I'll update this message.
As for the plugin, the extension uses a HTTP server to interface between LibreOffice and Zotero. The LibreOffice extension tries to start a server on 127.0.0.1:23116 (and Standalone uses 127.0.0.1:23119, which will be relevant to you once/if you switch, to talk to Zotero Connectors - extensions for Chrome, Safari and now available for Firefox too). So you probably want to look into your firewall settings and/or Java permissions.
I also tried unsuccessfully to get the standalone built at that time. The maze of twisty little dependencies all alike finally defeated me (and I am an old school UNIX administrator, my first UNIX system was in 1980...). I am having problems once again, and will probably try to see if I can get standalone to compile, once again.
Thank you for the help and pointers!
I have built the Standalone using code dated October 20 following the instruction https://www.zotero.org/support/dev/client_coding/building_the_standalone_client. It seems to be working though I have not fully tested it.
For the moment, I use the updater file zotero-standalone-build/linux/updater-x86_64 which is a binary file. Is there the source or a documentation for the updater?
Thanks in advance.
An actual native build on FreeBSD doesn't and won't work ecause several of your scripts are bwritten assuming that the platform is only one of the 3 provided. Simply running those scripts on a FreeBSD system will obviously not work; I can't imagine how tsukuda did what they did without making a LOT of edits to a LOT of scripts, while understanding how the whole build architecture goes together....
I am simply gobsmacked by the complexity of the build, and am at a bit of a loss how to turn this into something reasonable for a generic UNIX build. I am sure some of the problem is the incredible ugliness of the firefox build itself. But, still....
It seems to be working though I do not think the updater would work.
Here is what I have done:
# ln -s /usr/local/bin/bash /bin/bash
(I did not want to modify all the #!)
Follow the steps 1-3 of the instruction.
Modify several scripts in the directory zotero-standalone-build (build.sh, config.sh, fetch_xulrunner.sh, check_requirements, dir_build).
Here is the patch made with git --diff in the directory zotero-standalone-build.
https://pastebin.com/dnWPsLWm
Follow the steps 4-6 of the instruction.
Would you be willing to repost those build diffs for building on FreeBSD? They should work on DragonFlyBSD also which I am trying to build on.
I have not checked the forum for a long time and I might have missed the notification email.
The old patch does not work as it was.
I will fix it and post the new one in a couple of weeks.
https://github.com/s1tsu/zotero-standalone-build
The file "freebsd.patch" is the diff.