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

Issues with installing under all Linux Distributions

How to run headless On debian

Postby tiller » Wed Apr 16, 2008 10:19 am

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.
tiller
 
Posts: 4
Joined: Wed Apr 16, 2008 10:07 am

Re: Running headless on debian (How to debug)

Postby Hagar Delest » Wed Apr 16, 2008 10:47 am

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

I move your thread to the Linux forum.
AOO 4.0.1 on Windows 7 and Xubuntu 14.04 (Trusty Tahr)
User avatar
Hagar Delest
Moderator
 
Posts: 25090
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Running headless on debian (How to debug)

Postby acknak » Wed Apr 16, 2008 3:58 pm

Dumb question, trying not to assume too much: Are you running the jodconverter command while logged in on the server?
AOO 4 • Linux • Fedora 17
User avatar
acknak
Moderator
 
Posts: 17403
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: Running headless on debian (How to debug)

Postby AndrewZ » Wed Apr 16, 2008 4:27 pm

You may need -nofirststartwizard
<signature>
* 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.
</signature>
OOo 3.0.X on Fedora 9 + XP
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)

Postby hol.sten » Wed Apr 16, 2008 7:36 pm

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

Re: Running headless on debian (How to debug)

Postby tiller » Wed Apr 16, 2008 11:29 pm

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

Postby tiller » Thu Apr 17, 2008 5:41 am

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
tiller
 
Posts: 4
Joined: Wed Apr 16, 2008 10:07 am

Re: Running headless on debian (How to debug)

Postby AndrewZ » Thu Apr 17, 2008 6:45 am

1. switch from socket to pipe (on both connection strings)
2. use a firewall
<signature>
* 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.
</signature>
OOo 3.0.X on Fedora 9 + XP
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)

Postby tiller » Thu Apr 17, 2008 8:56 am

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.
tiller
 
Posts: 4
Joined: Wed Apr 16, 2008 10:07 am

Re: Running headless on debian (How to debug)

Postby hol.sten » Thu Apr 17, 2008 11:32 pm

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

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

Postby noise_ » Tue Jan 20, 2009 4:05 pm

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   Expand viewCollapse view
soffice -nologo -nofirststartwizard -headless -norestore -invisible "-accept=socket,host=localhost,port=8100,tcpNoDelay=1;urp;"

OOo is started by user1
Code: Select all   Expand viewCollapse view
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
noise_
 
Posts: 1
Joined: Tue Jan 20, 2009 3:53 pm

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

Postby hol.sten » Tue Jan 20, 2009 8:35 pm

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


Return to Linux

Who is online

Users browsing this forum: No registered users and 2 guests