Monday, February 6, 2012

Unix: wget Error 403: forbidden

when trying command:
$wget www.site.com/file.csv

You may get error like:

Resolving www.site.com... X.X.X.X
Connecting to www.site.com|X.X.X.X|:80... connected.
HTTP request sent, awaiting response... 403 Forbidden
 ERROR 403: Forbidden.

This happen when useragent value is not added with http message. When wget without any argument then useragent value will be empty in http message.

To add the useragent use this command:

$wget -U firefox http://www.site.com/file.csv



Monday, November 28, 2011

Hadoop NameSpaceID Error

Below given is usual error occurred in Hadoop environment.

Error in logger will be:

ERROR org.apache.hadoop.hdfs.server.datanode.DataNode: java.io.IOException: Incompatible namespaceIDs

Solution:

Stop all hadoop daemons and then

1. vi $PATH_TO_HADOOP_DATASTORE/dfs/name/current/VERSION
2. Copy the namespaceID value.
3. Now open a terminal on every machine having a datanode and do the following:
     vi $PATH_TO_HADOOP_DATASTORE/dfs/data/current/VERSION
4. Delete the entry corresponding to namespaceID and paste the value copied in Step 1.
Then save and exit.
Start hadoop daemons.