hadoopclouderahuecloudera-manager

How do I access scm database and change the status of a service there?


This guy's question on cloudera forums summarizes my problem:

http://community.cloudera.com/t5/Cloudera-Manager-Installation/DataNode-role-stuck-in-quot-stopping-quot/td-p/36933

I have a hue-server service and it is stuck in the stopping state and because of that I can't manipulate it (i.e. restart it, access it, what have you). As a lot of other links suggest, I need to update the status value in the SCM database, e.g. look here:

https://community.cloudera.com/t5/Cloudera-Manager-Installation/Custom-add-on-service-stuck-in-starting-state-and-now-cannot/ta-p/39525

The problem is that I have no idea what scm database is and how to access it, can anyone explain?


Solution

  • That turned out to be simple:

    psql -h localhost -p 7432 -U cloudera-scm -d postgres.

    From there we can execute \l, we will see the scm database.

    Then we can connect to it by doing \connect scm.

    After this we can execute select * from roles where configured_status = 'STOPPING'; and the update that column as the tutorial suggests.