- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
DataNode give syntax error: unexpected end of file and failes to start
- Labels:
-
Apache Ambari
Created ‎12-01-2016 06:51 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Created ‎12-01-2016 06:59 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What happens when you try to start the Datanode manually from that host:
[root@erie1 ~]$ /var/lib/ambari-server/ambari-sudo.sh su hdfs -l -s /bin/bash -c 'ulimit -c unlimited' [root@erie1 ~]$ su - hdfs [hdfs@erie1 ~]$ /usr/hdp/current/hadoop-client/sbin/hadoop-daemon.sh --config /usr/hdp/current/hadoop-client/conf start datanode
This will help in isolating the issue.
Just incase if you find the same kind of error there as well then please check the first few lines of the script on that host if it is correct.
/usr/hdp/current/hadoop-client/sbin/hadoop-daemon.sh
.
Created ‎12-01-2016 06:59 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What happens when you try to start the Datanode manually from that host:
[root@erie1 ~]$ /var/lib/ambari-server/ambari-sudo.sh su hdfs -l -s /bin/bash -c 'ulimit -c unlimited' [root@erie1 ~]$ su - hdfs [hdfs@erie1 ~]$ /usr/hdp/current/hadoop-client/sbin/hadoop-daemon.sh --config /usr/hdp/current/hadoop-client/conf start datanode
This will help in isolating the issue.
Just incase if you find the same kind of error there as well then please check the first few lines of the script on that host if it is correct.
/usr/hdp/current/hadoop-client/sbin/hadoop-daemon.sh
.
Created ‎12-01-2016 10:36 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks @jss
It Worked...
Created ‎12-01-2016 07:03 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am suspecting that you might have an extra (`) back tick character in the beginning of that file.
I can reproduce the similar error at my end by intentionally editing the file and adding a ` (back tick at the very first line of this script)
Example:
[hdfs@erie1 ~]$ /usr/hdp/current/hadoop-client/sbin/hadoop-daemon.sh --config /usr/hdp/current/hadoop-client/conf stop datanode /usr/hdp/current/hadoop-client/sbin/hadoop-daemon.sh: line 195: unexpected EOF while looking for matching ``' /usr/hdp/current/hadoop-client/sbin/hadoop-daemon.sh: line 221: syntax error: unexpected end of file
Also which version of ambari & hdp is it ?
.
Created ‎12-01-2016 07:23 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@JSS
I didnt get any error with those 3 commands
below is the output I got when I ran the commands
starting datanode, logging to /var/log/hadoop/hdfs/hadoop-hdfs-datanode-ecsf00200104.out
Created ‎12-01-2016 09:26 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ambari 2.1.2
HDP 2.3
