{"action":"created","issue":{"url":"https://api.github.com/repos/troywill/foscam-zoneminder/issues/1","labels_url":"https://api.github.com/repos/troywill/foscam-zoneminder/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/troywill/foscam-zoneminder/issues/1/comments","events_url":"https://api.github.com/repos/troywill/foscam-zoneminder/issues/1/events","html_url":"https://github.com/troywill/foscam-zoneminder/issues/1","id":27775708,"number":1,"title":"Can't connect: No such file or directory","user":{"login":"exploitaration","id":2007286,"avatar_url":"https://avatars.githubusercontent.com/u/2007286?v=3","gravatar_id":"","url":"https://api.github.com/users/exploitaration","html_url":"https://github.com/exploitaration","followers_url":"https://api.github.com/users/exploitaration/followers","following_url":"https://api.github.com/users/exploitaration/following{/other_user}","gists_url":"https://api.github.com/users/exploitaration/gists{/gist_id}","starred_url":"https://api.github.com/users/exploitaration/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/exploitaration/subscriptions","organizations_url":"https://api.github.com/users/exploitaration/orgs","repos_url":"https://api.github.com/users/exploitaration/repos","events_url":"https://api.github.com/users/exploitaration/events{/privacy}","received_events_url":"https://api.github.com/users/exploitaration/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2014-02-18T08:01:38Z","updated_at":"2015-02-20T01:38:11Z","closed_at":null,"body":"I'm running zoneminder 1.26.5 on Ubuntu 12 LTS with FI8910W cameras. I installed ZM following their wiki, which meant adding their ppa and not using Ubuntu's version.\r\n\r\nI've had issues getting various control scripts (including yours) to work due to same issue:\r\n```\r\n2014-02-17 22:37:59.322350\tzmcontrol\t11924\tFAT\tCan't connect: No such file or directory\tzmcontrol.pl\t\r\n2014-02-17 22:37:49.320940\tzmcontrol\t11926\tINF\tControl server 2/FoscamFI8910W starting at 14/02/17 22:37:49\tzmcontrol.pl\t\r\n2014-02-17 22:37:49.281640\tzmcontrol\t11924\tINF\tStarting control server 2/FoscamFI8910W\tzmcontrol.pl\t\r\n```\r\nAfter learning a bit of Perl, I discovered that the issue is:\r\n```\r\nBareword \"ZM_VERSION\" not allowed while \"strict subs\" in use at /usr/share/perl/5.14.2/ZoneMinder/Control/FoscamFI8910W.pm line 79.\r\nCompilation failed in require at /usr/share/perl/5.14.2/Module/Load.pm line 27.\r\nCan't locate ZoneMinder/Control/FoscamFI8910W in @INC (@INC contains: /usr/share/perl/5.14.2 /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl .) at /usr/share/perl/5.14.2/Module/Load.pm line 27.\r\n```\r\n\r\nSo, to fix it I modified FoscamFI8910W.pm by removing the ZM_VERSION from user agent string at around line 79:\r\n```\r\n    #$self->{ua}->agent( \"ZoneMinder Control Agent/\" . ZM_VERSION );\r\n    $self->{ua}->agent( \"ZoneMinder Control Agent\" );\r\n```\r\nThis solved my issue. Perhaps there's a better way. Hope this will help few others I've seen that have similar problem.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/troywill/foscam-zoneminder/issues/comments/75175507","html_url":"https://github.com/troywill/foscam-zoneminder/issues/1#issuecomment-75175507","issue_url":"https://api.github.com/repos/troywill/foscam-zoneminder/issues/1","id":75175507,"user":{"login":"mikeubell","id":6759416,"avatar_url":"https://avatars.githubusercontent.com/u/6759416?v=3","gravatar_id":"","url":"https://api.github.com/users/mikeubell","html_url":"https://github.com/mikeubell","followers_url":"https://api.github.com/users/mikeubell/followers","following_url":"https://api.github.com/users/mikeubell/following{/other_user}","gists_url":"https://api.github.com/users/mikeubell/gists{/gist_id}","starred_url":"https://api.github.com/users/mikeubell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikeubell/subscriptions","organizations_url":"https://api.github.com/users/mikeubell/orgs","repos_url":"https://api.github.com/users/mikeubell/repos","events_url":"https://api.github.com/users/mikeubell/events{/privacy}","received_events_url":"https://api.github.com/users/mikeubell/received_events","type":"User","site_admin":false},"created_at":"2015-02-20T01:38:11Z","updated_at":"2015-02-20T01:38:11Z","body":"It appears the primary error when you see the sequence of:\r\n```javascript\r\nStarting control server\r\nControl server .... starting\r\nCan't Connect: No such file or directory\r\n```\r\nis that the server has exited, this could be because it could not load the controller file.  I the case above this would be FoscamFI891W.pm.  In my case I had misspelled the protocol name in the Controllers Capabilities screen. (F1 instead of FI).\r\nThe connection that is failing is between the primary zmcontrol process and the child it has forked to do the actual controlling. "}}