You are not logged in.

#1 2010-12-20 15:11:10

tinhtruong
Member
From: Việt Nam
Registered: 2008-12-18
Posts: 109

[SOLVED]Cannot connect to LibreOffice headless

I don't know if this is the right forum to post this kind of question, I'm sorry if it is not.
Here is my problem:
I started LibreOffice (version 3.3.0.1) in headless mode with the command:

soffice -accept=socket,host=127.0.0.1,port=2003,tcpNoDelay=1 -headless -nodefault -nofirststartwizard -nolockcheck -nologo -norestore

But when I run the command

netstat -anp | grep LISTEN

The result is here:

tcp        0      0 127.0.0.1:53            0.0.0.0:*               LISTEN      2438/pdnsd          
unix  2      [ ACC ]     STREAM     LISTENING     106061 4036/soffice.bin    /tmp/OSL_PIPE_1000_SingleOfficeIPC_38a32e58e89556a55b28c3e2fef183a
...

There is no process running listening on port 2002, (but there is a named pipe of soffice?) I also tried to connect to port 2002 on my machine with telnet and get a connection refused error:

telnet localhost 2002
Trying 127.0.0.1...
telnet: Unable to connect to remote host: Connection refused

I checked the system-monitor of GNOME, there ARE two processes of LibreOffice (one is 'soffice' and the other is 'soffice.bin'). I don't have any firewall installed.
Here is my hosts.allow:

#
# /etc/hosts.allow
#
mysqld: 127.0.0.1:ALLOW
# End of file

Here is my hosts.deny:

#
# /etc/hosts.deny
#

ALL: ALL

# End of file

On a difference machine, my old laptop with ArchLinux and go-openoffice (3.2.x), everything is fine.
I don't know if there is any changes in the LibreOffice from go-openoffice.
Any help would be appreciated!

Last edited by tinhtruong (2010-12-21 04:29:53)

Offline

#2 2010-12-21 04:29:32

tinhtruong
Member
From: Việt Nam
Registered: 2008-12-18
Posts: 109

Re: [SOLVED]Cannot connect to LibreOffice headless

Found a solution here http://www.mail-archive.com/users@openo … 07241.html
Summary:
The wrong command:

soffice -accept=socket,host=127.0.0.1,port=2003,tcpNoDelay=1;urp; -headless -nodefault -nofirststartwizard -nolockcheck -nologo -norestore

The right command:

soffice "-accept=socket,host=127.0.0.1,port=2003,tcpNoDelay=1;urp;" -headless -nodefault -nofirststartwizard -nolockcheck -nologo -norestore

Notice there is a double quote around the -accept.

Offline

#3 2010-12-21 07:42:00

tinhtruong
Member
From: Việt Nam
Registered: 2008-12-18
Posts: 109

Re: [SOLVED]Cannot connect to LibreOffice headless

Actually, I used JODConverter to connect with LibreOffice and JODConverter containing a bug. I've proposed a simple fix at http://code.google.com/p/jodconverter/i … tail?id=76

Offline

Board footer

Powered by FluxBB