Are you trying to connect to a iSeries o z/390? or just a LUW (Linux, Unix Windows?)
If you are trying to connect to one of the two first, you need a DB2 Connect license, because they use the DRDA architecture, and it uses a special license.
Check the license
db2licm -a
If you are trying to connect to a LUW, you do not need any DB2 connect license, but probably there is a problem in you cataloged databases. Check the
db2 list node diretory
db2 list db directory
Is the database a remote server or is it a local connection?
Also, try to attach to the remote instance, in order to check that the node catalog is right
db2 attach to remoteInstance