OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

OO 2.0 would not bind when starting as a service using xvfb

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> Setup and Troubleshooting
View previous topic :: View next topic  
Author Message
bajzi
Newbie
Newbie


Joined: 06 Dec 2005
Posts: 2

PostPosted: Fri Dec 16, 2005 9:28 am    Post subject: OO 2.0 would not bind when starting as a service using xvfb Reply with quote

Hi everyone!

We've installed xvfb on a Debian linux along with xvfb with the latest java. We want to convert documents command-line with the help of OO 2.0. A java program would call OO for doing the conversions. We wanted to run therefore OO as a service.
This is how we run it:
xvfb-run -a /etc/openoffice.org-2.0/program/soffice "-accept=socket,host=localhost,port=8100;urp;StarOffice.ServiceManager" &
After this stage I can see it running with ps -ax but I can see nothing listening on port 8100 with netstat!?

We would go like this:
export JAVA_HOME=/opt/jre1.5.0_06/
$JAVA_HOME/bin/java -jar ppt2swf.jar teszt.ppt teszt.swf

The problem is the following:
"uno:socket,host=localhost,port=8100;urp;StarOffice.ServiceManager
Exception in thread "main" com.sun.star.connection.NoConnectException:
java.net.ConnectException: Connection refused
at
com.sun.star.lib.connections.socket.socketConnector.connect(socketConnector.
java:171)
at com.sun.star.comp.connections.Connector.connect(Connector.java:146)
at
com.sun.star.comp.urlresolver.UrlResolver$_UrlResolver.resolve(UrlResolver.j
ava:133)
at Converter.convertDocument(Converter.java:121)
at Converter.main(Converter.java:250) "

There's no bind on port 8100 from the side of OO. And we get absolutely no error messages, not even if I type "localhos" instead of "localhost"

Could anyone please help what could be the problem?

Thanks
Back to top
View user's profile Send private message
AndrewZ
Moderator
Moderator


Joined: 21 Jun 2004
Posts: 4140
Location: Colorado, USA

PostPosted: Fri Dec 16, 2005 10:01 am    Post subject: Re: OO 2.0 would not bind when starting as a service using x Reply with quote

bajzi wrote:

xvfb-run -a /etc/openoffice.org-2.0/program/soffice "-accept=socket,host=localhost,port=8100;urp;StarOffice.ServiceManager" &


Try removing StarOffice.ServiceManager. Also, if possible try running on a real X server or use xwd (?) to see what is happening on xvfb.
Back to top
View user's profile Send private message Visit poster's website
md5
Newbie
Newbie


Joined: 21 Dec 2005
Posts: 4

PostPosted: Wed Dec 21, 2005 12:01 pm    Post subject: Re: OO 2.0 would not bind when starting as a service using x Reply with quote

bajzi,

I am also having difficulty getting OO 2.0 to listen on port 8100. Nearly an identical setup as you, I am using Xvfb on our webserver to emulate the X functionality required by OO. Our purpose is to get webhuddle (https://www.webhuddle.com/) set up...which we have done successfully with the following:

Java2SDK 1.4.2_09
JBoss 3.2.6
Open Office 1.1.5
Webhuddle 0.4.3

With our current scheme, I am executing :
Xvfb :1 -screen 0 1600x1200x32 &
soffice "-accept=socket,host=localhost,port=8100;urp;" &
//this successfully executes and binds port 8100, so says 'netstat -an | grep 8100'
//then I start JBoss which deploys webhuddle

All of this works great using OO 1.1.5, but I have tried numerous builds of OO-2 including 2.0.0, 2.0.139, 2.0.1rc5, and another random build (683, I think). None of the 2.0.x builds allow the binding to work. Granted, our app is working fine, but the whole purpose is to parse out Powerpoint documents, which OO 1.1.5 can do, just not nearly as cleanly as OO 2.0 -- so I'm stuck at this point. I even tried to build OO 2 from source at one point and couldn't because it complained about x headers missing (even when running the configure "--without-x".

Interesting that we are experiencing the exact same behavior when trying to implement with Xvfb. I don't *think* that running a full X server is impossible, but the X setup on this box appears to be hosed at the moment, and I need to do some more studying before I can fix that issue. Let me know if this sheds any light on what you're doing. Hopefully, someone else can speak to this issue and provide some insight.

thanks!
_________________
"I almost wore MY goatee tonight....wouldn't THAT have been embarrassing!"
Back to top
View user's profile Send private message
md5
Newbie
Newbie


Joined: 21 Dec 2005
Posts: 4

PostPosted: Wed Dec 21, 2005 12:06 pm    Post subject: Re: OO 2.0 would not bind when starting as a service using x Reply with quote

PS...
my environment vars, for reference:
JAVA_HOME=/usr/java/j2sdk1.4.2_09
JRE_HOME=/usr/java/j2sdk1.4.2_09/jre
DISPLAY=127.0.0.1:1.0
_________________
"I almost wore MY goatee tonight....wouldn't THAT have been embarrassing!"
Back to top
View user's profile Send private message
AndrewZ
Moderator
Moderator


Joined: 21 Jun 2004
Posts: 4140
Location: Colorado, USA

PostPosted: Wed Dec 21, 2005 2:35 pm    Post subject: Re: OO 2.0 would not bind when starting as a service using x Reply with quote

md5 wrote:

None of the 2.0.x builds allow the binding to work.


So what does happen? Is the process running? Have you tried using xwd to see what OpenOffice.org is doing? Perhaps OpenOffice.org is sitting there waiting for you to accept the license, type your name, and register (first time wizard).

Also, perhaps you should try -headless or -invisible on the command line.
Back to top
View user's profile Send private message Visit poster's website
md5
Newbie
Newbie


Joined: 21 Dec 2005
Posts: 4

PostPosted: Wed Dec 21, 2005 2:43 pm    Post subject: Reply with quote

ahz,

The process is running. I've definitely tried using -headless and -invisible (separately and together), which didn't change the situation. I tried to use xwd, but I'm sure I didn't use it correctly...I did not get anything to stdout (not surprised) and didn't know where to look for output files. Even if I did know where to look, I have no idea what it would be generating, how to interpret that data, or respond to the 1st-time license agreement + registration.

I suspect you are correct, I am just unsure how to proceed. My humble request to you:
Can you either a) guide me in using xwd to gain some meaningful data; or b) help me figure out if there's a workaround to fool OO into thinking that this isn't my first execution?

Thank you very much for your attention.
_________________
"I almost wore MY goatee tonight....wouldn't THAT have been embarrassing!"
Back to top
View user's profile Send private message
AndrewZ
Moderator
Moderator


Joined: 21 Jun 2004
Posts: 4140
Location: Colorado, USA

PostPosted: Wed Dec 21, 2005 3:21 pm    Post subject: Reply with quote

IIRC, xwud is used something like this if you have a real X server
Code:
xwd -root -display 1000 | xwud


In your case, you would use the appropriate display number, pipe to a file (instead of piping to xwud), download the file, and then do something like:

Code:
cat file | xwud


A shorter process, though, would be to simply copy ~/.openoffice.org2 (or similar name) from your Linux desktop (where you use OpenOffice.org normally) to your server. The directory would have the settings that tell OpenOffice.org that you have completed the first time registration.
Back to top
View user's profile Send private message Visit poster's website
md5
Newbie
Newbie


Joined: 21 Dec 2005
Posts: 4

PostPosted: Wed Dec 21, 2005 11:02 pm    Post subject: reply to ahz Reply with quote

ahz,

You were exactly right -- it was the registration process that was slowing me down. First confirmation was from using xwd and xwud as you suggested, so many thanks. My "workaround" didn't work in the long-run (modifying some of the XML config files by hand). Fortunately, i was able to simply "ssh -X" into the box from a Cygwin X environment. It was slow, but got the job done.

Again, thank you!
_________________
"I almost wore MY goatee tonight....wouldn't THAT have been embarrassing!"
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> Setup and Troubleshooting All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group