NodeJS agent showing "Error: socket hang up"