[ClusterLabs] pcs cluster setup fails after pcs cluster auth suceeds

Tomas Jelinek tojeline at redhat.com
Mon Apr 23 03:12:07 EDT 2018


This is a known issue. Take a look at
https://github.com/ClusterLabs/pcs/issues/153#issuecomment-346849207
for more details and steps to fix it.

Regards,
Tomas


Dne 20.4.2018 v 02:06 Casey & Gina napsal(a):
>> On Apr 19, 2018, at 12:37 AM, Tomas Jelinek <tojeline at redhat.com> wrote:
>>
>> Can you run those two commands with the --debug flag and post the output? Also it would be nice to know what pcs version you have.
> 
> Sure thing.  It looks like it's erroring because /var/lib/pcsd/tokens doesn't exist.  I thought `pcs cluster auth` was what created that file?
> 
> ------
> root at d-gp2-dbpg0-1:~# pcs cluster auth d-gp2-dbpg0-1 d-gp2-dbpg0-2 d-gp2-dbpg0-3 -u hacluster -p '<mypassword>' --debug
> Running: /usr/bin/ruby -I/usr/share/pcsd/ /usr/share/pcsd/pcsd-cli.rb auth
> --Debug Input Start--
> {"username": "hacluster", "local": false, "nodes": ["d-gp2-dbpg0-1", "d-gp2-dbpg0-2", "d-gp2-dbpg0-3"], "password": "<mypassword>", "force": false}
> --Debug Input End--
> Return Value: 0
> --Debug Output Start--
> {
>    "status": "ok",
>    "data": {
>      "auth_responses": {
>        "d-gp2-dbpg0-1": {
>          "status": "ok",
>          "token": "5077b8e8-d630-4909-a628-e03ccefef00c"
>        },
>        "d-gp2-dbpg0-2": {
>          "status": "ok",
>          "token": "0e13a10e-071c-4427-ad91-94bac493dd37"
>        },
>        "d-gp2-dbpg0-3": {
>          "status": "ok",
>          "token": "18b8e519-4c95-427a-b0b9-85c10871d936"
>        }
>      },
>      "sync_successful": true,
>      "sync_nodes_err": [
> 
>      ],
>      "sync_responses": {
>      }
>    },
>    "log": [
>      "I, [2018-04-20T00:00:26.352275 #26415]  INFO -- : PCSD Debugging enabled\n",
>      "D, [2018-04-20T00:00:26.352335 #26415] DEBUG -- : Did not detect RHEL 6\n",
>      "I, [2018-04-20T00:00:26.352359 #26415]  INFO -- : Running: /usr/sbin/corosync-cmapctl totem.cluster_name\n",
>      "I, [2018-04-20T00:00:26.352375 #26415]  INFO -- : CIB USER: hacluster, groups: \n",
>      "D, [2018-04-20T00:00:26.354391 #26415] DEBUG -- : []\n",
>      "D, [2018-04-20T00:00:26.354425 #26415] DEBUG -- : [\"Failed to initialize the cmap API. Error CS_ERR_LIBRARY\\n\"]\n",
>      "D, [2018-04-20T00:00:26.354452 #26415] DEBUG -- : Duration: 0.002014269s\n",
>      "I, [2018-04-20T00:00:26.354489 #26415]  INFO -- : Return Value: 1\n",
>      "W, [2018-04-20T00:00:26.354952 #26415]  WARN -- : Cannot read config 'tokens' from '/var/lib/pcsd/tokens': No such file or directory @ rb_sysopen - /var/lib/pcsd/tokens\n",
>      "E, [2018-04-20T00:00:26.355005 #26415] ERROR -- : Unable to parse tokens file: A JSON text must at least contain two octets!\n",
>      "I, [2018-04-20T00:00:26.355026 #26415]  INFO -- : SRWT Node: d-gp2-dbpg0-3 Request: check_auth\n",
>      "E, [2018-04-20T00:00:26.355037 #26415] ERROR -- : Unable to connect to node d-gp2-dbpg0-3, no token available\n",
>      "W, [2018-04-20T00:00:26.355095 #26415]  WARN -- : Cannot read config 'tokens' from '/var/lib/pcsd/tokens': No such file or directory @ rb_sysopen - /var/lib/pcsd/tokens\n",
>      "E, [2018-04-20T00:00:26.355123 #26415] ERROR -- : Unable to parse tokens file: A JSON text must at least contain two octets!\n",
>      "I, [2018-04-20T00:00:26.355136 #26415]  INFO -- : SRWT Node: d-gp2-dbpg0-2 Request: check_auth\n",
>      "E, [2018-04-20T00:00:26.355145 #26415] ERROR -- : Unable to connect to node d-gp2-dbpg0-2, no token available\n",
>      "W, [2018-04-20T00:00:26.355222 #26415]  WARN -- : Cannot read config 'tokens' from '/var/lib/pcsd/tokens': No such file or directory @ rb_sysopen - /var/lib/pcsd/tokens\n",
>      "E, [2018-04-20T00:00:26.355249 #26415] ERROR -- : Unable to parse tokens file: A JSON text must at least contain two octets!\n",
>      "I, [2018-04-20T00:00:26.355261 #26415]  INFO -- : SRWT Node: d-gp2-dbpg0-1 Request: check_auth\n",
>      "E, [2018-04-20T00:00:26.355269 #26415] ERROR -- : Unable to connect to node d-gp2-dbpg0-1, no token available\n",
>      "I, [2018-04-20T00:00:26.439405 #26415]  INFO -- : Running: /usr/sbin/pcs status nodes corosync\n",
>      "I, [2018-04-20T00:00:26.439517 #26415]  INFO -- : CIB USER: hacluster, groups: \n",
>      "D, [2018-04-20T00:00:26.513927 #26415] DEBUG -- : [\"Corosync Nodes:\\n\", \" Online:\\n\", \" Offline:\\n\"]\n",
>      "D, [2018-04-20T00:00:26.514012 #26415] DEBUG -- : []\n",
>      "D, [2018-04-20T00:00:26.514037 #26415] DEBUG -- : Duration: 0.074411338s\n",
>      "I, [2018-04-20T00:00:26.514172 #26415]  INFO -- : Return Value: 0\n",
>      "W, [2018-04-20T00:00:26.514336 #26415]  WARN -- : Cannot read config 'tokens' from '/var/lib/pcsd/tokens': No such file or directory @ rb_sysopen - /var/lib/pcsd/tokens\n",
>      "E, [2018-04-20T00:00:26.514391 #26415] ERROR -- : Unable to parse tokens file: A JSON text must at least contain two octets!\n",
>      "I, [2018-04-20T00:00:26.514610 #26415]  INFO -- : Sending config 'tokens' version 1 ce17a679878c5dcc7cda2256365c1b468212a475 to nodes: \n"
>    ]
> }
> --Debug Output End--
> 
> d-gp2-dbpg0-1: Authorized
> d-gp2-dbpg0-2: Authorized
> d-gp2-dbpg0-3: Authorized
> ------
> 
> 
> I found this:  https://bugs.launchpad.net/debian/+source/pcs/+bug/1640923
> ...which suggests I should remove /etc/corosync/corosync.conf.  So I tried that, but it still doesn't work:
> 
> 
> ------
> root at d-gp2-dbpg0-1:~# pcs cluster auth d-gp2-dbpg0-1 d-gp2-dbpg0-2 d-gp2-dbpg0-3 -u hacluster -p '<mypassword>' --debug
> Running: /usr/bin/ruby -I/usr/share/pcsd/ /usr/share/pcsd/pcsd-cli.rb auth
> --Debug Input Start--
> {"username": "hacluster", "local": false, "nodes": ["d-gp2-dbpg0-1", "d-gp2-dbpg0-3", "d-gp2-dbpg0-2"], "password": "<mypassword>", "force": false}
> --Debug Input End--
> Return Value: 0
> --Debug Output Start--
> {
>    "status": "ok",
>    "data": {
>      "auth_responses": {
>        "d-gp2-dbpg0-1": {
>          "status": "ok",
>          "token": "aced58ac-e249-4a29-8cfc-b3ae7c76e398"
>        },
>        "d-gp2-dbpg0-2": {
>          "status": "ok",
>          "token": "ae405518-a0b8-4250-abfa-a267468dc842"
>        },
>        "d-gp2-dbpg0-3": {
>          "status": "ok",
>          "token": "8f99e9a2-93a4-4268-bb7b-17d2e22b98d0"
>        }
>      },
>      "sync_successful": true,
>      "sync_nodes_err": [
>                          
>      ],
>      "sync_responses": {
>      }
>    },
>    "log": [
>      "I, [2018-04-19T23:59:15.689932 #19357]  INFO -- : PCSD Debugging enabled\n",
>      "D, [2018-04-19T23:59:15.689985 #19357] DEBUG -- : Did not detect RHEL 6\n",
>      "I, [2018-04-19T23:59:15.690007 #19357]  INFO -- : Running: /usr/sbin/corosync-cmapctl totem.cluster_name\n",
>      "I, [2018-04-19T23:59:15.690021 #19357]  INFO -- : CIB USER: hacluster, groups: \n",
>      "D, [2018-04-19T23:59:15.695076 #19357] DEBUG -- : [\"totem.cluster_name (str) = debian\\n\"]\n",
>      "D, [2018-04-19T23:59:15.695118 #19357] DEBUG -- : []\n",
>      "D, [2018-04-19T23:59:15.695136 #19357] DEBUG -- : Duration: 0.005050687s\n",
>      "I, [2018-04-19T23:59:15.695172 #19357]  INFO -- : Return Value: 0\n",
>      "W, [2018-04-19T23:59:15.695513 #19357]  WARN -- : Cannot read config 'tokens' from '/var/lib/pcsd/tokens': No such file or directory @ rb_sysopen - /var/lib/pcsd/tokens\n",
>      "E, [2018-04-19T23:59:15.695631 #19357] ERROR -- : Unable to parse tokens file: A JSON text must at least contain two octets!\n",
>      "I, [2018-04-19T23:59:15.695662 #19357]  INFO -- : SRWT Node: d-gp2-dbpg0-1 Request: check_auth\n",
>      "E, [2018-04-19T23:59:15.695680 #19357] ERROR -- : Unable to connect to node d-gp2-dbpg0-1, no token available\n",
>      "W, [2018-04-19T23:59:15.695785 #19357]  WARN -- : Cannot read config 'tokens' from '/var/lib/pcsd/tokens': No such file or directory @ rb_sysopen - /var/lib/pcsd/tokens\n",
>      "E, [2018-04-19T23:59:15.695842 #19357] ERROR -- : Unable to parse tokens file: A JSON text must at least contain two octets!\n",
>      "I, [2018-04-19T23:59:15.695865 #19357]  INFO -- : SRWT Node: d-gp2-dbpg0-2 Request: check_auth\n",
>      "E, [2018-04-19T23:59:15.695875 #19357] ERROR -- : Unable to connect to node d-gp2-dbpg0-2, no token available\n",
>      "W, [2018-04-19T23:59:15.695950 #19357]  WARN -- : Cannot read config 'tokens' from '/var/lib/pcsd/tokens': No such file or directory @ rb_sysopen - /var/lib/pcsd/tokens\n",
>      "E, [2018-04-19T23:59:15.696009 #19357] ERROR -- : Unable to parse tokens file: A JSON text must at least contain two octets!\n",
>      "I, [2018-04-19T23:59:15.696031 #19357]  INFO -- : SRWT Node: d-gp2-dbpg0-3 Request: check_auth\n",
>      "E, [2018-04-19T23:59:15.696044 #19357] ERROR -- : Unable to connect to node d-gp2-dbpg0-3, no token available\n",
>      "I, [2018-04-19T23:59:15.792479 #19357]  INFO -- : Running: /usr/sbin/pcs status nodes corosync\n",
>      "I, [2018-04-19T23:59:15.792547 #19357]  INFO -- : CIB USER: hacluster, groups: \n",
>      "D, [2018-04-19T23:59:15.859634 #19357] DEBUG -- : []\n",
>      "D, [2018-04-19T23:59:15.859711 #19357] DEBUG -- : [\"Error: Unable to read /etc/corosync/corosync.conf: No such file or directory\\n\"]\n",
>      "D, [2018-04-19T23:59:15.859742 #19357] DEBUG -- : Duration: 0.067078157s\n",
>      "I, [2018-04-19T23:59:15.859792 #19357]  INFO -- : Return Value: 1\n",
>      "W, [2018-04-19T23:59:15.859867 #19357]  WARN -- : Cannot read config 'tokens' from '/var/lib/pcsd/tokens': No such file or directory @ rb_sysopen - /var/lib/pcsd/tokens\n",
>      "E, [2018-04-19T23:59:15.859940 #19357] ERROR -- : Unable to parse tokens file: A JSON text must at least contain two octets!\n",
>      "I, [2018-04-19T23:59:15.860229 #19357]  INFO -- : Sending config 'tokens' version 1 bfcb11e0ff065ffd1d4809987483c9753395345f to nodes: \n"
>    ]
> }
> --Debug Output End--
>                                                                                          
> d-gp2-dbpg0-1: Authorized
> d-gp2-dbpg0-3: Authorized
> d-gp2-dbpg0-2: Authorized
> ------
> 
> 
> As the above commands show errors, I didn't figure it was useful to proceed to post the debug output of the setup command also, but please correct me if I'm wrong and I'll be happy to do so.
> 
> Thank you,
> 



More information about the Users mailing list