Valentin Baltadzhiev
Valentin Baltadzhiev

Reputation: 195

CockroachDB + Ubuntu - cluster stops with no error message

I just installed CockroachDB on Ubuntu and tried to start it when the weirdest thing happens. The process starts and then stops almost immediately, not showing any errors.

The command I'm running is:

cockroach start --insecure --host=localhost

and the response I get is:

*
* WARNING: RUNNING IN INSECURE MODE!
* 
* - Your cluster is open for any client that can access localhost.
* - Any user, even root, can log in without providing a password.
* - Any user, connecting as root, can read or write any data in your cluster.
* - There is no network encryption nor authentication, and thus no confidentiality.
* 
* Check out how to secure your cluster: https://www.cockroachlabs.com/docs/secure-a-cluster.html
*

After this I can write in the terminal again without having to manually terminate it. When trying to connect to the database with the built-in SQL client later, it won't allow me. Also, when I run "top" command the cockroach process doesn't show up

Upvotes: 2

Views: 401

Answers (1)

benesch
benesch

Reputation: 5269

Did you, by chance, start a multi-node cluster in the same directory? It's likely that the cockroach-data directory has recorded the presence of additional nodes in the cluster, and is waiting for a quorum of those additional nodes to become available before fully booting up.

In any case, running

./cockroach start --insecure --logtostderr

will yield more information. You can also find the logs for the last run in cockroach-data/logs/cockroach.log.

If there's nothing important in the cluster, you can simply nuke the cockroach-data directory. Otherwise, try specifying a different store directory using the --store flag.

Upvotes: 2

Related Questions