I was trying to configure hadoop with one name node and four data nodes. I was able to successfully configure the name node and job tracker on one machine and bring it up.<
The name of the masters file is misleading. It should contain the address of the SecondaryNameNode and is read by the NameNode itself. DataNodes do not have anything to do with the masters file. You need to configure fs.default.name on core-site.xml configuration file.
The error you see is also misleading and points you to the wrong configuration parameter.