Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rest api server running fail #1661

Closed
wormcc opened this issue Jul 4, 2018 · 6 comments
Closed

rest api server running fail #1661

wormcc opened this issue Jul 4, 2018 · 6 comments

Comments

@wormcc
Copy link

wormcc commented Jul 4, 2018

Environment

  • OS: centos6.5
  • Erlang/OTP:
  • EMQ: 2.3

Description

the listener for the rest api not running, but when i use the command emqttd_ctl listeners start mqtt:api 8099, it showed Failed to restart mqtt:api listener on 8099, error:not_found , 8099 is the port for the api server in the config file.

How should i start the server? Thx

@terry-xiaoyu
Copy link
Contributor

The mqtt:api port defaults to 8080. You can't start the api port because someone else has already listened on it, right ?

You could change the configuration and restart the emq for now, I'll look at the emqttd_ctl listeners restart problem.

## Default: 0.0.0.0:8080
listener.api.mgmt = 0.0.0.0:8099

@gilbertwong96
Copy link
Contributor

I don't know what you want. The listener for rest api would be started after emqttd starting unless the 8080 port has been occupied by other application. If you want to to change the rest api port, change it in etc/emq.conf, then restart emqttd.

If you want to change listen port of rest api when emqttd is running, it is a new feature for us

@gilbertwong96 gilbertwong96 added Feature and removed BUG labels Jul 4, 2018
@gilbertwong96
Copy link
Contributor

gilbertwong96 commented Jul 4, 2018

@terry-xiaoyu I don't think this is bug. It looks like @wormcc 's problem. Maybe he needs a new feature. But I assume that it is not a good idea to change rest api listener's port when emqttd has been started.

@wormcc
Copy link
Author

wormcc commented Jul 6, 2018

@gilbert-wong Thanks for the reply, i have changed the default port 8080 to 8099 in the emq.conf, then i restarted the broker, but the rest api server did not run, and the 8099 port wasn't occupied by other application either.

@gilbertwong96
Copy link
Contributor

Execute ./bin/emqttd_ctl listeners and tell me what's printed on terminal

@gilbertwong96
Copy link
Contributor

I don't know what you want exactly, but emqttd_ctl listeners could close listeners by specifying port like this ./bin/emqttd_ctl listeners stop api 8099. You didn't reply in this issue for a long time. So maybe your problem has been solved?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants