{"action":"created","issue":{"url":"https://api.github.com/repos/xmrig/xmrig-proxy/issues/178","repository_url":"https://api.github.com/repos/xmrig/xmrig-proxy","labels_url":"https://api.github.com/repos/xmrig/xmrig-proxy/issues/178/labels{/name}","comments_url":"https://api.github.com/repos/xmrig/xmrig-proxy/issues/178/comments","events_url":"https://api.github.com/repos/xmrig/xmrig-proxy/issues/178/events","html_url":"https://github.com/xmrig/xmrig-proxy/issues/178","id":314839401,"number":178,"title":"v2.5.2 does not connect to failover pool when main pool dies, then crashes","user":{"login":"aleqx","id":8780617,"avatar_url":"https://avatars0.githubusercontent.com/u/8780617?v=4","gravatar_id":"","url":"https://api.github.com/users/aleqx","html_url":"https://github.com/aleqx","followers_url":"https://api.github.com/users/aleqx/followers","following_url":"https://api.github.com/users/aleqx/following{/other_user}","gists_url":"https://api.github.com/users/aleqx/gists{/gist_id}","starred_url":"https://api.github.com/users/aleqx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aleqx/subscriptions","organizations_url":"https://api.github.com/users/aleqx/orgs","repos_url":"https://api.github.com/users/aleqx/repos","events_url":"https://api.github.com/users/aleqx/events{/privacy}","received_events_url":"https://api.github.com/users/aleqx/received_events","type":"User","site_admin":false},"labels":[{"id":585674422,"url":"https://api.github.com/repos/xmrig/xmrig-proxy/labels/bug","name":"bug","color":"ee0701","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-04-16T22:23:38Z","updated_at":"2018-04-17T06:12:59Z","closed_at":null,"author_association":"NONE","body":"Subj pretty much says it all. Proxy has been working fine for many hours, and then the pool crapped out (their server died) and I was expecting the proxy to automatically switch to the failover proxy.\r\n\r\nIt started saying `send failed, invalid state: 4` and also `connect error: \"connection timed out\"` ... for 17 minutes ... after 17 minutes it crashed entirely.\r\n\r\nIt also said `[2018-04-16 20:45:57] #003 no active pools, stop` which is false because the config file had 3 pools defined. Something is not working well here.\r\n\r\nThere were 10 messages `connect error: \"connection timed out\"` corresponding to the 10 retries I defined in the config file, but they were not 5 seconds apart like I defined in the config file. As you can see, the first 4 such messages were about 3 minutes apart each.\r\n\r\nConfig and log below of the session.\r\n\r\n```\r\n{\r\n    \"background\": false,\r\n    \"log-file\": \"trtl.log\",\r\n    \"access-log-file\": null,\r\n    \"retries\":10,\r\n    \"retry-pause\": 5,\r\n    \"donate-level\": 1,\r\n    \"algo\": \"cryptonight-lite\",\r\n    \"custom-diff\": 2000,\r\n    \"syslog\": false,\r\n    \"verbose\": true,\r\n    \"colors\": true,\r\n    \"workers\": true,\r\n    \"pools\": [\r\n        {\r\n            \"url\": \"trtl.mine2gether.com:5555\",\r\n            \"user\": \"<wallet>\",\r\n            \"pass\": \"x\",\r\n            \"variant\": 1,\r\n        },\r\n        {\r\n            \"url\": \"eu.turtlepool.space:7777\",\r\n            \"user\": \"<wallet>\",\r\n            \"pass\": \"x\",\r\n            \"variant\": 1,\r\n        },\r\n        {\r\n            \"url\": \"pool.trtl.unipool.pro:9999\",\r\n            \"user\": \"<wallet>\",\r\n            \"pass\": \"x\",\r\n            \"variant\": 1,\r\n        },\r\n    ],\r\n    \"bind\": [\r\n        \"0.0.0.0:3333\"\r\n    ],\r\n    \"api\": {\r\n        \"port\": 0,\r\n        \"access-token\": null,\r\n        \"worker-id\": null\r\n    }\r\n}\r\n```\r\n\r\nHere's the log.\r\n\r\n```\r\n[2018-04-16 20:37:35] 13.33 kH/s, shares: 609251/0 +16, upstreams: 4, miners: <edited> (max <edited>) +0/-0\r\n[2018-04-16 20:38:35] 13.50 kH/s, shares: 609416/0 +16, upstreams: 4, miners: <edited> (max <edited>) +0/-0\r\n[2018-04-16 20:39:35] 11.50 kH/s, shares: 609557/0 +14, upstreams: 4, miners: <edited> (max <edited>) +0/-0\r\n[2018-04-16 20:40:35] 0.00 kH/s, shares: 609557/0 +0, upstreams: 4, miners: <edited> (max <edited>) +1/-1\r\n[2018-04-16 20:41:35] 0.00 kH/s, shares: 609557/0 +0, upstreams: 4, miners: <edited> (max <edited>) +1/-5\r\n[2018-04-16 20:42:35] 0.00 kH/s, shares: 609557/0 +0, upstreams: 4, miners: <edited> (max <edited>) +1/-1\r\n[2018-04-16 20:43:35] 0.00 kH/s, shares: 609557/0 +0, upstreams: 4, miners: <edited> (max <edited>) +1/-1\r\n[2018-04-16 20:44:35] 0.00 kH/s, shares: 609557/0 +0, upstreams: 4, miners: <edited> (max <edited>) +5/-4\r\n[2018-04-16 20:45:35] 0.00 kH/s, shares: 609557/0 +0, upstreams: 4, miners: <edited> (max <edited>) +8/-1\r\n[2018-04-16 20:45:43] [trtl.mine2gether.com:5555] send failed, invalid state: 4\r\n[2018-04-16 20:45:44] [trtl.mine2gether.com:5555] send failed, invalid state: 4\r\n[2018-04-16 20:45:45] [trtl.mine2gether.com:5555] send failed, invalid state: 4\r\n[2018-04-16 20:45:46] [trtl.mine2gether.com:5555] send failed, invalid state: 4\r\n[2018-04-16 20:45:47] [trtl.mine2gether.com:5555] send failed, invalid state: 4\r\n[2018-04-16 20:45:47] [trtl.mine2gether.com:5555] send failed, invalid state: 4\r\n[2018-04-16 20:45:47] [trtl.mine2gether.com:5555] send failed, invalid state: 4\r\n[2018-04-16 20:45:48] [trtl.mine2gether.com:5555] send failed, invalid state: 4\r\n[2018-04-16 20:45:48] [trtl.mine2gether.com:5555] send failed, invalid state: 4\r\n[2018-04-16 20:45:48] [trtl.mine2gether.com:5555] send failed, invalid state: 4\r\n[2018-04-16 20:45:50] [trtl.mine2gether.com:5555] send failed, invalid state: 4\r\n[2018-04-16 20:45:55] [trtl.mine2gether.com:5555] send failed, invalid state: 4\r\n[2018-04-16 20:45:55] [trtl.mine2gether.com:5555] send failed, invalid state: 4\r\n[2018-04-16 20:45:55] [trtl.mine2gether.com:5555] send failed, invalid state: 4\r\n[2018-04-16 20:45:56] [trtl.mine2gether.com:5555] send failed, invalid state: 4\r\n[2018-04-16 20:45:56] [trtl.mine2gether.com:5555] send failed, invalid state: 4\r\n[2018-04-16 20:45:57] [trtl.mine2gether.com:5555] timeout\r\n[2018-04-16 20:45:57] #003 no active pools, stop\r\n[2018-04-16 20:45:57] [trtl.mine2gether.com:5555] send failed, invalid state: 4\r\n[2018-04-16 20:45:58] [trtl.mine2gether.com:5555] send failed, invalid state: 4\r\n\r\n[... HUNDREDS MESSAGES of \"send failed, invalid state: 4\" ...]\r\n\r\n[2018-04-16 20:48:11] [trtl.mine2gether.com:5555] send failed, invalid state: 4\r\n[2018-04-16 20:48:11] [trtl.mine2gether.com:5555] send failed, invalid state: 4\r\n[2018-04-16 20:48:12] [trtl.mine2gether.com:5555] connect error: \"connection timed out\"\r\n[2018-04-16 20:48:13] [trtl.mine2gether.com:5555] send failed, invalid state: 4\r\n[2018-04-16 20:48:13] [trtl.mine2gether.com:5555] send failed, invalid state: 4\r\n\r\n[... HUNDREDS MESSAGES of \"send failed, invalid state: 4\" ...]\r\n\r\n[2018-04-16 20:50:24] [trtl.mine2gether.com:5555] send failed, invalid state: 4\r\n[2018-04-16 20:50:25] [trtl.mine2gether.com:5555] send failed, invalid state: 4\r\n[2018-04-16 20:50:27] [trtl.mine2gether.com:5555] connect error: \"connection timed out\"\r\n[2018-04-16 20:50:29] [trtl.mine2gether.com:5555] send failed, invalid state: 4\r\n[2018-04-16 20:50:31] [trtl.mine2gether.com:5555] send failed, invalid state: 4\r\n\r\n[... HUNDREDS MESSAGES of \"send failed, invalid state: 4\" ...]\r\n\r\n[2018-04-16 20:52:42] [trtl.mine2gether.com:5555] send failed, invalid state: 4\r\n[2018-04-16 20:52:42] [trtl.mine2gether.com:5555] send failed, invalid state: 4\r\n[2018-04-16 20:52:42] [trtl.mine2gether.com:5555] connect error: \"connection timed out\"\r\n[2018-04-16 20:52:43] [trtl.mine2gether.com:5555] send failed, invalid state: 4\r\n[2018-04-16 20:52:43] [trtl.mine2gether.com:5555] send failed, invalid state: 4\r\n\r\n[... HUNDREDS MESSAGES of \"send failed, invalid state: 4\" ...]\r\n\r\n[2018-04-16 20:54:57] [trtl.mine2gether.com:5555] send failed, invalid state: 4\r\n[2018-04-16 20:54:57] [trtl.mine2gether.com:5555] send failed, invalid state: 4\r\n[2018-04-16 20:54:58] [trtl.mine2gether.com:5555] connect error: \"connection timed out\"\r\n[2018-04-16 20:54:58] [trtl.mine2gether.com:5555] send failed, invalid state: 4\r\n[2018-04-16 20:54:58] [trtl.mine2gether.com:5555] send failed, invalid state: 4\r\n\r\n[... HUNDREDS MESSAGES of \"send failed, invalid state: 4\" ...]\r\n\r\n[2018-04-16 20:55:05] [trtl.mine2gether.com:5555] send failed, invalid state: 4\r\n[2018-04-16 20:55:06] #002 no active pools, stop\r\n[2018-04-16 20:55:06] [trtl.mine2gether.com:5555] send failed, invalid state: 4\r\n[2018-04-16 20:55:07] [trtl.mine2gether.com:5555] send failed, invalid state: 4\r\n[2018-04-16 20:55:08] #001 no active pools, stop\r\n[2018-04-16 20:55:08] [trtl.mine2gether.com:5555] send failed, invalid state: 4\r\n[2018-04-16 20:55:10] [trtl.mine2gether.com:5555] send failed, invalid state: 4\r\n[2018-04-16 20:55:11] [trtl.mine2gether.com:5555] send failed, invalid state: 4\r\n[2018-04-16 20:55:11] [trtl.mine2gether.com:5555] send failed, invalid state: 4\r\n[2018-04-16 20:55:11] [trtl.mine2gether.com:5555] send failed, invalid state: 4\r\n[2018-04-16 20:55:11] [trtl.mine2gether.com:5555] send failed, invalid state: 4\r\n[2018-04-16 20:55:12] [trtl.mine2gether.com:5555] send failed, invalid state: 4\r\n[2018-04-16 20:55:13] [trtl.mine2gether.com:5555] send failed, invalid state: 4\r\n[2018-04-16 20:55:14] #000 no active pools, stop\r\n[2018-04-16 20:55:35] 0.00 kH/s, shares: 609557/0 +0, upstreams: 0, miners: <edited> (max <edited>) +0/-1\r\n[2018-04-16 20:56:17] [trtl.mine2gether.com:5555] connect error: \"connection timed out\"\r\n[2018-04-16 20:56:35] 0.00 kH/s, shares: 609557/0 +0, upstreams: 0, miners: <edited> (max <edited>) +0/-0\r\n[2018-04-16 20:57:13] [trtl.mine2gether.com:5555] connect error: \"connection timed out\"\r\n[2018-04-16 20:57:21] [trtl.mine2gether.com:5555] connect error: \"connection timed out\"\r\n[2018-04-16 20:57:23] [trtl.mine2gether.com:5555] connect error: \"connection timed out\"\r\n[2018-04-16 20:57:29] [trtl.mine2gether.com:5555] connect error: \"connection timed out\"\r\n[2018-04-16 20:57:35] 0.00 kH/s, shares: 609557/0 +0, upstreams: 0, miners: <edited> (max <edited>) +0/-0\r\n[2018-04-16 20:57:41] [trtl.mine2gether.com:5555] connect error: \"connection timed out\"\r\nxmrig-proxy: src/unix/stream.c:1230: uv__stream_io: Assertion `!(stream->flags & UV_CLOSING)' failed.\r\nAborted (core dumped)\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/xmrig/xmrig-proxy/issues/comments/381858342","html_url":"https://github.com/xmrig/xmrig-proxy/issues/178#issuecomment-381858342","issue_url":"https://api.github.com/repos/xmrig/xmrig-proxy/issues/178","id":381858342,"user":{"login":"xmrig","id":27528955,"avatar_url":"https://avatars3.githubusercontent.com/u/27528955?v=4","gravatar_id":"","url":"https://api.github.com/users/xmrig","html_url":"https://github.com/xmrig","followers_url":"https://api.github.com/users/xmrig/followers","following_url":"https://api.github.com/users/xmrig/following{/other_user}","gists_url":"https://api.github.com/users/xmrig/gists{/gist_id}","starred_url":"https://api.github.com/users/xmrig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xmrig/subscriptions","organizations_url":"https://api.github.com/users/xmrig/orgs","repos_url":"https://api.github.com/users/xmrig/repos","events_url":"https://api.github.com/users/xmrig/events{/privacy}","received_events_url":"https://api.github.com/users/xmrig/received_events","type":"User","site_admin":false},"created_at":"2018-04-17T06:12:59Z","updated_at":"2018-04-17T06:12:59Z","author_association":"OWNER","body":"state 4 is `ClosingState` socket somehow stuck in it and failover not start because of it, I will try simulate connection timeout. In v2.5 added more graceful connection close sequence, but look like there is a bug.\r\nThank you. "}}
{"actor":{"display_login":"xmrig"}}