{"action":"created","issue":{"url":"https://api.github.com/repos/Azure/azure-diagnostics-tools/issues/166","repository_url":"https://api.github.com/repos/Azure/azure-diagnostics-tools","labels_url":"https://api.github.com/repos/Azure/azure-diagnostics-tools/issues/166/labels{/name}","comments_url":"https://api.github.com/repos/Azure/azure-diagnostics-tools/issues/166/comments","events_url":"https://api.github.com/repos/Azure/azure-diagnostics-tools/issues/166/events","html_url":"https://github.com/Azure/azure-diagnostics-tools/issues/166","id":354468236,"node_id":"MDU6SXNzdWUzNTQ0NjgyMzY=","number":166,"title":"Faraday connection failed errors in azuretopicthreadable","user":{"login":"watsonlu","id":183088,"node_id":"MDQ6VXNlcjE4MzA4OA==","avatar_url":"https://avatars2.githubusercontent.com/u/183088?v=4","gravatar_id":"","url":"https://api.github.com/users/watsonlu","html_url":"https://github.com/watsonlu","followers_url":"https://api.github.com/users/watsonlu/followers","following_url":"https://api.github.com/users/watsonlu/following{/other_user}","gists_url":"https://api.github.com/users/watsonlu/gists{/gist_id}","starred_url":"https://api.github.com/users/watsonlu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/watsonlu/subscriptions","organizations_url":"https://api.github.com/users/watsonlu/orgs","repos_url":"https://api.github.com/users/watsonlu/repos","events_url":"https://api.github.com/users/watsonlu/events{/privacy}","received_events_url":"https://api.github.com/users/watsonlu/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-08-27T20:35:22Z","updated_at":"2018-08-28T19:51:23Z","closed_at":"2018-08-28T19:51:23Z","author_association":"NONE","body":"Hey guys,\r\n\r\nI'm running the azuretopicthreadable plugin on top of the elasticsearch logstash:6.3.2 container. I'm basically doing \r\n\r\n`/usr/share/logstash/bin/logstash-plugin install logstash-input-azuretopicthreadable`\r\n\r\nwith no other modifications.\r\n\r\nwhenever I run the container, I'm getting these errors\r\n\r\n```\r\n[2018-08-27T19:24:49,098][ERROR][logstash.inputs.azuretopicthreadable] Oh My, An error occurred. Thread id:3 {:exception=>#<Faraday::ConnectionFailed>}\r\n[2018-08-27T19:26:19,358][ERROR][logstash.inputs.azuretopicthreadable] Oh My, An error occurred. Thread id:20 {:exception=>#<NoMethodError: undefined method `reason_phrase' for #<Faraday::Response:0x5555fa72>>}\r\n```\r\n\r\nfor basically every thread. \r\n\r\nMy inputs looks like this:\r\n\r\n` \r\nazuretopicthreadable\r\n         {\r\n\r\n             namespace => \"namespace1\"\r\n\r\n             access_key_name => \"Logstashk8\"\r\n\r\n             access_key => \"mysaskey\"\r\n\r\n             subscription => \"Logstash-k8-sub\"\r\n\r\n             topic => \"topic4\"\r\n\r\n             type => \"dev-application-logs\"\r\n\r\n             threads => 32\r\n\r\n             thread_sleep_time => 10\r\n\r\n         }\r\n\r\n         azuretopicthreadable\r\n\r\n         {\r\n\r\n             namespace => \"namespace1\"\r\n\r\n             access_key_name => \"Logstashk8\"\r\n\r\n             access_key => \"mysaskey\"\r\n\r\n             subscription => \"Logstash-k8-sub\"\r\n\r\n             topic => \"topic3\"\r\n\r\n             type => \"prod-application-logs\"\r\n\r\n             threads => 64\r\n\r\n             thread_sleep_time => 10\r\n\r\n         }\r\n\r\n         azuretopicthreadable\r\n\r\n         {\r\n\r\n             namespace => \"namespace1\"\r\n\r\n             access_key_name => \"Logstashk8\"\r\n\r\n             access_key => \"mysaskey\"\r\n\r\n             subscription => \"Logstash-k8-sub\"\r\n\r\n             topic => \"topic2\"\r\n\r\n             type => \"prod-application-logs\"\r\n\r\n             threads => 64\r\n\r\n             thread_sleep_time => 10\r\n\r\n         }\r\n\r\n         azuretopicthreadable\r\n\r\n         {\r\n\r\n             namespace => \"namespace1\"\r\n\r\n             access_key_name => \"Logstashk8\"\r\n\r\n             access_key => \"mysaskey\"\r\n\r\n             subscription => \"Logstash-k8-sub\"\r\n\r\n             topic => \"topic1\"\r\n\r\n             type => \"dev-application-logs\"\r\n\r\n             threads => 32\r\n\r\n             thread_sleep_time => 10\r\n         }\r\n`\r\n\r\nsome messages ARE getting in though, but not a lot. I checked the gems and they're all there, and the plugin installs successfully."},"comment":{"url":"https://api.github.com/repos/Azure/azure-diagnostics-tools/issues/comments/416717950","html_url":"https://github.com/Azure/azure-diagnostics-tools/issues/166#issuecomment-416717950","issue_url":"https://api.github.com/repos/Azure/azure-diagnostics-tools/issues/166","id":416717950,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNjcxNzk1MA==","user":{"login":"watsonlu","id":183088,"node_id":"MDQ6VXNlcjE4MzA4OA==","avatar_url":"https://avatars2.githubusercontent.com/u/183088?v=4","gravatar_id":"","url":"https://api.github.com/users/watsonlu","html_url":"https://github.com/watsonlu","followers_url":"https://api.github.com/users/watsonlu/followers","following_url":"https://api.github.com/users/watsonlu/following{/other_user}","gists_url":"https://api.github.com/users/watsonlu/gists{/gist_id}","starred_url":"https://api.github.com/users/watsonlu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/watsonlu/subscriptions","organizations_url":"https://api.github.com/users/watsonlu/orgs","repos_url":"https://api.github.com/users/watsonlu/repos","events_url":"https://api.github.com/users/watsonlu/events{/privacy}","received_events_url":"https://api.github.com/users/watsonlu/received_events","type":"User","site_admin":false},"created_at":"2018-08-28T19:51:23Z","updated_at":"2018-08-28T19:51:23Z","author_association":"NONE","body":"I figured it out, it ended up being a SAS key mistake on my end. Incredibly annoying to debug though.\r\n\r\nHowever to debug it I figured out a way to get the azure core gem to output logs that don't suck.\r\n\r\nThings that don't work:\r\n\r\n1. Installing the azure-core gem, editing the http_response file and checking the logstash logs\r\n2. Installing the azure-core gem, editing the http_response file, rebuilding the gem and installing the local gem thats been built\r\n\r\nI don't think the code posted in that issue fixes the error message issue, I even went as far as to put console outputs in that method and still got them along with the useless exceptions.\r\n\r\nThe only way I found to fix it is:\r\n\r\n1. On the logstash server, uninstall the logstash plugin\r\n2. On the logstash server, uninstall the azure-core gem using `gem uninstall azure-core`\r\n3. I'd also suggest checking the gem folder on the server to make sure that the gem is completely gone.\r\n3. Clone the azure-ruby-asm-core gem\r\n4. go into the gemspec and change the faraday runtime requirements the latest version, so right now thats:\r\n\r\n  ` s.add_runtime_dependency('faraday',                 '~> 0.15') `\r\n  ` s.add_runtime_dependency('faraday_middleware',      '~> 0.12') `\r\n\r\n5. gem build azure-core.gemspec\r\n6. Copy the gem to the server, then do `gem install azure-core --local` in the same folder as the gem\r\n7. Install the service bus logstash plugin as normal\r\n\r\nAfter that the plugin should work the same, but spit out actual useful errors logs.\r\n\r\nI'm running the modified core gem in staging and it seems fine so far, so I don't think swapping bag to the prod gem after debugging your config is necessary.\r\n\r\nNote that if you're running logstash in the offical logstash container, you need to run `ruby -s gem` before every gem command ran in the server."}}
{"actor":{"display_login":"watsonlu"}}