Well I solved this problem by using Cloudera manager's web-interface (ar localhost:7180). Clicked Sqoop service and then Configuration and then Ports and addresses. I changed the port from 8005 to 8051, saved changes, and restarted squoop through Cloudera manager.