{"action":"created","issue":{"url":"https://api.github.com/repos/tarantool/tarantool/issues/1733","repository_url":"https://api.github.com/repos/tarantool/tarantool","labels_url":"https://api.github.com/repos/tarantool/tarantool/issues/1733/labels{/name}","comments_url":"https://api.github.com/repos/tarantool/tarantool/issues/1733/comments","events_url":"https://api.github.com/repos/tarantool/tarantool/issues/1733/events","html_url":"https://github.com/tarantool/tarantool/issues/1733","id":174323312,"number":1733,"title":"net.box connection not re-established after a disconnect","user":{"login":"viciious","id":1173058,"avatar_url":"https://avatars.githubusercontent.com/u/1173058?v=3","gravatar_id":"","url":"https://api.github.com/users/viciious","html_url":"https://github.com/viciious","followers_url":"https://api.github.com/users/viciious/followers","following_url":"https://api.github.com/users/viciious/following{/other_user}","gists_url":"https://api.github.com/users/viciious/gists{/gist_id}","starred_url":"https://api.github.com/users/viciious/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/viciious/subscriptions","organizations_url":"https://api.github.com/users/viciious/orgs","repos_url":"https://api.github.com/users/viciious/repos","events_url":"https://api.github.com/users/viciious/events{/privacy}","received_events_url":"https://api.github.com/users/viciious/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-08-31T16:48:10Z","updated_at":"2016-09-06T18:40:43Z","closed_at":"2016-08-31T17:11:06Z","body":"t1.lua\r\n```\r\nbox.cfg{listen=12123}\r\n\r\nfunction hello() print('hello') end\r\n\r\nbox.schema.func.create('hello', {if_not_exists = true})\r\nbox.schema.user.grant('guest', 'execute', 'function', 'hello', {if_not_exists = true})\r\n```\r\n\r\nt2.lua\r\n```\r\nlocal net_box = require('net.box')\r\nlocal fiber = require('fiber')\r\n\r\nbox.cfg{}\r\n\r\ncf = fiber.create(function()\r\n    local conn = net_box.new('127.0.0.1:12123')\r\n    while true do\r\n        conn:timeout(10):call('hello')\r\n        fiber.sleep(1)\r\n    end\r\nend)\r\n\r\nmon = fiber.create(function()\r\n    while true do\r\n        print(cf:status())\r\n        fiber.sleep(1)\r\n    end\r\nend)\r\n```\r\n\r\nSteps to reproduce:\r\n- start the first tarantool instance: `tarantool t1.lua`\r\n- start the second tarantool instance: `tarantool t2.lua`\r\n- watch the first and the second instances print \"hello\" and \"suspended\" at 1s intervals respectively\r\n- restart the first instance\r\n- see the 'cf' fiber die in the second instance:\r\n\r\n> 2016-08-31 19:40:39.437 [86256] main/106/net.box.read net_box.lua:503 W> 127.0.0.1:12123: Remote host closed connection\r\nsuspended\r\n2016-08-31 19:40:39.861 [86256] main/104/lua net_box.lua:915 E> ER_NO_CONNECTION: Connection is not established\r\ndead\r\n\r\nThe observed behavior doesn't match the documentation on net.box.new():\r\n> net_box.new(URI[, {option[s]}])\r\nCreate a new connection. The connection is established on demand, at the time of the first request. It is re-established automatically after a disconnect.\r\n\r\nhttps://tarantool.org/doc/reference_lua/net_box.html"},"comment":{"url":"https://api.github.com/repos/tarantool/tarantool/issues/comments/245048114","html_url":"https://github.com/tarantool/tarantool/issues/1733#issuecomment-245048114","issue_url":"https://api.github.com/repos/tarantool/tarantool/issues/1733","id":245048114,"user":{"login":"mejedi","id":1164291,"avatar_url":"https://avatars.githubusercontent.com/u/1164291?v=3","gravatar_id":"","url":"https://api.github.com/users/mejedi","html_url":"https://github.com/mejedi","followers_url":"https://api.github.com/users/mejedi/followers","following_url":"https://api.github.com/users/mejedi/following{/other_user}","gists_url":"https://api.github.com/users/mejedi/gists{/gist_id}","starred_url":"https://api.github.com/users/mejedi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mejedi/subscriptions","organizations_url":"https://api.github.com/users/mejedi/orgs","repos_url":"https://api.github.com/users/mejedi/repos","events_url":"https://api.github.com/users/mejedi/events{/privacy}","received_events_url":"https://api.github.com/users/mejedi/received_events","type":"User","site_admin":false},"created_at":"2016-09-06T18:40:43Z","updated_at":"2016-09-06T18:40:43Z","body":"@viciious \r\nAvailable in 1.6 as well."}}
{"actor":{"display_login":"mejedi"}}