you will this error in following cases.
1. while catalog tcpip node , hostname , portnumber is wrong.
double check hostname & portnumber
2. network issues ,
try to ping it to hostname
if you are able ping it , that means , either hostname or port number is wrong
uncatalog tcpip node & DB , re catalog with right hostname & portnumber.
by the way , what is your environmnet.
Hope it may help you
Thank You
Lekharaju Ennam