Not able to connect to 26259

As you can see the database is running but I am not able to shut down the database.

[bab@cockroach3 ~]$ cockroach sql --insecure

Welcome to the cockroach SQL interface.

All statements must be terminated by a semicolon.

To exit: CTRL + D.

root@:26257/> SHOW DATABASES;
| Database |
| crdb_internal |
| information_schema |
| pg_catalog |
| system |
(4 rows)
root@:26257/> ^D
[bab@cockroach3 ~]$ cockroach quit --insecure --port=26258
Error: unable to connect or connection lost.

Please check the address and credentials such as certificates (if attempting to
communicate with a secure cluster).

Failed to connect to the node: error sending drain request: rpc error: code = Unavailable desc = grpc: the connection is unavailable
Failed running “quit”

[root@cockroach3 ~]# nmap localhost

Starting Nmap 6.40 ( ) at 2017-05-29 08:08 EDT
Nmap scan report for localhost (
Host is up (0.0000080s latency).
Other addresses for localhost (not scanned):
Not shown: 997 closed ports
22/tcp open ssh
25/tcp open smtp
8080/tcp open http-proxy

Nmap done: 1 IP address (1 host up) scanned in 2.40 seconds

Have you tried running cockroach quit --insecure without specifying a port? cockroach quit needs to talk to the same port as cockroach sql, which appears to be talking to the default port (26257).

cockroach quit --insecure

Worked like a charm