{"action":"opened","number":1869,"pull_request":{"url":"https://api.github.com/repos/processone/ejabberd/pulls/1869","id":130712877,"html_url":"https://github.com/processone/ejabberd/pull/1869","diff_url":"https://github.com/processone/ejabberd/pull/1869.diff","patch_url":"https://github.com/processone/ejabberd/pull/1869.patch","issue_url":"https://api.github.com/repos/processone/ejabberd/issues/1869","number":1869,"state":"open","locked":false,"title":"Fix ERLANG_OPTS when setting INET_DIST_INTERFACE","user":{"login":"wahjava","id":2255192,"avatar_url":"https://avatars4.githubusercontent.com/u/2255192?v=4","gravatar_id":"","url":"https://api.github.com/users/wahjava","html_url":"https://github.com/wahjava","followers_url":"https://api.github.com/users/wahjava/followers","following_url":"https://api.github.com/users/wahjava/following{/other_user}","gists_url":"https://api.github.com/users/wahjava/gists{/gist_id}","starred_url":"https://api.github.com/users/wahjava/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wahjava/subscriptions","organizations_url":"https://api.github.com/users/wahjava/orgs","repos_url":"https://api.github.com/users/wahjava/repos","events_url":"https://api.github.com/users/wahjava/events{/privacy}","received_events_url":"https://api.github.com/users/wahjava/received_events","type":"User","site_admin":false},"body":"When specifying an IP address in INET_DIST_INTERFACE, `ejabberdctl` breaks due to excessive use of quote characters, as quote characters are being passed as command-line arguments by shell:\r\n\r\n    λ sudo -u ejabberd -H sh -x ejabberdctl --node ejabberd@chateau.d.if status\r\n    + POLL=true\r\n    + SMP=auto\r\n    + ERL_MAX_PORTS=32000\r\n    + ERL_PROCESSES=250000\r\n    + ERL_MAX_ETS_TABLES=1400\r\n    + FIREWALL_WINDOW=''\r\n    + ERLANG_NODE=ejabberd@localhost\r\n    + ERL=/usr/local/bin/erl\r\n    + IEX=/usr/local/bin/iex\r\n    + EPMD=/usr/local/bin/epmd\r\n    + INSTALLUSER=''\r\n    + EXEC_CMD=false\r\n    + [ -n '' ]\r\n    + EXEC_CMD=as_current_user\r\n    + [ as_current_user '=' false ]\r\n    + ERLANG_NODE_ARG=ejabberd@chateau.d.if\r\n    + shift\r\n    + shift\r\n    + break\r\n    + : /usr/local/etc/ejabberd\r\n    + : /var/log/ejabberd\r\n    + : /var/spool/ejabberd\r\n    + : /usr/local/etc/ejabberd/ejabberd.yml\r\n    + : /usr/local/etc/ejabberd/ejabberdctl.cfg\r\n    + [ -f /usr/local/etc/ejabberd/ejabberdctl.cfg ]\r\n    + . /usr/local/etc/ejabberd/ejabberdctl.cfg\r\n    + FIREWALL_WINDOW=4200-4210\r\n    + INET_DIST_INTERFACE=172.16.0.2\r\n    + [ ejabberd@chateau.d.if '!=' '' ]\r\n    + ERLANG_NODE=ejabberd@chateau.d.if\r\n    + [ ejabberd@chateau.d.if '=' ejabberd@chateau.d ]\r\n    + : /usr/local/share/doc/ejabberd\r\n    + : /var/log/ejabberd/ejabberd.log\r\n    + ERLANG_OPTS='+K true -smp auto +P 250000 '\r\n    + [ 4200-4210 '!=' '' ]\r\n    + ERLANG_OPTS='+K true -smp auto +P 250000  -kernel         inet_dist_listen_min 4200         inet_dist_listen_max 4210'\r\n    + [ 172.16.0.2 '!=' '' ]\r\n    + /usr/local/bin/erl -noshell -eval 'case inet:parse_address(\"172.16.0.2\") of {ok,IP} -> io:format(\"~p\",[IP]); _ -> ok end.' -s erlang halt\r\n    + INET_DIST_INTERFACE2={172,16,0,2}\r\n    + [ {172,16,0,2} '!=' '' ]\r\n    + ERLANG_OPTS='+K true -smp auto +P 250000  -kernel         inet_dist_listen_min 4200         inet_dist_listen_max 4210 -kernel inet_dist_use_interface \"{172,16,0,2}\"'\r\n    + ERL_LIBS=/usr/local/lib/erlang/lib/ejabberd-17.07\r\n    + ERL_LIBS=/usr/local/lib/erlang/lib/ejabberd-17.07:/usr/local/lib/erlang/lib/ejabberd-17.07/lib\r\n    + date +%Y%m%d-%H%M%S\r\n    + ERL_CRASH_DUMP=/var/log/ejabberd/erl_crash_20170715-164125.dump\r\n    + ERL_INETRC=/usr/local/etc/ejabberd/inetrc\r\n    + sed '/^log_rate_limit/!d;s/:[ \\t]*\\([0-9]*\\).*/ \\1/;s/^/ /' /usr/local/etc/ejabberd/ejabberd.yml\r\n    + sed '/^log_rotate_size/!d;s/:[ \\t]*\\([0-9]*\\).*/ \\1/;s/^/ /' /usr/local/etc/ejabberd/ejabberd.yml\r\n    + sed '/^log_rotate_count/!d;s/:[ \\t]*\\([0-9]*\\).*/ \\1/;s/^/ /' /usr/local/etc/ejabberd/ejabberd.yml\r\n    + sed '/^log_rotate_date/!d;s/:[ \\t]*\\(.[^ ]*\\).*/ \\1/;s/^/ /' /usr/local/etc/ejabberd/ejabberd.yml\r\n    + EJABBERD_OPTS=' log_rate_limit 100 log_rotate_size 10485760 log_rotate_count 1 log_rotate_date \"\"'\r\n    + [ -n ' log_rate_limit 100 log_rotate_size 10485760 log_rotate_count 1 log_rotate_date \"\"' ]\r\n    + EJABBERD_OPTS='-ejabberd  log_rate_limit 100 log_rotate_size 10485760 log_rotate_count 1 log_rotate_date \"\"'\r\n    + EJABBERD_OPTS='-mnesia dir \"/var/spool/ejabberd\"  -ejabberd  log_rate_limit 100 log_rotate_size 10485760 log_rotate_count 1 log_rotate_date \"\" -s ejabberd'\r\n    + export EJABBERD_CONFIG_PATH\r\n    + export EJABBERD_LOG_PATH\r\n    + export EJABBERD_DOC_PATH\r\n    + export EJABBERD_PID_PATH\r\n    + export ERL_CRASH_DUMP\r\n    + export ERL_EPMD_ADDRESS\r\n    + export ERL_INETRC\r\n    + export ERL_MAX_PORTS\r\n    + export ERL_MAX_ETS_TABLES\r\n    + export CONTRIB_MODULES_PATH\r\n    + export CONTRIB_MODULES_CONF_DIR\r\n    + export ERL_LIBS\r\n    + uid ctl\r\n    + uuidgen\r\n    + uuid=5764ad31-694e-11e7-84a1-408d5c4a96e3\r\n    + [ -z 5764ad31-694e-11e7-84a1-408d5c4a96e3 -a -f /proc/sys/kernel/random/uuid ]\r\n    + [ -z 5764ad31-694e-11e7-84a1-408d5c4a96e3 ]\r\n    + uuid=5764ad31\r\n    + [ 1 -eq 0 ]\r\n    + [ 1 -eq 1 ]\r\n    + echo 5764ad31-ctl-ejabberd@chateau.d.if\r\n    + [ 1 -eq 2 ]\r\n    + exec_erl 5764ad31-ctl-ejabberd@chateau.d.if -hidden -noinput -s ejabberd_ctl -extra ejabberd@chateau.d.if status\r\n    + NODE=5764ad31-ctl-ejabberd@chateau.d.if\r\n    + shift\r\n    + exec_cmd /usr/local/bin/erl -name 5764ad31-ctl-ejabberd@chateau.d.if +K true -smp auto +P 250000 -kernel inet_dist_listen_min 4200 inet_dist_listen_max 4210 -kernel inet_dist_use_interface '\"{172,16,0,2}\"' -hidden -noinput -s ejabberd_ctl -extra ejabberd@chateau.d.if status\r\n    + /usr/local/bin/erl -name 5764ad31-ctl-ejabberd@chateau.d.if +K true -smp auto +P 250000 -kernel inet_dist_listen_min 4200 inet_dist_listen_max 4210 -kernel inet_dist_use_interface '\"{172,16,0,2}\"' -hidden -noinput -s ejabberd_ctl -extra ejabberd@chateau.d.if status\r\n    Protocol 'inet_tcp': register/listen error: badarg\r\n    + result=1\r\n    + :\r\n    + exit 1\r\n\r\nThe mentioned diff fixes the issue. OS in the question is `FreeBSD 11.0-RELEASE` (amd64), but I think it's reproducible on GNU/Linux as well.\r\n\r\nHTH","created_at":"2017-07-15T11:25:01Z","updated_at":"2017-07-15T11:25:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/processone/ejabberd/pulls/1869/commits","review_comments_url":"https://api.github.com/repos/processone/ejabberd/pulls/1869/comments","review_comment_url":"https://api.github.com/repos/processone/ejabberd/pulls/comments{/number}","comments_url":"https://api.github.com/repos/processone/ejabberd/issues/1869/comments","statuses_url":"https://api.github.com/repos/processone/ejabberd/statuses/95613a11ab65a87a932e4fa3106289ec16f5901f","head":{"label":"wahjava:master","ref":"master","sha":"95613a11ab65a87a932e4fa3106289ec16f5901f","user":{"login":"wahjava","id":2255192,"avatar_url":"https://avatars4.githubusercontent.com/u/2255192?v=4","gravatar_id":"","url":"https://api.github.com/users/wahjava","html_url":"https://github.com/wahjava","followers_url":"https://api.github.com/users/wahjava/followers","following_url":"https://api.github.com/users/wahjava/following{/other_user}","gists_url":"https://api.github.com/users/wahjava/gists{/gist_id}","starred_url":"https://api.github.com/users/wahjava/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wahjava/subscriptions","organizations_url":"https://api.github.com/users/wahjava/orgs","repos_url":"https://api.github.com/users/wahjava/repos","events_url":"https://api.github.com/users/wahjava/events{/privacy}","received_events_url":"https://api.github.com/users/wahjava/received_events","type":"User","site_admin":false},"repo":{"id":97310952,"name":"ejabberd","full_name":"wahjava/ejabberd","owner":{"login":"wahjava","id":2255192,"avatar_url":"https://avatars4.githubusercontent.com/u/2255192?v=4","gravatar_id":"","url":"https://api.github.com/users/wahjava","html_url":"https://github.com/wahjava","followers_url":"https://api.github.com/users/wahjava/followers","following_url":"https://api.github.com/users/wahjava/following{/other_user}","gists_url":"https://api.github.com/users/wahjava/gists{/gist_id}","starred_url":"https://api.github.com/users/wahjava/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wahjava/subscriptions","organizations_url":"https://api.github.com/users/wahjava/orgs","repos_url":"https://api.github.com/users/wahjava/repos","events_url":"https://api.github.com/users/wahjava/events{/privacy}","received_events_url":"https://api.github.com/users/wahjava/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/wahjava/ejabberd","description":"Robust, ubiquitous and massively scalable Jabber / XMPP Instant Messaging platform","fork":true,"url":"https://api.github.com/repos/wahjava/ejabberd","forks_url":"https://api.github.com/repos/wahjava/ejabberd/forks","keys_url":"https://api.github.com/repos/wahjava/ejabberd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wahjava/ejabberd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wahjava/ejabberd/teams","hooks_url":"https://api.github.com/repos/wahjava/ejabberd/hooks","issue_events_url":"https://api.github.com/repos/wahjava/ejabberd/issues/events{/number}","events_url":"https://api.github.com/repos/wahjava/ejabberd/events","assignees_url":"https://api.github.com/repos/wahjava/ejabberd/assignees{/user}","branches_url":"https://api.github.com/repos/wahjava/ejabberd/branches{/branch}","tags_url":"https://api.github.com/repos/wahjava/ejabberd/tags","blobs_url":"https://api.github.com/repos/wahjava/ejabberd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wahjava/ejabberd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wahjava/ejabberd/git/refs{/sha}","trees_url":"https://api.github.com/repos/wahjava/ejabberd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wahjava/ejabberd/statuses/{sha}","languages_url":"https://api.github.com/repos/wahjava/ejabberd/languages","stargazers_url":"https://api.github.com/repos/wahjava/ejabberd/stargazers","contributors_url":"https://api.github.com/repos/wahjava/ejabberd/contributors","subscribers_url":"https://api.github.com/repos/wahjava/ejabberd/subscribers","subscription_url":"https://api.github.com/repos/wahjava/ejabberd/subscription","commits_url":"https://api.github.com/repos/wahjava/ejabberd/commits{/sha}","git_commits_url":"https://api.github.com/repos/wahjava/ejabberd/git/commits{/sha}","comments_url":"https://api.github.com/repos/wahjava/ejabberd/comments{/number}","issue_comment_url":"https://api.github.com/repos/wahjava/ejabberd/issues/comments{/number}","contents_url":"https://api.github.com/repos/wahjava/ejabberd/contents/{+path}","compare_url":"https://api.github.com/repos/wahjava/ejabberd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wahjava/ejabberd/merges","archive_url":"https://api.github.com/repos/wahjava/ejabberd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wahjava/ejabberd/downloads","issues_url":"https://api.github.com/repos/wahjava/ejabberd/issues{/number}","pulls_url":"https://api.github.com/repos/wahjava/ejabberd/pulls{/number}","milestones_url":"https://api.github.com/repos/wahjava/ejabberd/milestones{/number}","notifications_url":"https://api.github.com/repos/wahjava/ejabberd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wahjava/ejabberd/labels{/name}","releases_url":"https://api.github.com/repos/wahjava/ejabberd/releases{/id}","deployments_url":"https://api.github.com/repos/wahjava/ejabberd/deployments","created_at":"2017-07-15T11:14:40Z","updated_at":"2017-07-15T11:14:44Z","pushed_at":"2017-07-15T11:15:28Z","git_url":"git://github.com/wahjava/ejabberd.git","ssh_url":"git@github.com:wahjava/ejabberd.git","clone_url":"https://github.com/wahjava/ejabberd.git","svn_url":"https://github.com/wahjava/ejabberd","homepage":"http://www.process-one.net/en/ejabberd/","size":26277,"stargazers_count":0,"watchers_count":0,"language":"Erlang","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"processone:master","ref":"master","sha":"2cd193f97c785b3cbe12361f001f94381a04f246","user":{"login":"processone","id":86724,"avatar_url":"https://avatars4.githubusercontent.com/u/86724?v=4","gravatar_id":"","url":"https://api.github.com/users/processone","html_url":"https://github.com/processone","followers_url":"https://api.github.com/users/processone/followers","following_url":"https://api.github.com/users/processone/following{/other_user}","gists_url":"https://api.github.com/users/processone/gists{/gist_id}","starred_url":"https://api.github.com/users/processone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/processone/subscriptions","organizations_url":"https://api.github.com/users/processone/orgs","repos_url":"https://api.github.com/users/processone/repos","events_url":"https://api.github.com/users/processone/events{/privacy}","received_events_url":"https://api.github.com/users/processone/received_events","type":"Organization","site_admin":false},"repo":{"id":507610,"name":"ejabberd","full_name":"processone/ejabberd","owner":{"login":"processone","id":86724,"avatar_url":"https://avatars4.githubusercontent.com/u/86724?v=4","gravatar_id":"","url":"https://api.github.com/users/processone","html_url":"https://github.com/processone","followers_url":"https://api.github.com/users/processone/followers","following_url":"https://api.github.com/users/processone/following{/other_user}","gists_url":"https://api.github.com/users/processone/gists{/gist_id}","starred_url":"https://api.github.com/users/processone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/processone/subscriptions","organizations_url":"https://api.github.com/users/processone/orgs","repos_url":"https://api.github.com/users/processone/repos","events_url":"https://api.github.com/users/processone/events{/privacy}","received_events_url":"https://api.github.com/users/processone/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/processone/ejabberd","description":"Robust, ubiquitous and massively scalable Jabber / XMPP Instant Messaging platform","fork":false,"url":"https://api.github.com/repos/processone/ejabberd","forks_url":"https://api.github.com/repos/processone/ejabberd/forks","keys_url":"https://api.github.com/repos/processone/ejabberd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/processone/ejabberd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/processone/ejabberd/teams","hooks_url":"https://api.github.com/repos/processone/ejabberd/hooks","issue_events_url":"https://api.github.com/repos/processone/ejabberd/issues/events{/number}","events_url":"https://api.github.com/repos/processone/ejabberd/events","assignees_url":"https://api.github.com/repos/processone/ejabberd/assignees{/user}","branches_url":"https://api.github.com/repos/processone/ejabberd/branches{/branch}","tags_url":"https://api.github.com/repos/processone/ejabberd/tags","blobs_url":"https://api.github.com/repos/processone/ejabberd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/processone/ejabberd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/processone/ejabberd/git/refs{/sha}","trees_url":"https://api.github.com/repos/processone/ejabberd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/processone/ejabberd/statuses/{sha}","languages_url":"https://api.github.com/repos/processone/ejabberd/languages","stargazers_url":"https://api.github.com/repos/processone/ejabberd/stargazers","contributors_url":"https://api.github.com/repos/processone/ejabberd/contributors","subscribers_url":"https://api.github.com/repos/processone/ejabberd/subscribers","subscription_url":"https://api.github.com/repos/processone/ejabberd/subscription","commits_url":"https://api.github.com/repos/processone/ejabberd/commits{/sha}","git_commits_url":"https://api.github.com/repos/processone/ejabberd/git/commits{/sha}","comments_url":"https://api.github.com/repos/processone/ejabberd/comments{/number}","issue_comment_url":"https://api.github.com/repos/processone/ejabberd/issues/comments{/number}","contents_url":"https://api.github.com/repos/processone/ejabberd/contents/{+path}","compare_url":"https://api.github.com/repos/processone/ejabberd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/processone/ejabberd/merges","archive_url":"https://api.github.com/repos/processone/ejabberd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/processone/ejabberd/downloads","issues_url":"https://api.github.com/repos/processone/ejabberd/issues{/number}","pulls_url":"https://api.github.com/repos/processone/ejabberd/pulls{/number}","milestones_url":"https://api.github.com/repos/processone/ejabberd/milestones{/number}","notifications_url":"https://api.github.com/repos/processone/ejabberd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/processone/ejabberd/labels{/name}","releases_url":"https://api.github.com/repos/processone/ejabberd/releases{/id}","deployments_url":"https://api.github.com/repos/processone/ejabberd/deployments","created_at":"2010-02-08T10:37:25Z","updated_at":"2017-07-15T02:06:45Z","pushed_at":"2017-07-14T15:18:23Z","git_url":"git://github.com/processone/ejabberd.git","ssh_url":"git@github.com:processone/ejabberd.git","clone_url":"https://github.com/processone/ejabberd.git","svn_url":"https://github.com/processone/ejabberd","homepage":"http://www.process-one.net/en/ejabberd/","size":26277,"stargazers_count":3067,"watchers_count":3067,"language":"Erlang","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":972,"mirror_url":null,"open_issues_count":215,"forks":972,"open_issues":215,"watchers":3067,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/processone/ejabberd/pulls/1869"},"html":{"href":"https://github.com/processone/ejabberd/pull/1869"},"issue":{"href":"https://api.github.com/repos/processone/ejabberd/issues/1869"},"comments":{"href":"https://api.github.com/repos/processone/ejabberd/issues/1869/comments"},"review_comments":{"href":"https://api.github.com/repos/processone/ejabberd/pulls/1869/comments"},"review_comment":{"href":"https://api.github.com/repos/processone/ejabberd/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/processone/ejabberd/pulls/1869/commits"},"statuses":{"href":"https://api.github.com/repos/processone/ejabberd/statuses/95613a11ab65a87a932e4fa3106289ec16f5901f"}},"merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":1,"deletions":1,"changed_files":1}}
{"actor":{"display_login":"wahjava"}}