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

Issues with installing under all GNU/Linux Distributions
Post Reply
tiller
Posts: 4
Joined: Wed Apr 16, 2008 10:07 am

How to run headless On debian

Post 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
Last edited by Hagar Delest on Tue Jun 10, 2008 1:46 pm, edited 2 times in total.
Reason: tagged the thread as Solved.
User avatar
Hagar Delest
Moderator
Posts: 32628
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Running headless on debian (How to debug)

Post by Hagar Delest »

Not sure that thread could help: Cant run over Application Server?

I move your thread to the Linux forum.
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: Running headless on debian (How to debug)

Post by acknak »

Dumb question, trying not to assume too much: Are you running the jodconverter command while logged in on the server?
AOO4/LO5 • Linux • Fedora 23
User avatar
AndrewZ
Volunteer
Posts: 633
Joined: Mon Oct 08, 2007 1:25 am
Location: Colorado, USA

Re: Running headless on debian (How to debug)

Post by AndrewZ »

You may need -nofirststartwizard
* Did you solve your problem? Do others a favor: Post the solution
* Visit OpenOffice.org Ninja (blog) and OpenOffice.org Ninja Wiki for news, previews, troubleshooting, etc.
OOo 3.0.X on Fedora 9 + XP
hol.sten
Volunteer
Posts: 495
Joined: Mon Oct 08, 2007 1:31 am
Location: Hamburg, Germany

Re: Running headless on debian (How to debug)

Post 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
OOo 3.2.0 on Ubuntu 10.04 • OOo 3.2.1 on Windows 7 64-bit and MS Windows XP
tiller
Posts: 4
Joined: Wed Apr 16, 2008 10:07 am

Re: Running headless on debian (How to debug)

Post by tiller »

AndrewZ wrote:You may need -nofirststartwizard
That was exactly what I needed. Its working now, so THANK YOU :}

Martin
tiller
Posts: 4
Joined: Wed Apr 16, 2008 10:07 am

Re: Running headless on debian, only connect from localhost

Post 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
User avatar
AndrewZ
Volunteer
Posts: 633
Joined: Mon Oct 08, 2007 1:25 am
Location: Colorado, USA

Re: Running headless on debian (How to debug)

Post by AndrewZ »

1. switch from socket to pipe (on both connection strings)
2. use a firewall
* Did you solve your problem? Do others a favor: Post the solution
* Visit OpenOffice.org Ninja (blog) and OpenOffice.org Ninja Wiki for news, previews, troubleshooting, etc.
OOo 3.0.X on Fedora 9 + XP
tiller
Posts: 4
Joined: Wed Apr 16, 2008 10:07 am

Re: Running headless on debian (How to debug)

Post 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.
hol.sten
Volunteer
Posts: 495
Joined: Mon Oct 08, 2007 1:31 am
Location: Hamburg, Germany

Re: Running headless on debian (How to debug)

Post 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).
OOo 3.2.0 on Ubuntu 10.04 • OOo 3.2.1 on Windows 7 64-bit and MS Windows XP
noise_
Posts: 1
Joined: Tue Jan 20, 2009 3:53 pm

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

Post 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
OOo 3.0.X on Linux-Other
hol.sten
Volunteer
Posts: 495
Joined: Mon Oct 08, 2007 1:31 am
Location: Hamburg, Germany

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

Post 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.
OOo 3.2.0 on Ubuntu 10.04 • OOo 3.2.1 on Windows 7 64-bit and MS Windows XP
Post Reply