Page 1 of 1

How to run headless On debian

Posted: Wed Apr 16, 2008 10:19 am
by tiller
I want to install openoffice on our server running debian, because we need to use it to convert from .doc to text.

I have downloaded and installed the .deb package from openoffice.org(version 2.4) and I now have an openoffice in /opt/
The server is headless, so I try to run
/opt/openoffice.org2.4/program/soffice.bin -headless -accept="socket,port=8100;urp;"
This do start openoffice, and I can see it is running if I do a
Ps -Af
but i can't connect to it.

If I do a
java -jar /usr/local/jodconverter-2.2.1/lib/jodconverter-cli-2.2.1.jar /tmp/testDocument.doc /tmp/output.txt
I get a
ERROR: connection failed. Please make sure OpenOffice.org is running and listening on port 8100.
and if I telnet to port 8100 I get connection refused.

Does anyone have an idear about what can cause this?
Would missing packages for example cause this, or would open office refuse to start at all? (It is a rather minimal debian install)

Martin

Re: Running headless on debian (How to debug)

Posted: Wed Apr 16, 2008 10:47 am
by Hagar Delest
Not sure that thread could help: Cant run over Application Server?

I move your thread to the Linux forum.

Re: Running headless on debian (How to debug)

Posted: Wed Apr 16, 2008 3:58 pm
by acknak
Dumb question, trying not to assume too much: Are you running the jodconverter command while logged in on the server?

Re: Running headless on debian (How to debug)

Posted: Wed Apr 16, 2008 4:27 pm
by AndrewZ
You may need -nofirststartwizard

Re: Running headless on debian (How to debug)

Posted: Wed Apr 16, 2008 7:36 pm
by hol.sten
tiller wrote:/opt/openoffice.org2.4/program/soffice.bin -headless -accept="socket,port=8100;urp;"
This do start openoffice, and I can see it is running if I do a
Ps -Af
but i can't connect to it.
Your -accept option looks a little bit short. I'm always using something like -accept=socket,host=myhost,port=8100,tcpNoDelay=1;urp; or -accept=socket,host=localhost,port=8100,tcpNoDelay=1;urp; or -accept=socket,host=192.168.10.10,port=8100,tcpNoDelay=1;urp;.

Read this for OOo connection parameters: http://wiki.services.openoffice.org/wik ... Connection

Re: Running headless on debian (How to debug)

Posted: Wed Apr 16, 2008 11:29 pm
by tiller
AndrewZ wrote:You may need -nofirststartwizard
That was exactly what I needed. Its working now, so THANK YOU :}

Martin

Re: Running headless on debian, only connect from localhost

Posted: Thu Apr 17, 2008 5:41 am
by tiller
I got one more problem.

How do I prevent other computers from connection to my openoffice?
I really only want openoffice to accept connectons from localhost, not from any computer on the internet. I thought I could use host=localhost but
according to the documentation(And my tests) host= is used to indicate which interface to listen on, not to limit connections.

Martin

Re: Running headless on debian (How to debug)

Posted: Thu Apr 17, 2008 6:45 am
by AndrewZ
1. switch from socket to pipe (on both connection strings)
2. use a firewall

Re: Running headless on debian (How to debug)

Posted: Thu Apr 17, 2008 8:56 am
by tiller
AndrewZ wrote:1. switch from socket to pipe (on both connection strings)
2. use a firewall
I can't use a named pipe, becasue that don't work with java according to the documentation, so I guess I have to install a firewall.

Re: Running headless on debian (How to debug)

Posted: Thu Apr 17, 2008 11:32 pm
by hol.sten
tiller wrote:
AndrewZ wrote:1. switch from socket to pipe (on both connection strings)
2. use a firewall
I can't use a named pipe, becasue that don't work with java according to the documentation, so I guess I have to install a firewall.
Did you try a named pipe connection? I gave it a try some time ago and it works like a socket connection with Java. Although it only grants access on the local host. But that is what you want. I know from several tries that named pipe connections work on Windows and Linux (at least Kubuntu, but other Linux distributions will work, too).

Re: [Solved] Running headless on debian (How to debug)

Posted: Tue Jan 20, 2009 4:05 pm
by noise_
hi,
I have similar problems. I am running OOo3.0 headless for some conversion tasks, but it's not accessible for all users.

Code: Select all

soffice -nologo -nofirststartwizard -headless -norestore -invisible "-accept=socket,host=localhost,port=8100,tcpNoDelay=1;urp;"
OOo is started by user1

Code: Select all

root# fuser -n tcp 8100
8100/tcp:            27597

user1$ fuser -n tcp 8100
8100/tcp:            27597

user2$ fuser -n tcp 8100
user2$
27597 is the PID of soffice.

so, what should I do to grant user2 access to the soffice-service?

thx in advance

Re: [Solved] Running headless on debian (How to debug)

Posted: Tue Jan 20, 2009 8:35 pm
by hol.sten
noise_ wrote:so, what should I do to grant user2 access to the soffice-service?
Sorry, I have no answer for your question. All I have is another question for you: Why do you want two users to have access to your soffice service? This will lead to multiple simultaneous threads eventually and that does increase OOo's instability a lot.