[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [ptp-dev] Questions about remote support
|
Great thanks. I've been trying to work out the best way to do this
for some time. I'll take a look tomorrow.
Greg
On Oct 10, 2007, at 9:12 PM, Clement Kam Man Chu wrote:
Clement Kam Man Chu wrote:
Hi Greg,
I got another problem on ptp remote. I cannot find "RSE" in
combo box of "remote service provider" in Resource Manager
Wizard. I found there is an error occurred while initializing rse
service. Please see RSEServices file and line 86. This line of
code always returns false. Any idea?
I commented that line and tried to connect to remote server. I
can connect to the remote server, but I cannot connect to orte
proxy. Please see the following message:
kxc565@ac~ > /home/565/kxc565/workspace-ptp/
org.eclipse.ptp.linux.ia64/bin/ptp_orte_proxy --proxy=tcp --
host=localhost.localdomain --port=53881 ;exit
proxy connection failed
In linux, method InetAddress.getLocalHost().getCanonicalHostName()
will return localhost.localdomain, but it gets the correct addrss
at Mac. I provided a method as below that can be avoid the
incorrect host address problem on linux.
public String getLocalAddress() throws IOException {
String addr = InetAddress.getLocalHost().getCanonicalHostName
();
if (addr.endsWith(".in-addr.arpa")) {
addr = InetAddress.getLocalHost().getHostAddress();
}
if (addr.startsWith("localhost")) {
Enumeration<NetworkInterface> netInterfaces =
NetworkInterface.getNetworkInterfaces();
while (netInterfaces.hasMoreElements()) {
NetworkInterface ni = (NetworkInterface)
netInterfaces.nextElement();
Enumeration<InetAddress> alladdr =
ni.getInetAddresses();
while (alladdr.hasMoreElements()) {
InetAddress ip = (InetAddress)alladdr.nextElement
();
if (!ip.isSiteLocalAddress() && !
ip.isLoopbackAddress() && ip.getHostAddress().indexOf(":") == -1) {
return ip.getCanonicalHostName();
}
}
} }
return addr;
}
Clement
Clement
Dave Wootton wrote:
Greg
I have it working now. I was getting a message about being unable
to instantiate factory in the error log.
I will look at using IPath objects to validate path names
Dave
Greg Watson <g.watson@xxxxxxxxxxxx> Sent by: ptp-dev-
bounces@xxxxxxxxxxx
10/08/2007 06:05 PM
Please respond to
Parallel Tools Platform general developers <ptp-dev@xxxxxxxxxxx>
To
Parallel Tools Platform general developers <ptp-dev@xxxxxxxxxxx>
cc
Subject
Re: [ptp-dev] Questions about remote support
On Oct 8, 2007, at 4:05 PM, Dave Wootton wrote:
Greg
I just updated from head a few minutes ago and now I'm getting a
null
pointer exception (see bottom of this email) when I try to
create a new
resource manager. This happens when I open the resource manager
wizard,
click PE from the list and click next. This worked correctly
this morning.
If I updated while you were in the middle of commits, that's
fine, just
let me know to try again later.
Can you check the error log to see if there is any message like
'Failed to instantiate factory...'? Also, make sure you updated
the org.eclipse.ptp.remote.rse plugin as well.
Also, the way my parallel tab works, I have a text entry field
with a
ModifyListener registered, and an accompanying Text field that
gets filled
in with a path name. This gets filled in either by the user
typing in a
path name or by my code as a result of the user selecting a file
from the
file selector, in which case I get the IPath object returned by
calling
browseFile, call toString() on that object and then fill in the
text field
with that value.
I don't attempt to validate the pathname until the ModifyListener
registered on the text field gets called, which occurs either
when the
user types in the field or when my code fills in the field using
the
pathname obtained from the IPath object. If the user has typed
in a field,
I don't see any way to validate that pathname, since I only know
the
pathname and the remote connection at that point (I don't have
an IPath
object). If I do have an IPath object, because the user clicked
the
browse button, then is the intent I call getResource() to get the
associated IRemoteResource, then validate using that object?
Yes. I'd like to see if we can use IPath objects rather than
Strings as you get an extra level of validation. You can do
something like this:
IPath path = new Path(textfield);
if (!path.isValidPath()) {
// invalid
}
IRemoteResource res = fileMgr.getResource(path,
monitor);
if (!res.fetchInfo().exists()) {
// invalid
}
Let me know if that seems ok.
Greg
_______________________________________________
ptp-dev mailing list
ptp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ptp-dev
_______________________________________________
ptp-dev mailing list
ptp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ptp-dev
--
Clement Kam Man Chu
Research Assistant
Faculty of Information Technology
Monash University, Caulfield Campus
Ph: 61 3 9903 2355
_______________________________________________
ptp-dev mailing list
ptp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ptp-dev