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

Problem opening port
Goto page 1, 2  Next
 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Writer
View previous topic :: View next topic  
Author Message
cargdrac
General User
General User


Joined: 07 Sep 2007
Posts: 10
Location: Monterrey, Mexico

PostPosted: Fri Sep 07, 2007 1:42 pm    Post subject: Problem opening port Reply with quote

Hi everybody

I need to connect to a soffice running in a remote machine which is running under Solaris 10
The point with the command line instructions it is that opens the port ONLY when I type itlike this:

soffice -accept="socket,host=localhost,port=9500;urp;StarOffice.ServiceManager" -invisible

after I check that the port is listening with a netstat


But if I try to change the host for another IP (the one from the machine Im trying to connect) for example

soffice -accept="socket,host=10.5.597.99,port=9500;urp;StarOffice.ServiceManager" -invisible


, it doesn't appear anything from the results of the netstat....

What can I do???

Any idea of how I can solve this?

thanks in advance

Mauricio Cerna
Back to top
View user's profile Send private message MSN Messenger
acknak
Moderator
Moderator


Joined: 13 Aug 2004
Posts: 4295
Location: ~ 40°N,75°W

PostPosted: Fri Sep 07, 2007 2:16 pm    Post subject: Reply with quote

When a local connection works but a remote one does not, that suggests that the connection is blocked by a firewall.

Can you ping that IP address?

What do you see if you try a telnet connection to that IP:port?
Back to top
View user's profile Send private message
hol.sten
Super User
Super User


Joined: 14 Nov 2004
Posts: 3533
Location: Hamburg, Germany

PostPosted: Sat Sep 08, 2007 12:38 am    Post subject: Re: Problem opening port Reply with quote

cargdrac wrote:
I need to connect to a soffice running in a remote machine which is running under Solaris 10

So remote machine runs Solaris. And the local machine? Which OOo version and which java version are you using? Which programming language are you using?

cargdrac wrote:
But if I try to change the host for another IP (the one from the machine Im trying to connect) for example
soffice -accept="socket,host=10.5.597.99,port=9500;urp;StarOffice.ServiceManager" -invisible
it doesn't appear anything from the results of the netstat....

First: The host IP 10.5.597.99 seems not to be valid! Did you try a valid IP?
Second: You must use the IP of your remote machine! So the IP of the Solaris machine. Don't use the IP of your local machine. That will not work, as you already saw.

So, to get the remote access working, do the following:
1) Determine the IP of your Solaris machine. For simplicity we call it now 192.168.0.111
2) Start OOo on your Solaris machine with soffice -accept="socket,host=192.168.0.111,port=9500;urp;StarOffice.ServiceManager" -invisible
3) Now give netstat a try. You should see the port 9500 listed.
4) Connect from your local machine to your Solaris machine using a connection string similiar to this example: uno:socket,host=192.168.0.111,port=9500;urp;StarOffice.ServiceManager

It works for me with the remote machine running Knoppix and OOo 2.2.1, the local machine running Windows XP, and some Java code. And after the successful connection I can see that in netstat, too.

Regards
hol.sten
Back to top
View user's profile Send private message
cargdrac
General User
General User


Joined: 07 Sep 2007
Posts: 10
Location: Monterrey, Mexico

PostPosted: Mon Sep 10, 2007 11:57 am    Post subject: Reply with quote

Thank you for your advice.. Im tried to do it as you wrote(with the real ips) but it didnt seem to work anyway.. after that I remember that I have to run the jvmsetup script Embarassed so maybe it could be that.. But now I have a problem running that script because from the command line just says....


-bash-3.00# ./jvmsetup
Usage: jvmsetup [--shared]
With no arguments, jvmsetup changes the settings for a single user.
In a network installation, with --shared, jvmsetup changes the settings
for all users.


and thats all :s....

HOw could I do that??
Back to top
View user's profile Send private message MSN Messenger
hol.sten
Super User
Super User


Joined: 14 Nov 2004
Posts: 3533
Location: Hamburg, Germany

PostPosted: Mon Sep 10, 2007 12:31 pm    Post subject: Reply with quote

cargdrac wrote:
I remember that I have to run the jvmsetup script

Which OOo version are you using? For which OOo users do you want to execute jvmsetup?

Regards
hol.sten
Back to top
View user's profile Send private message
cargdrac
General User
General User


Joined: 07 Sep 2007
Posts: 10
Location: Monterrey, Mexico

PostPosted: Mon Sep 10, 2007 12:42 pm    Post subject: Reply with quote

Star Office 7

For All USers
Back to top
View user's profile Send private message MSN Messenger
cargdrac
General User
General User


Joined: 07 Sep 2007
Posts: 10
Location: Monterrey, Mexico

PostPosted: Mon Sep 10, 2007 12:50 pm    Post subject: Reply with quote

Ive tried the same with open office 2.2 in 2 windows xp machines and still doesnt work Sad
Back to top
View user's profile Send private message MSN Messenger
cargdrac
General User
General User


Joined: 07 Sep 2007
Posts: 10
Location: Monterrey, Mexico

PostPosted: Mon Sep 10, 2007 1:31 pm    Post subject: :S Reply with quote

Ok.. Im starting to get a little bit desperate...

Im doing the test on my own machine...connecting to my OWN

Here goes the string connection:

// Create an OO Component Context
XComponentContext xCC = Bootstrap.createInitialComponentContext(null);
System.out.println("Bootstrap OK");

// create a connector, so that it can contact the office
XUnoUrlResolver urlResolver = UnoUrlResolver.create(xCC);
System.out.println("unourlresolver OK");

Object initialObject = urlResolver.resolve("uno:socket,host=X.X.XXX.XXX,port=9500;urp;StarOffice.ServiceManager");

Ok NOW......

--When It put 127.0.0.1 as the value of host... everything works fine..

--When It put localhost as the value of host... everything works fine..

--When It put 192.168.0.1(for example of my real ip) as the value of host...

The only thing I can see is the next error:

com.sun.star.connection.NoConnectException: java.net.ConnectException: Connection refused: connect
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.java:133)
at org.openoffice.OfficeUNOClientApp.main(OfficeUNOClientApp.java:39)


So now I realized that this might be the real problem....

Any idea???

My time is passing away.....
Back to top
View user's profile Send private message MSN Messenger
cargdrac
General User
General User


Joined: 07 Sep 2007
Posts: 10
Location: Monterrey, Mexico

PostPosted: Mon Sep 10, 2007 1:33 pm    Post subject: Reply with quote

The JDK is 1.5 by the way...


Thanks in advance....
Back to top
View user's profile Send private message MSN Messenger
hol.sten
Super User
Super User


Joined: 14 Nov 2004
Posts: 3533
Location: Hamburg, Germany

PostPosted: Mon Sep 10, 2007 10:48 pm    Post subject: Re: :S Reply with quote

cargdrac wrote:
Ok NOW......

--When It put 127.0.0.1 as the value of host... everything works fine..

--When It put localhost as the value of host... everything works fine..

--When It put 192.168.0.1(for example of my real ip) as the value of host...

The only thing I can see is the next error:

Question: How does your OOo start command looks like in all three examples? Is it always the same? I hope not...

Regards
hol.sten
Back to top
View user's profile Send private message
cargdrac
General User
General User


Joined: 07 Sep 2007
Posts: 10
Location: Monterrey, Mexico

PostPosted: Tue Sep 11, 2007 6:11 am    Post subject: Infact it its... :s Reply with quote

the start command for OOo is

office -accept="socket,host=localhost,port=9500;urp;StarOffice.ServiceManager" -invisible

the only thing I change is the value of the ip in the connection string
Back to top
View user's profile Send private message MSN Messenger
cargdrac
General User
General User


Joined: 07 Sep 2007
Posts: 10
Location: Monterrey, Mexico

PostPosted: Tue Sep 11, 2007 8:05 am    Post subject: Reply with quote

In fact...could you please lend me your class??


your code??

I have no idea what can be going wrong

with a pipe everything works fine.. of course i dont need a pipe cause they work only locally....

Taking a deep breathe......
Back to top
View user's profile Send private message MSN Messenger
hol.sten
Super User
Super User


Joined: 14 Nov 2004
Posts: 3533
Location: Hamburg, Germany

PostPosted: Tue Sep 11, 2007 8:39 am    Post subject: Reply with quote

cargdrac wrote:
In fact...could you please lend me your class??
your code??

Sorry, but no.
Back to top
View user's profile Send private message
cargdrac
General User
General User


Joined: 07 Sep 2007
Posts: 10
Location: Monterrey, Mexico

PostPosted: Tue Sep 11, 2007 8:40 am    Post subject: Reply with quote

I mean..the connection part Embarassed
Back to top
View user's profile Send private message MSN Messenger
hol.sten
Super User
Super User


Joined: 14 Nov 2004
Posts: 3533
Location: Hamburg, Germany

PostPosted: Tue Sep 11, 2007 8:44 am    Post subject: Re: Infact it its... :s Reply with quote

cargdrac wrote:
the start command for OOo is

office -accept="socket,host=localhost,port=9500;urp;StarOffice.ServiceManager" -invisible

the only thing I change is the value of the ip in the connection string

So you always start OOo with "host=localhost"? Did you read my first post in this thread? I quote myself
hol.sten wrote:
So, to get the remote access working, do the following:
1) Determine the IP of your Solaris machine. For simplicity we call it now 192.168.0.111
2) Start OOo on your Solaris machine with soffice -accept="socket,host=192.168.0.111,port=9500;urp;StarOffice.ServiceManager" -invisible

In 1) and 2) the host IP is identical! That is a must! Otherwise you will not get your code working. So drop your pipe, change the IP in your code AND in your OOo start command to be the same and start testing again.

Regards
hol.sten
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Writer All times are GMT - 8 Hours
Goto page 1, 2  Next
Page 1 of 2

 
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