avk avk
avk avk

Reputation: 61

error while starting namenode and datanode

pc83@pc83-ThinkCentre-M92p:~$ start-all.sh
This script is Deprecated. Instead use start-dfs.sh and start-yarn.sh
15/10/12 13:24:26 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 /usr/local/hadoop/logs/hadoop-pc83-namenode-pc83-ThinkCentre-M92p.out
localhost: starting datanode, logging to /usr/local/hadoop/logs/hadoop-pc83-datanode-pc83-ThinkCentre-M92p.out
Starting secondary namenodes [0.0.0.0]
0.0.0.0: starting secondarynamenode, logging to /usr/local/hadoop/logs/hadoop-pc83-secondarynamenode-pc83-ThinkCentre-M92p.out
0.0.0.0: Exception in thread "main" java.lang.IllegalArgumentException: Illegal character in authority at index 7: hdfs://localhost:9000 
0.0.0.0:    at java.net.URI.create(URI.java:859)
0.0.0.0:    at org.apache.hadoop.fs.FileSystem.getDefaultUri(FileSystem.java:177)
0.0.0.0:    at org.apache.hadoop.hdfs.server.namenode.NameNode.getAddress(NameNode.java:412)
0.0.0.0:    at org.apache.hadoop.hdfs.server.namenode.NameNode.getServiceAddress(NameNode.java:406)
0.0.0.0:    at org.apache.hadoop.hdfs.server.namenode.SecondaryNameNode.initialize(SecondaryNameNode.java:229)
0.0.0.0:    at org.apache.hadoop.hdfs.server.namenode.SecondaryNameNode.<init>(SecondaryNameNode.java:192)
0.0.0.0:    at org.apache.hadoop.hdfs.server.namenode.SecondaryNameNode.main(SecondaryNameNode.java:671)
0.0.0.0: Caused by: java.net.URISyntaxException: Illegal character in authority at index 7: hdfs://localhost:9000 
0.0.0.0:    at java.net.URI$Parser.fail(URI.java:2829)
15/10/12 13:24:42 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
starting yarn daemons
starting resourcemanager, logging to /usr/local/hadoop/logs/yarn-pc83-resourcemanager-pc83-ThinkCentre-M92p.out
localhost: starting nodemanager, logging to /usr/local/hadoop/logs/yarn-pc83-nodemanager-pc83-ThinkCentre-M92p.out
pc83@pc83-ThinkCentre-M92p:~$ 

in the above code i wanna start haoop services like

namenode,datanode,secondarynamenode,node manager

the command throws and error saying

java.lang.IllegalArgumentException: Illegal character in authority at index 7:

so to over come this problem what i have to do.

Upvotes: 2

Views: 4239

Answers (1)

vivek narsale
vivek narsale

Reputation: 360

I had the same error. I got this error because of the Hadoop configuration file named core-site.xml. It might be possible that your core-site.xml contains the code given below:

<configuration>
<property>
<name>fs.default.name</name>
<value>hdfs://localhost:9000 </value>
</property>
</configuration>

The error occurred because of the space present between 9000 and </value>. To overcome, replace the core-site.xml with the following snippet:

<configuration>
<property>
<name>fs.default.name</name>
<value>hdfs://localhost:9000</value>
</property>
</configuration>

You have to remove the space between 9000 </valve>, that should look like 9000</value>.

Upvotes: 4

Related Questions