HDP on Windows – Other Forum

Syntax error in URI

  • #49151
    Ryan Tao


    Every time I started the cluster, I found the error in namenode log. Below is the detailed.
    The path of data is available and accessible. I tried to add hadoop account into administrator group and format the namenode, but both didn’t work.
    Any help will be appreciated.

    2014-02-24 01:06:37,623 ERROR org.apache.hadoop.hdfs.server.common.Util: Syntax error in URI c:\hdp-win\data\hdfs\nn. Please check hdfs configuration.
    java.net.URISyntaxException: Illegal character in opaque part at index 2: c:\hdp-win\data\hdfs\nn
    at java.net.URI$Parser.fail(URI.java:2810)
    at java.net.URI$Parser.checkChars(URI.java:2983)
    at java.net.URI$Parser.parse(URI.java:3020)
    at java.net.URI.<init>(URI.java:577)
    at org.apache.hadoop.hdfs.server.common.Util.stringAsURI(Util.java:48)
    at org.apache.hadoop.hdfs.server.common.Util.stringCollectionAsURIs(Util.java:98)
    at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getStorageDirs(FSNamesystem.java:1119)
    at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getNamespaceDirs(FSNamesystem.java:1074)
    at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.checkConfiguration(FSNamesystem.java:508)
    at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.loadFromDisk(FSNamesystem.java:563)
    at org.apache.hadoop.hdfs.server.namenode.NameNode.loadNamesystem(NameNode.java:443)
    at org.apache.hadoop.hdfs.server.namenode.NameNode.initialize(NameNode.java:491)
    at org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(NameNode.java:684)
    at org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(NameNode.java:669)
    at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1254)
    at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1320)
    2014-02-24 01:06:37,639 WARN org.apache.hadoop.hdfs.server.common.Util: Path c:\hdp-win\data\hdfs\nn should be specified as a URI in configuration files. Please update hdfs configuration.


to create new topics or reply. | New User Registration

  • Author
  • #49422
    Robert Molina

    Hi Ryan,
    Can you post the value you have set in hdfs-site.xml which is in your etc\hadoop folder. The property is dfs.namenode.name.dir.


    Ryan Tao

    Hi Robert,

    Thanks for your response.
    Below is the detailed of property.

    <description>Determines where on the local filesystem the DFS name node
    should store the name table. If this is a comma-delimited list
    of directories then the name table is replicated in all of the
    directories, for redundancy. </description>


    Robert Molina

    Hi Ryan,
    That seems to match up c:\hdp-win\data\hdfs\nn. How about if you try an upper case C. This is what I have in my cluster:
    C:\hdpdata\data\hdfs\nn . Also it would probably be good just to verify you have a well formed xml file.

    Kind Regards,

You must be to reply to this topic. | Create Account

Support from the Experts

A HDP Support Subscription connects you experts with deep experience running Apache Hadoop in production, at-scale on the most demanding workloads.

Enterprise Support »

Become HDP Certified

Real world training designed by the core architects of Hadoop. Scenario-based training courses are available in-classroom or online from anywhere in the world

Training »

Hortonworks Data Platform
The Hortonworks Data Platform is a 100% open source distribution of Apache Hadoop that is truly enterprise grade having been built, tested and hardened with enterprise rigor.
Get started with Sandbox
Hortonworks Sandbox is a self-contained virtual machine with Apache Hadoop pre-configured alongside a set of hands-on, step-by-step Hadoop tutorials.
Modern Data Architecture
Tackle the challenges of big data. Hadoop integrates with existing EDW, RDBMS and MPP systems to deliver lower cost, higher capacity infrastructure.