Comments (9)
permission_denied
looks like a platform issue.
You could try if another application could bind to port 80.
ncat -l -p 80
# or with sudo
sudo ncat -l -p 80
If the above works, ensure emqx runs as user root.
from emqx.
after entering the cmd nothing appear and i am running it as sudo ... It work on port 81 but not on 80 ...
from emqx.
Is there any other service listening on port 80? This can be checked with sudo netstat -tnlp
command.
from emqx.
root@remotesystem-mqtt:~# sudo netstat -tnlp
Connexions Internet actives (seulement serveurs)
Proto Recv-Q Send-Q Adresse locale Adresse distante Etat PID/Program name
tcp 0 0 0.0.0.0:8883 0.0.0.0:* LISTEN 21093/emqx
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 430/sshd: /usr/sbin
tcp 0 0 0.0.0.0:1880 0.0.0.0:* LISTEN 21093/emqx
tcp 0 0 0.0.0.0:5370 0.0.0.0:* LISTEN 21093/emqx
tcp 0 0 0.0.0.0:1883 0.0.0.0:* LISTEN 21093/emqx
tcp 0 0 0.0.0.0:4370 0.0.0.0:* LISTEN 21093/emqx
tcp6 0 0 :::22 :::* LISTEN 430/sshd: /usr/sbin
from emqx.
It's a fresh debian install and i only install emqx community edition .. no other program ..
from emqx.
How exactly are you starting EMQX? Did you make sure that EMQX was stopped before you restarted as root? I can't reproduce this problem when I run sudo emqx console
:
sudo bin/emqx console
WARNING: Default (insecure) Erlang cookie is in use.
WARNING: Configure node.cookie in /home/me/Documents/work/emqx/_build/emqx/rel/emqx/etc/emqx.conf or override from environment variable EMQX_NODE__COOKIE
WARNING: NOTE: Use the same cookie for all nodes in the cluster.
Erlang/OTP 25 [erts-13.2.2] [emqx-8639768b7a] [64-bit] [smp:8:8] [ds:8:8:8] [async-threads:4] [jit:ns]
Listener ssl:default on 0.0.0.0:8883 started.
Listener tcp:default on 0.0.0.0:1883 started.
Listener ws:default on 0.0.0.0:8083 started.
Listener wss:default on 0.0.0.0:8084 started.
Listener http:dashboard on :80 started.
EMQX 5.3.2-g7161f9d1 is running now!
Restricted Eshell V13.2.2 (abort with ^G)
v5.3.2-g7161f9d1([email protected])1>
My guess is that the previous instance of the daemon was running, so restarting it as root didn't take any effect.
On a different note, it's not recommended to run daemons (including EMQX) as root. The simplest workaround is to make port 80 non-priviliged via sysctl net.ipv4.ip_unprivileged_port_start=80
command and run EMQX as emqx user.
from emqx.
I just reinstall everything ...
- Debian 12
- Emqx
- sysctl net.ipv4.ip_unprivileged_port_start=80
- Change dashboard to 80
- sudo emqx console
And i got this :
root@remotesystem-mqtt:~# sudo emqx console
WARNING: Default (insecure) Erlang cookie is in use.
WARNING: Configure node.cookie in /etc/emqx/emqx.conf or override from environment variable EMQX_NODE__COOKIE
WARNING: NOTE: Use the same cookie for all nodes in the cluster.
Erlang/OTP 25 [erts-13.2.2] [emqx] [64-bit] [smp:1:1] [ds:1:1:8] [async-threads:4] [jit:ns]
Listener ssl:default on 0.0.0.0:8883 started.
Listener tcp:default on 0.0.0.0:1883 started.
Listener ws:default on 0.0.0.0:8083 started.
Listener wss:default on 0.0.0.0:8084 started.
2023-11-26T11:23:27.784077+01:00 [error] Failed to start Ranch listener 'http:dashboard' in ranch_tcp:listen([{cacerts,'...'},{key,'...'},{cert,'...'},inet,{send_timeout,10000},{port,80},{backlog,1024}]) for reason eacces (permission denied)
2023-11-26T11:23:27.784181+01:00 [error] Supervisor: {<0.2812.0>,ranch_listener_sup}. Context: start_error. Reason: {listen_error,'http:dashboard',eacces}. Offender: id=ranch_acceptors_sup,pid=undefined.
2023-11-26T11:23:27.784240+01:00 [error] crasher: initial call: supervisor:ranch_acceptors_sup/1, pid: <0.2814.0>, registered_name: [], exit: {{listen_error,'http:dashboard',eacces},[{ranch_acceptors_sup,listen_error,5,[{file,"ranch_acceptors_sup.erl"},{line,66}]},{supervisor,init,1,[{file,"supervisor.erl"},{line,330}]},{gen_server,init_it,2,[{file,"gen_server.erl"},{line,851}]},{gen_server,init_it,6,[{file,"gen_server.erl"},{line,814}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,240}]}]}, ancestors: [<0.2812.0>,ranch_sup,<0.2468.0>], message_queue_len: 0, messages: [], links: [<0.2812.0>], dictionary: [{logger,error_logger}], trap_exit: true, status: running, heap_size: 1598, stack_size: 28, reductions: 4285; neighbours:
2023-11-26T11:23:27.784564+01:00 [error] msg: started_listener_failed, mfa: minirest:log_start_result/2(105), description: permission_denied, name: 'http:dashboard', port: 80, reason: eacces
2023-11-26T11:23:27.784687+01:00 [error] crasher: initial call: application_master:init/4, pid: <0.2797.0>, registered_name: [], exit: {{['http:dashboard'],{emqx_dashboard_app,start,[normal,[]]}},[{application_master,init,4,[{file,"application_master.erl"},{line,142}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,240}]}]}, ancestors: [<0.2796.0>], message_queue_len: 1, messages: [{'EXIT',<0.2798.0>,normal}], links: [<0.2796.0>,<0.2038.0>], dictionary: [], trap_exit: true, status: running, heap_size: 376, stack_size: 28, reductions: 168; neighbours:
2023-11-26T11:23:27.785481+01:00 [critical] msg: failed_to_start_app, mfa: emqx_machine_boot:start_one_app/1(116), app: emqx_dashboard, reason: {emqx_dashboard,{['http:dashboard'],{emqx_dashboard_app,start,[normal,[]]}}}
2023-11-26T11:23:27.786076+01:00 [error] Supervisor: {local,emqx_machine_sup}. Context: start_error. Reason: {'EXIT',{{failed_to_start_app,emqx_dashboard,{emqx_dashboard,{['http:dashboard'],{emqx_dashboard_app,start,[normal,[]]}}}},[{emqx_machine_boot,start_one_app,1,[{file,"emqx_machine_boot.erl"},{line,117}]},{lists,foreach_1,2,[{file,"lists.erl"},{line,1442}]},{emqx_machine_boot,ensure_apps_started,0,[{file,"emqx_machine_boot.erl"},{line,107}]},{emqx_machine_boot,post_boot,0,[{file,"emqx_machine_boot.erl"},{line,47}]},{supervisor,do_start_child_i,3,[{file,"supervisor.erl"},{line,414}]},{supervisor,do_start_child,2,[{file,"supervisor.erl"},{line,400}]},{supervisor,'-start_children/2-fun-0-',3,[{file,"supervisor.erl"},{line,384}]},{supervisor,children_map,4,[{file,"supervisor.erl"},{line,1250}]},{supervisor,init_children,2,[{file,"supervisor.erl"},{line,350}]},{gen_server,init_it,2,[{file,"gen_server.erl"},{line,851}]},{gen_server,init_it,6,[{file,"gen_server.erl"},{line,814}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,240}]}]}}. Offender: id=emqx_machine_boot,pid=undefined.
2023-11-26T11:23:27.786402+01:00 [error] crasher: initial call: application_master:init/4, pid: <0.2207.0>, registered_name: [], exit: {{{shutdown,{failed_to_start_child,emqx_machine_boot,{'EXIT',{{failed_to_start_app,emqx_dashboard,{emqx_dashboard,{['http:dashboard'],{emqx_dashboard_app,start,[normal,[]]}}}},[{emqx_machine_boot,start_one_app,1,[{file,"emqx_machine_boot.erl"},{line,117}]},{lists,foreach_1,2,[{file,"lists.erl"},{line,1442}]},{emqx_machine_boot,ensure_apps_started,0,[{file,"emqx_machine_boot.erl"},{line,107}]},{emqx_machine_boot,post_boot,0,[{file,"emqx_machine_boot.erl"},{line,47}]},{supervisor,do_start_child_i,3,[{file,"supervisor.erl"},{line,414}]},{supervisor,do_start_child,2,[{file,"supervisor.erl"},{line,400}]},{supervisor,'-start_children/2-fun-0-',3,[{file,"supervisor.erl"},{line,384}]},{supervisor,children_map,4,[{file,"supervisor.erl"},{line,1250}]},{supervisor,init_children,2,[{file,"supervisor.erl"},{line,350}]},{gen_server,init_it,2,[{file,"gen_server.erl"},{line,851}]},{gen_server,init_it,6,[{file,"gen_server.erl"},{line,814}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,240}]}]}}}},{emqx_machine_app,start,[normal,[]]}},[{application_master,init,4,[{file,"application_master.erl"},{line,142}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,240}]}]}, ancestors: [<0.2206.0>], message_queue_len: 1, messages: [{'EXIT',<0.2208.0>,normal}], links: [<0.2206.0>,<0.2038.0>], dictionary: [], trap_exit: true, status: running, heap_size: 610, stack_size: 28, reductions: 213; neighbours:
Listener ssl:default on 0.0.0.0:8883 stopped.
Listener tcp:default on 0.0.0.0:1883 stopped.
Listener ws:default on 0.0.0.0:8083 stopped.
Listener wss:default on 0.0.0.0:8084 stopped.
{"Kernel pid terminated",application_controller,"{application_start_failure,emqx_machine,{{shutdown,{failed_to_start_child,emqx_machine_boot,{'EXIT',{{failed_to_start_app,emqx_dashboard,{emqx_dashboard,{['http:dashboard'],{emqx_dashboard_app,start,[normal,[]]}}}},[{emqx_machine_boot,start_one_app,1,[{file,"emqx_machine_boot.erl"},{line,117}]},{lists,foreach_1,2,[{file,"lists.erl"},{line,1442}]},{emqx_machine_boot,ensure_apps_started,0,[{file,"emqx_machine_boot.erl"},{line,107}]},{emqx_machine_boot,post_boot,0,[{file,"emqx_machine_boot.erl"},{line,47}]},{supervisor,do_start_child_i,3,[{file,"supervisor.erl"},{line,414}]},{supervisor,do_start_child,2,[{file,"supervisor.erl"},{line,400}]},{supervisor,'-start_children/2-fun-0-',3,[{file,"supervisor.erl"},{line,384}]},{supervisor,children_map,4,[{file,"supervisor.erl"},{line,1250}]},{supervisor,init_children,2,[{file,"supervisor.erl"},{line,350}]},{gen_server,init_it,2,[{file,"gen_server.erl"},{line,851}]},{gen_server,init_it,6,[{file,"gen_server.erl"},{line,814}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,240}]}]}}}},{emqx_machine_app,start,[normal,[]]}}}"}
Kernel pid terminated (application_controller) ({application_start_failure,emqx_machine,{{shutdown,{failed_to_start_child,emqx_machine_boot,{'EXIT',{{failed_to_start_app,emqx_dashboard,{emqx_dashboard,{['http:dashboard'],{emqx_dashboard_app,start,[normal,[]]}}}},[{emqx_machine_boot,start_one_app,1,[{file,"emqx_machine_boot.erl"},{line,117}]},{lists,foreach_1,2,[{file,"lists.erl"},{line,1442}]},{emqx_machine_boot,ensure_apps_started,0,[{file,"emqx_machine_boot.erl"},{line,107}]},{emqx_machine_boot,post_boot,0,[{file,"emqx_machine_boot.erl"},{line,47}]},{supervisor,do_start_child_i,3,[{file,"supervisor.erl"},{line,414}]},{supervisor,do_start_child,2,[{file,"supervisor.erl"},{line,400}]},{supervisor,'-start_children/2-fun-0-',3,[{file,"supervisor.erl"},{line,384}]},{supervisor,children_map,4,[{file,"supervisor.erl"},{line,1250}]},{supervisor,init_children,2,[{file,"supervisor.erl"},{line,350}]},{gen_server,init_it,2,[{file,"gen_server.erl"},{line,851}]},{gen_server,init_it,6,[{file,"gen_server.erl"},{line,814}]
from emqx.
One solution is to edit /etc/sysctl.conf and add net.ipv4.ip_unprivileged_port_start=80
than reboot ..
from emqx.
Yes, if you intend to use ip_unprivileged_port_start
workaround, it has to be persisted in /etc/sysctl.conf
(it may depend on the distro). Can we consider this issue solved?
from emqx.
Related Issues (20)
- crash logs HOT 1
- EMQX docker environment variables of dashboard default username and password ignores `#` and its following characters. HOT 2
- server_keepalive ineffective HOT 1
- emqx使用static集群报连接 HOT 3
- emqx 5.3.2 with emqx-operator won't start on k8s HOT 5
- when the etcd cluster down for 1-2 minutes, then recover, emqx experiences an exception. and cannot recover HOT 1
- When a session using shared subscription is expired, offline messages are not redistributed HOT 6
- emqx重启后,网关exproto接入认证中保存的用户管理相关的数据丢失 HOT 1
- EMQX v5.4.1 - Connector configuration (bridge egress): missing config. options? HOT 10
- Action/Bridge/Connector Config Breaks in > 5.3.0 HOT 9
- User is able to publish/subscribe to the topic that they not allow when they subscribe '#' topic. HOT 12
- Starting MQTT on Neuron fails | MQTT Conversion
- Static Seed Auto Discovery Seems Unstable in Web Dashboard HOT 9
- Very very Buggest broker! HOT 1
- gen_rpc error on ipv6 only environment HOT 6
- Is it necessary to provide map_get and mput functions? HOT 4
- Rule Engine’s FOREACH cannot handle JSON arrays directly
- Function `map_put/3` in the rule engine cannot handle Payload field directly
- Excessive memory spike after a MQTT client publishes a large payload (e.g. ~100mb), causing broker crash HOT 39
- When I use non-existent variables in MQTT bridge actions, unexpected_event errors will occur
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from emqx.