What might be the reason for not being able to connect to the DB

$ bin/cypher-shell 
Unable to connect to localhost:7687, ensure the database is running and that there is a working network connection to it.
[congmin@localhost neo4j]$ bin/neo4j status
Neo4j is running at pid 26455

The db is running, but can't connect to to it.

is Neo4j running? is it running at pid 26455?

what is the output of linux command

ps -eaf | grep java

is the bolt port configured in conf/neo4j.conf at port 7687? is port 7687 open and listening? what is the output of linux command

netstat | grep 7687

@dana.canzano I ran this again:

$ ./cypher-shell 
Unable to connect to localhost:7687, ensure the database is running and that there is a working network connection to it.

[congmin@localhost bin]$ ./neo4j status
Neo4j is running at pid 39101

[congmin@localhost bin]$ ps -eaf | grep java
congmin   8594  8053  0 05:40 pts/0    00:00:00 grep --color=auto java
congmin  39101     1  6 03:35 ?        00:07:39 /usr/bin/java -cp /data0/congmin/neo4j/plugins:/data0/congmin/neo4j/conf:/data0/congmin/neo4j/lib/*:/data0/congmin/neo4j/plugins/* -server -Xms1g -Xmx16g -XX:+UseG1GC -XX:-OmitStackTraceInFastThrow -XX:+AlwaysPreTouch -XX:+UnlockExperimentalVMOptions -XX:+TrustFinalNonStaticFields -XX:+DisableExplicitGC -Djdk.nio.maxCachedBufferSize=262144 -Dio.netty.tryReflectionSetAccessible=true -Djdk.tls.ephemeralDHKeySize=2048 -Djdk.tls.rejectClientInitiatedRenegotiation=true -Dfile.encoding=UTF-8 org.neo4j.server.CommunityEntryPoint --home-dir=/data0/congmin/neo4j --config-dir=/data0/congmin/neo4j/conf

Also, my 7687 configuration:

# Bolt connector
dbms.connector.bolt.enabled=true
#dbms.connector.bolt.tls_level=DISABLED
dbms.connector.bolt.listen_address=xx.xx.xx.xx:7687

BTW, my python code can connect to the DB correctly through the bolt driver. Only the command line doesn't work.

what version of Neo4j?
Community or Enterprise?
How was this installed (i.e. rpm, tar, docker, debian, ??? ??? ???? )

Version 4.0.4 Community. On CentOs 7. .tar download file.

@lingvisa

Change dbms.connector.bolt.listen_address:xx.xx... to precisely:

dbms.connector.bolt.listen_address:7687

And make sure dbms.default_listen_address=0.0.0.0 or
dbms.default_listen_address=localhost is set.

Note, that I ran into the same issue when I accidentally uncommented instead:
dbms.default_advertised_address=localhost.

I had your same issue and this fixed it for me.

@fruitfulapproach This is my current setting:

dbms.default_listen_address=0.0.0.0
dbms.connector.bolt.listen_address=:7687
#dbms.default_advertised_address=localhost

Is this what you meant?

Try 0.0.0.0:7687instead of :7687 there.