Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rancher template - Hadoop Illegal character in host-name

We use rancher template for hadoop+yarn, but it seems that hadoop is unable to deal with using container names as hostnames (eg. hadoop_namenode-primary_1).

Caused by: java.net.URISyntaxException: Illegal character in hostname at index 13: http://hadoop_datanode_1:50075/webhdfs/v1/skystore/tmp/devtest_onedir/2016_08_19_02_35_35_32f7/header.json?op=CREATE&user.name=hdfs&namenoderpcaddress=10.42.14.252:8020&overwrite=true

Am I doing it wrong or is there some workaround?

As I see it the problem is caused but using container names as host names while rancher creates containers with underscores. Have no idea how to fix it though...

like image 779
Jendas Avatar asked Aug 19 '16 10:08

Jendas


1 Answers

Oracle bug-database states that: Underscore is not a valid character in a hostname according to RFC 2396, RFC 952, and RFC 1123. Please refer this below link:

http://bugs.java.com/bugdatabase/view_bug.do?bug_id=5049974

Better idea could be to replace underscore with hypen in the host name.

Update 1:

hadoop is unable to deal with using container names as hostnames

It is not so. It is about the character underscore in hostname.

Update 2:

We have no idea how to force rancher to do that though

You are not supposed to proceed in that direction. The reason is that, still other applications might throw out the same exception which is again trouble. Best choice would be changing the host name.

like image 96
Marco99 Avatar answered Oct 16 '22 16:10

Marco99