{"action":"created","issue":{"url":"https://api.github.com/repos/Z-Wave-Me/home-automation/issues/287","labels_url":"https://api.github.com/repos/Z-Wave-Me/home-automation/issues/287/labels{/name}","comments_url":"https://api.github.com/repos/Z-Wave-Me/home-automation/issues/287/comments","events_url":"https://api.github.com/repos/Z-Wave-Me/home-automation/issues/287/events","html_url":"https://github.com/Z-Wave-Me/home-automation/issues/287","id":113473303,"number":287,"title":"Problem when restarting z-way-server","user":{"login":"MarioGravel","id":14111466,"avatar_url":"https://avatars.githubusercontent.com/u/14111466?v=3","gravatar_id":"","url":"https://api.github.com/users/MarioGravel","html_url":"https://github.com/MarioGravel","followers_url":"https://api.github.com/users/MarioGravel/followers","following_url":"https://api.github.com/users/MarioGravel/following{/other_user}","gists_url":"https://api.github.com/users/MarioGravel/gists{/gist_id}","starred_url":"https://api.github.com/users/MarioGravel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarioGravel/subscriptions","organizations_url":"https://api.github.com/users/MarioGravel/orgs","repos_url":"https://api.github.com/users/MarioGravel/repos","events_url":"https://api.github.com/users/MarioGravel/events{/privacy}","received_events_url":"https://api.github.com/users/MarioGravel/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-10-26T23:38:46Z","updated_at":"2015-12-03T07:19:50Z","closed_at":null,"body":"Hi, I got some issues when restarting z-way-server.\r\nwhen doing `sudo service z-way-server restart` the process don't die.\r\nI got an error \r\n```\r\n[2015-10-26 23:37:08.687] [E] [core] result: Error: Error: Cannot set port to 8083: Cannot bind to port\r\n    at Error (native)\r\n    at automation/Webserver.js:4:6\r\n    at automation/main.js:60:5\r\n[2015-10-26 23:37:08.690] [E] [core] result: Error: Error: Uncaught Error: Cannot set port to 8083: Cannot bind to port\r\n    at Error (native)\r\n    at automation/main.js:60:5\r\n```\r\n\r\nI changed the webserver.js to use the port 8082, save it and called the restart again.\r\nHere how it looks now.\r\n```\r\n~ $ sudo lsof -Pnl +M -i4\r\nCOMMAND     PID     USER   FD   TYPE DEVICE SIZE/OFF NODE NAME\r\ndhclient   2073        0    7u  IPv4   9393      0t0  UDP *:68\r\ndhclient   2073        0   20u  IPv4   9383      0t0  UDP *:15556\r\nmongoose   2186        0    3u  IPv4   6896      0t0  TCP *:8084 (LISTEN)\r\nmongoose   2186        0    4u  IPv4   6897      0t0  TCP *:443 (LISTEN)\r\nvsftpd     2202        0    3u  IPv4   7434      0t0  TCP *:21 (LISTEN)\r\nntpd       2279      102   16u  IPv4   8746      0t0  UDP *:123\r\nntpd       2279      102   17u  IPv4   8750      0t0  UDP 127.0.0.1:123\r\nntpd       2279      102   18u  IPv4   8751      0t0  UDP 192.168.1.115:123\r\nsshd       2316        0    3u  IPv4   8771      0t0  TCP *:22 (LISTEN)\r\navahi-dae  2352      107   13u  IPv4   9442      0t0  UDP *:5353\r\navahi-dae  2352      107   14u  IPv4   9444      0t0  UDP *:37808\r\nmysqld     2750      109   10u  IPv4   9513      0t0  TCP 127.0.0.1:3306 (LISTEN)\r\nssh        2921        0    3u  IPv4   9734      0t0  TCP 192.168.1.115:35535->46.20.244.72:22 (ESTABLISHED)\r\nsshd      23979        0    3u  IPv4 331350      0t0  TCP 192.168.1.115:22->192.168.1.138:50706 (ESTABLISHED)\r\nsshd      23983     1000    3u  IPv4 331350      0t0  TCP 192.168.1.115:22->192.168.1.138:50706 (ESTABLISHED)\r\nz-way-ser 24028        0    4u  IPv4 331872      0t0  UDP 127.0.0.1:45164->127.0.0.1:44751\r\nz-way-ser 24028        0    5u  IPv4 331873      0t0  UDP 127.0.0.1:44751->127.0.0.1:45164\r\nz-way-ser 24028        0    6u  IPv4 331874      0t0  TCP *:8083 (LISTEN)\r\nz-way-ser 24028        0    8u  IPv4 330013      0t0  TCP 192.168.1.115:8083->192.168.1.138:60561 (CLOSE_WAIT)\r\nsshd      24164        0    3u  IPv4 329992      0t0  TCP 192.168.1.115:22->192.168.1.138:63758 (ESTABLISHED)\r\nsshd      24168     1000    3u  IPv4 329992      0t0  TCP 192.168.1.115:22->192.168.1.138:63758 (ESTABLISHED)\r\nz-way-ser 24181        0    4u  IPv4 330005      0t0  UDP 127.0.0.1:34516->127.0.0.1:58735\r\nz-way-ser 24181        0    5u  IPv4 330006      0t0  UDP 127.0.0.1:58735->127.0.0.1:34516\r\nz-way-ser 24181        0    6u  IPv4 330007      0t0  TCP *:8082 (LISTEN)\r\n```\r\nso it looks like the old process is still running (PID 24028) and listening to 8083.\r\nThe new process is PID 24181 and listening to 8082.\r\nI need to call `kill -9 24028` to free the port.\r\nalso, I'm experiencing slow / impossible login on the /smarthome interface.\r\n\r\nrestarting my Raspberry Pi don't solve it :-/\r\n"},"comment":{"url":"https://api.github.com/repos/Z-Wave-Me/home-automation/issues/comments/161539118","html_url":"https://github.com/Z-Wave-Me/home-automation/issues/287#issuecomment-161539118","issue_url":"https://api.github.com/repos/Z-Wave-Me/home-automation/issues/287","id":161539118,"user":{"login":"ronie-z-wave","id":10545480,"avatar_url":"https://avatars.githubusercontent.com/u/10545480?v=3","gravatar_id":"","url":"https://api.github.com/users/ronie-z-wave","html_url":"https://github.com/ronie-z-wave","followers_url":"https://api.github.com/users/ronie-z-wave/followers","following_url":"https://api.github.com/users/ronie-z-wave/following{/other_user}","gists_url":"https://api.github.com/users/ronie-z-wave/gists{/gist_id}","starred_url":"https://api.github.com/users/ronie-z-wave/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ronie-z-wave/subscriptions","organizations_url":"https://api.github.com/users/ronie-z-wave/orgs","repos_url":"https://api.github.com/users/ronie-z-wave/repos","events_url":"https://api.github.com/users/ronie-z-wave/events{/privacy}","received_events_url":"https://api.github.com/users/ronie-z-wave/received_events","type":"User","site_admin":false},"created_at":"2015-12-03T07:19:50Z","updated_at":"2015-12-03T07:19:50Z","body":"Hi, usually messages older than one week will be deleted every day at 00:00:00 - cause this W metering is changing ~13 times per minute it is messing up the notifications ... \r\n\r\nI think documenting meterings is only interesting for devices history but that is done separately.\r\nSo why not ignoring such electrical meterings (maybe all) in notifications?\r\n\r\nIndeed, if this file is too big, dividing it could be a better solution - we need to think about that.\r\n\r\n@PoltoS : Whats your opinion?"}}