{"action":"created","issue":{"url":"https://api.github.com/repos/dmwm/WMCore/issues/8370","repository_url":"https://api.github.com/repos/dmwm/WMCore","labels_url":"https://api.github.com/repos/dmwm/WMCore/issues/8370/labels{/name}","comments_url":"https://api.github.com/repos/dmwm/WMCore/issues/8370/comments","events_url":"https://api.github.com/repos/dmwm/WMCore/issues/8370/events","html_url":"https://github.com/dmwm/WMCore/issues/8370","id":277741624,"number":8370,"title":"need to setup valid certificate for microservice","user":{"login":"vkuznet","id":125138,"avatar_url":"https://avatars0.githubusercontent.com/u/125138?v=4","gravatar_id":"","url":"https://api.github.com/users/vkuznet","html_url":"https://github.com/vkuznet","followers_url":"https://api.github.com/users/vkuznet/followers","following_url":"https://api.github.com/users/vkuznet/following{/other_user}","gists_url":"https://api.github.com/users/vkuznet/gists{/gist_id}","starred_url":"https://api.github.com/users/vkuznet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vkuznet/subscriptions","organizations_url":"https://api.github.com/users/vkuznet/orgs","repos_url":"https://api.github.com/users/vkuznet/repos","events_url":"https://api.github.com/users/vkuznet/events{/privacy}","received_events_url":"https://api.github.com/users/vkuznet/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":20,"created_at":"2017-11-29T12:47:08Z","updated_at":"2017-12-11T14:26:29Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"The newly deployed microservice is responding on cmsweb-testbed, e.g.\r\n```\r\nscurl https://cmsweb-testbed.cern.ch/microservice/data/status\r\n{\"result\": [\r\n {\"microservice\": \"UnifiedTransferorManager\", \"request\": {}, \"results\": {\"status\": {}}}\r\n]}\r\n```\r\nbut I can't place post request to query WQ, e.g.\r\n```\r\nscurl -X POST -H \"Content-type: application/json\" -d '{\"request\":{\"process\":\"assignment-approved\"}}'\r\nhttps://cmsweb-testbed.cern.ch/microservice/data\r\n```\r\nproduces the following traceback\r\n```\r\n[29/Nov/2017:13:30:42] vocms0131.cern.ch 128.142.137.213 \"POST /microservice/data HTTP/1.1\" 200 OK [data: 4299 in\r\n42 out 392722 us ] [auth: OK \"/DC=ch/DC=cern/OU=Organic Units/OU=Users/CN=valya/CN=443502/CN=Valentin Y\r\nKuznetsov\" \"\" ] [ref: \"\" \"curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.27.1 zlib/1.2.3 libidn/1.18\r\nlibssh2/1.4.2\" ]\r\nTraceback (most recent call last):\r\n  File\r\n\"/data/srv/beHG1712b/sw/slc6_amd64_gcc493/cms/reqmgr2ms/0.0.2/lib/python2.7/site-packages/WMCore/Services/MicroSe\r\nrvice/Unified/TaskManager.py\", line 130, in run\r\n    func(*args, **kwargs)\r\n  File\r\n\"/data/srv/beHG1712b/sw/slc6_amd64_gcc493/cms/reqmgr2ms/0.0.2/lib/python2.7/site-packages/WMCore/Services/MicroSe\r\nrvice/Unified/Transferor.py\", line 216, in process\r\n    requests = requestsInfo(state)\r\n  File\r\n\"/data/srv/beHG1712b/sw/slc6_amd64_gcc493/cms/reqmgr2ms/0.0.2/lib/python2.7/site-packages/WMCore/Services/MicroSe\r\nrvice/Unified/RequestInfo.py\", line 385, in requestsInfo\r\n    requestJobs = workqueueRequests(state)\r\n  File\r\n\"/data/srv/beHG1712b/sw/slc6_amd64_gcc493/cms/reqmgr2ms/0.0.2/lib/python2.7/site-packages/WMCore/Services/MicroSe\r\nrvice/Unified/RequestInfo.py\", line 372, in workqueueRequests\r\n    data = mgr.getdata(url, params=params, headers=headers, cert=cert(), ckey=ckey())\r\n  File\r\n\"/data/srv/beHG1712b/sw/slc6_amd64_gcc493/cms/reqmgr2ms/0.0.2/lib/python2.7/site-packages/WMCore/Services/pycurl_\r\nmanager.py\", line 262, in getdata\r\n    verbose=verbose, ckey=ckey, cert=cert, doseq=doseq, cookie=cookie)\r\n  File\r\n\"/data/srv/beHG1712b/sw/slc6_amd64_gcc493/cms/reqmgr2ms/0.0.2/lib/python2.7/site-packages/WMCore/Services/pycurl_\r\nmanager.py\", line 252, in request\r\n    raise exc\r\nHTTPException:\r\nurl=https://cmsweb.cern.ch/couchdb/workqueue/_design/WorkQueue/_view/jobsByRequest?group=true&reduce=true,\r\ncode=403, reason=Forbidden, headers={'Date': 'Wed, 29 Nov 2017 12:30:42 GMT', 'Transfer-Encoding': 'chunked',\r\n'Content-Type': 'text/html', 'CMS-Server-Time': 'D=3028 t=1511958642511950', 'Server': 'Apache'\r\n```\r\n\r\nSo, my question is how do we need to configure microservice that it will be\r\nallowed to query WQ and ReqMgr2? My understanding that we need a valid proxy or\r\nhost certificate but it looks like it is not the case on microservice backend\r\n(vocms0131).\r\n"},"comment":{"url":"https://api.github.com/repos/dmwm/WMCore/issues/comments/350738787","html_url":"https://github.com/dmwm/WMCore/issues/8370#issuecomment-350738787","issue_url":"https://api.github.com/repos/dmwm/WMCore/issues/8370","id":350738787,"user":{"login":"h4d4","id":7915148,"avatar_url":"https://avatars2.githubusercontent.com/u/7915148?v=4","gravatar_id":"","url":"https://api.github.com/users/h4d4","html_url":"https://github.com/h4d4","followers_url":"https://api.github.com/users/h4d4/followers","following_url":"https://api.github.com/users/h4d4/following{/other_user}","gists_url":"https://api.github.com/users/h4d4/gists{/gist_id}","starred_url":"https://api.github.com/users/h4d4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/h4d4/subscriptions","organizations_url":"https://api.github.com/users/h4d4/orgs","repos_url":"https://api.github.com/users/h4d4/repos","events_url":"https://api.github.com/users/h4d4/events{/privacy}","received_events_url":"https://api.github.com/users/h4d4/received_events","type":"User","site_admin":false},"created_at":"2017-12-11T14:26:29Z","updated_at":"2017-12-11T14:26:29Z","author_association":"NONE","body":"@vkuznet  \r\n\r\nHello Valentin,\r\n\r\nI've re-deployed on testbed including the PR #566.\r\nI've also create reqmgr2ms area in /data/srv/current/auth/ with proper permissions, including the dmwm certificates.\r\n\r\nThis is the part of the output when reqmgr2ms starts[1]\r\n\r\nWhen I do:\r\nhttps://cmsweb-testbed.cern.ch/microservice/data/status\r\nI got:\r\n{\"result\": [\r\n {\"microservice\": \"UnifiedTransferorManager\", \"request\": {}, \"results\": {\"status\": {}}}\r\n]}\r\n\r\nWhen I do \r\nhttps://cmsweb-testbed.cern.ch/microservice/data:\r\n\r\nI got:\r\n{\"result\": [\r\n {\"microservice\": \"UnifiedTransferorManager\", \"request\": {}, \"results\": {\"status\": {}}}\r\n]}\r\n\r\nPlease, test it and let me know how it's going.\r\n\r\nBest Regards, Lina.\r\n\r\n[1]\r\nstarting reqmgr2ms\r\nX509_USER_CERT=/data/srv/current/auth/reqmgr2ms/dmwm-service-cert.pem\r\nX509_USER_KEY=/data/srv/current/auth/reqmgr2ms/dmwm-service-key.pem"}}
{"actor":{"display_login":"h4d4"}}