You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-user@hadoop.apache.org by Bai Shen <ba...@gmail.com> on 2012/10/09 20:40:13 UTC

copyFromLocal: File does not exist.

I have a CDH3 cluster up and running.  I'm on the namenode and trying to
copy a file into HDFS.  However, whenever I run copyFromLocal, I get a file
does not exist error.

[root@node1-0 ~]# sudo -u hdfs hadoop fs -copyFromLocal /root/url.txt /
copyFromLocal: File /root/url.txt does not exist.

What am I doing wrong?  url.txt exists in /root on the local filesystem.

Thanks.

Re: copyFromLocal: File does not exist.

Posted by Bai Shen <ba...@gmail.com>.
That was it.  Thanks.

On Tue, Oct 9, 2012 at 2:48 PM, Arpit Gupta <ar...@hortonworks.com> wrote:

> probably user hdfs does not have access to /root on your local file system.
>
> I would copy the file to /tmp and give it appropriate permissions and then
> try again.
>
> --
> Arpit Gupta
> Hortonworks Inc.
> http://hortonworks.com/
>
> On Oct 9, 2012, at 11:40 AM, Bai Shen <ba...@gmail.com> wrote:
>
> > I have a CDH3 cluster up and running.  I'm on the namenode and trying to
> > copy a file into HDFS.  However, whenever I run copyFromLocal, I get a
> file
> > does not exist error.
> >
> > [root@node1-0 ~]# sudo -u hdfs hadoop fs -copyFromLocal /root/url.txt /
> > copyFromLocal: File /root/url.txt does not exist.
> >
> > What am I doing wrong?  url.txt exists in /root on the local filesystem.
> >
> > Thanks.
>
>

Re: copyFromLocal: File does not exist.

Posted by Arpit Gupta <ar...@hortonworks.com>.
probably user hdfs does not have access to /root on your local file system. 

I would copy the file to /tmp and give it appropriate permissions and then try again.

--
Arpit Gupta
Hortonworks Inc.
http://hortonworks.com/

On Oct 9, 2012, at 11:40 AM, Bai Shen <ba...@gmail.com> wrote:

> I have a CDH3 cluster up and running.  I'm on the namenode and trying to
> copy a file into HDFS.  However, whenever I run copyFromLocal, I get a file
> does not exist error.
> 
> [root@node1-0 ~]# sudo -u hdfs hadoop fs -copyFromLocal /root/url.txt /
> copyFromLocal: File /root/url.txt does not exist.
> 
> What am I doing wrong?  url.txt exists in /root on the local filesystem.
> 
> Thanks.


Re: copyFromLocal: File does not exist.

Posted by Zhiwei Lin <zh...@gmail.com>.
use ls -l to check if hdfs has the right to access url.txt.


On 9 October 2012 19:40, Bai Shen <ba...@gmail.com> wrote:

> I have a CDH3 cluster up and running.  I'm on the namenode and trying to
> copy a file into HDFS.  However, whenever I run copyFromLocal, I get a file
> does not exist error.
>
> [root@node1-0 ~]# sudo -u hdfs hadoop fs -copyFromLocal /root/url.txt /
> copyFromLocal: File /root/url.txt does not exist.
>
> What am I doing wrong?  url.txt exists in /root on the local filesystem.
>
> Thanks.
>



-- 

Best wishes.

Zhiwei