Hdfc connection refused by spark

Hi All, in one system I run hdfs only I mean data node, name node and secondary name node only,. From another remote system spark standalone cluster is there. From spark machine to hdfs system I am reading file. Connection refused. sc.readFile(“hdfs://----”);. Can any one help me

Apache Spark™ - Lightning-Fast Cluster Computing