HTTP/1.1 403 Access denied

Comments

4 comments

  • Avatar
    Ashraf Sharif

    Hi Aigars,

    It looks like the UI doesn't have permission to access the backend RPC interface. Inside /etc/cmon.cnf, do you see the following line?

    rpc_key='some_value'

    And inside /var/www/html/clustercontrol/bootstrap.php, do you see the following line?

    define('RPC_TOKEN','some_value');

    Ensure both lines are holding the same value. 

     

    Then, inside /etc/cmon.d/cmon_1.cnf, ensure the rpc_key value inside this file is the same with the one inside dcps database:

    select cluster_id,token from dcps.clusters;

     

    Regards,

    Ashraf

    0
    Comment actions Permalink
  • Avatar
    Aigars Polis

    Hi,

     

    Did you mistyped "/etc/cmon.d/cmon_1.cnf" ? I don't have this file.

     

    Aigars

    0
    Comment actions Permalink
  • Avatar
    Ashraf Sharif

    Hi Aigars,

    No, I didn't. It looks like you were running on 1.2.x and straightly upgraded to 1.4. Our upgrade instructions are available at http://severalnines.com/docs/administration.html#upgrading-clustercontrol .

    There are some steps that you've missed prior to the major upgrade. If you look at the provided link on step 2 (2a to 2e), ClusterControl requires to have minimal configuration inside /etc/cmon.cnf and the actual cluster configuration (cluster id 1 as in your case) should be located inside /etc/cmon.d/cmon_1.cnf.

    Since the upgrade is already done, here is what you should do to fix it (as root):

    mkdir /etc/cmon.d
    cp /etc/cmon.cnf /etc/cmon.d/cmon_1.cnf

    Inside /etc/cmon.cnf, leave the following lines and delete the rest:

    mysql_port=<value>
    mysql_password=<value>
    mysql_hostname=<value>
    hostname=<value>

    Copy the CMON_TOKEN value inside /var/www/html/cmonapi/config/bootstrap.php and append it as rpc_key into /etc/cmon.cnf, for example:

    mysql_port=<value>
    mysql_password=<value>
    mysql_hostname=<value>
    hostname=<value>
    rpc_key=<same as CMON_TOKEN value>

     

    Then, add the same rpc_key line into /etc/cmon.d/cmon_1.cnf:

    rpc_key=<same as CMON_TOKEN value>

    And update the value inside dcps schema on ClusterControl node:

    UPDATE dcps.clusters SET token = '<CMON_TOKEN value>' WHERE cluster_id = 1;

     

    Restart CMON service and try to access the UI again. If the problem still persists, I'd suggest you to generate an error report as described in this page: http://severalnines.com/docs/troubleshooting.html#error-reporting and create a support ticket so we can assist you better.

    Regards,
    Ashraf

    0
    Comment actions Permalink
  • Avatar
    Aigars Polis

    No, I upgraded from 1.3.2 to 1.4, but problem was incorrect rpc key. I also created new file - cmon_1.cnf.

    Thanks for helping out!

    0
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk