Hi Ben,

I looked into the implementation of X10 and found the lines that cause
the error in tcp.cc.

----------------------------------------
int TCP::connect(const char *host, unsigned port, unsigned retries,
bool noDelay)
{
        int rc;
        hostent *remoteInfo = gethostbyname(host);
        fprintf(stderr, "Hostname: %s \n", host); // added by me for debug 
purposes
        if (!remoteInfo) FATAL("cannot resolve remote hostname");
----------------------------------------

The host that is resolved is "E6410.site" and not localhost. Adding my hostname
E6410.site to /etc/hosts solved my problem.

I don't know why, but X10 tries to start places using my hostname and
not localhost
as name.

Cheers,
Andreas

2012/6/20 Benjamin W Herta <bhe...@us.ibm.com>
>
> Hi Andreas - I believe the solution at the link you provided was to put the 
> hostnames in /etc/hosts.  In your case, it appears that you are not 
> specifying X10_HOSTFILE or X10_HOSTLIST, so it's trying to start places on 
> "localhost".
>
> You may want to verify that "localhost" is in /etc/hosts, or, specify a 
> hostfile containing one line with the name of your machine (E6410).
>
> More details here: 
> http://x10-lang.org/documentation/practical-x10-programming/x10rt-implementations.html
>
>
>   - Ben
>
> Andreas Hollmann ---06/20/2012 12:24:20---Hi all, I have troubles running X10 
> on more than one place on Suse 12.1 on my local
>
> From: Andreas Hollmann <hollm...@in.tum.de>
> To: x10-users@lists.sourceforge.net,
> Date: 06/20/2012 12:24
> Subject: [X10-users] FATAL Error 0 : cannot resolve remote hostname: Success
>
> ________________________________
>
>
>
> Hi all,
>
> I have troubles running X10 on more than one place on Suse 12.1 on my local 
> machine.
>
> I found also other people encountering the same problem.
>
> http://d.hatena.ne.jp/na4zagin3/
>
> Unfortunately, they speak Japanese and can't understand their solution.
>
> I would be glad if someone could give me a hint to solve this problem.
> More information are included at the end.
>
> Thanks in advance.
>
> Cheers,
> Andreas
>
> capjo@E6410:~/Downloads/x10dt_2.2.1/workspace/Hello/src> java -version
> java version "1.7.0_05"
> Java(TM) SE Runtime Environment (build 1.7.0_05-b05)
> Java HotSpot(TM) 64-Bit Server VM (build 23.1-b03, mixed mode)
> capjo@E6410:~/Downloads/x10dt_2.2.1/workspace/Hello/src> gcc -v
> Using built-in specs.
> COLLECT_GCC=gcc
> COLLECT_LTO_WRAPPER=/usr/lib64/gcc/x86_64-suse-linux/4.6/lto-wrapper
> Target: x86_64-suse-linux
> Configured with: ../configure --prefix=/usr --infodir=/usr/share/info 
> --mandir=/usr/share/man --libdir=/usr/lib64 --libexecdir=/usr/lib64 
> --enable-languages=c,c++,objc,fortran,obj-c++,java,ada 
> --enable-checking=release --with-gxx-include-dir=/usr/include/c++/4.6 
> --enable-ssp --disable-libssp --disable-plugin 
> --with-bugurl=http://bugs.opensuse.org/
>  --with-pkgversion='SUSE Linux' --disable-libgcj --disable-libmudflap 
> --with-slibdir=/lib64 --with-system-zlib --enable-__cxa_atexit 
> --enable-libstdcxx-allocator=new --disable-libstdcxx-pch 
> --enable-version-specific-runtime-libs --program-suffix=-4.6 
> --enable-linux-futex --without-system-libunwind --with-arch-32=i586 
> --with-tune=generic --build=x86_64-suse-linux
>
> Thread model: posix
> gcc version 4.6.2 (SUSE Linux)
> capjo@E6410:~/Downloads/x10dt_2.2.1/workspace/Hello/src> x10c++ -o hello 
> Hello.x10
> capjo@E6410:~/Downloads/x10dt_2.2.1/workspace/Hello/src> X10_NPLACES=1 ./hello
> Hello, World!
> capjo@E6410:~/Downloads/x10dt_2.2.1/workspace/Hello/src> X10_NPLACES=2 ./hello
> FATAL Error 0 : cannot resolve remote hostname: Success
> FATAL Error 0 : cannot resolve remote hostname: Success
> capjo@E6410:~/Downloads/x10dt_2.2.1/workspace/Hello/src> X10_NPLACES=3 ./hello
> FATAL Error 0 : FATAL Error 0 : cannot resolve remote hostname: Success
> FATAL Error 0 : cannot resolve remote hostname: Success
> cannot resolve remote hostname: Success
> capjo@E6410:~/Downloads/x10dt_2.2.1/workspace/Hello/src> X10_NPLACES=4 ./hello
> FATAL Error 0 : cannot resolve remote hostname: Success
> FATAL Error 0 : cannot resolve remote hostname: Success
> FATAL Error 0 : cannot resolve remote hostname: Success
> capjo@E6410:~/Downloads/x10dt_2.2.1/workspace/Hello/src> ping localhost
> PING localhost (127.0.0.1) 56(84) bytes of data.
> 64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.043 ms
> 64 bytes from localhost (127.0.0.1): icmp_seq=2 ttl=64 time=0.042 ms
>
> capjo@E6410:~/Downloads> cat /etc/hosts
> 127.0.0.1       
> localhost------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. 
> http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/_______________________________________________
> X10-users mailing list
> X10-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/x10-users
>

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
X10-users mailing list
X10-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/x10-users

Reply via email to