Exception in thread "main" java.lang.IllegalArgumentException: Illegal character in scheme name at index 0: hdfs://127.0.0.1:9000 or hdfs://localhost:9000

While starting the hdfs I got the below error

[hadoop@Hadoop1 ~]$ start-dfs.sh
17/03/06 09:53:02 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform… using builtin-java classes where applicable
Incorrect configuration: namenode address dfs.namenode.servicerpc-address or dfs.namenode.rpc-address is not configured.
Starting namenodes on []
localhost: starting namenode, logging to /home/hadoop/hadoop-2.7.3/logs/hadoop-hadoop-namenode-Hadoop1.out
localhost: starting datanode, logging to /home/hadoop/hadoop-2.7.3/logs/hadoop-hadoop-datanode-Hadoop1.out
Starting secondary namenodes [0.0.0.0]
0.0.0.0: starting secondarynamenode, logging to /home/hadoop/hadoop-2.7.3/logs/hadoop-hadoop-secondarynamenode-Hadoop1.out
0.0.0.0: Exception in thread “main” java.lang.IllegalArgumentException: Illegal character in scheme name at index 0:  hdfs://localhost:9000
…………………………..
………………………….
17/03/06 09:53:17 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform… using builtin-java classes where applicable

I have replaced the localhost:9000 with 127.0.0.1:9000 still I got the below error.
0.0.0.0: Exception in thread “main” java.lang.IllegalArgumentException: Illegal character in scheme name at index 0:  hdfs://127.0.0.1:9000
This is mainly due to the space I gave in the core-site.xml file,at the values.
   
      fs.default.name
      hdfs://127.0.0.1:9000 ==> I removed the spaces between the value and the symbols.
   
After that it started without errors and It is working fine.
[hadoop@Hadoop1 hadoop]$ start-dfs.sh
17/03/06 10:00:47 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform… using builtin-java classes where applicable
Starting namenodes on [localhost]
localhost: starting namenode, logging to /home/hadoop/hadoop-2.7.3/logs/hadoop-hadoop-namenode-Hadoop1.out
localhost: starting datanode, logging to /home/hadoop/hadoop-2.7.3/logs/hadoop-hadoop-datanode-Hadoop1.out
Starting secondary namenodes [0.0.0.0]
0.0.0.0: starting secondarynamenode, logging to /home/hadoop/hadoop-2.7.3/logs/hadoop-hadoop-secondarynamenode-Hadoop1.out
17/03/06 10:01:03 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform… using builtin-java classes where applicable

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s