How to connect DB2 with eclipse on mac? I tried to connect the DB2 Express-C Version 10.1 to Eclipse Mars but it returns an exception when I tried to run the program.

com.ibm.db2.jcc.am.DisconnectNonTransientConnectionException:
Error opening socket to server localhost/127.0.0.1 on port 50,000 with message
Connection refused. ERRORCODE=-4499, SQLSTATE=08001


I think there is an issue with the port number or connection url.

OS: Mac OS X El Capitan

Eclipse: Eclipse Mars

DB: DB2 Express-C 10.1
You may need to follow the Network Access steps from the DB2 on Mac OS X install guide:


  Network access
  
  The instructions below assume that you installed DB2 with your current
  user account. If you manually created a different account such as
  "db2inst1", replace $(whoami) with db2inst1
  
  If you need to access this DB2 instance remotely, you should configure
  the service:


db2 update dbm cfg using svcename db2c_$(whoami)

sudo su -
echo "db2c_$(whoami) 50000/tcp" &gt;&gt; /etc/services 
exit

db2set -all db2set DB2COMM=TCPIP 
db2stop force 
db2start


Alternately, instead of keeping the local DB2 Express-C install, you can run DB2 in a Docker container.