Mosquitto build Android Push service Chapter One: various error resolution

Source: Internet
Author: User

article steel to:

At present, the author in the development of building Mosquitto server, in this period encountered a lot of practical problems, so go a lot of detours, write here to provide some help for everyone.

1. Start Mosquitto error after installation is complete

The dynamic library could not be found when executing the Mosquitto client program: libmosquitto.so.1

./mosquitto_sub:error while loading shared libraries:libmosquitto.so.1:cannot open Shared object file:no such file or Directory

Workaround:

Execute command

sudo ln-s/usr/local/lib/libmosquitto.so.1/usr/lib/libmosquitto.so.1

And

Ldconfig

Can

2. configuration file error when starting Mosquitto server

Invalid user ' Mosquitto '.

[[email protected] src]#./mosquitto  1437558553'mosquitto'

This is because there are no current users in the configuration file, there are 2 solutions:

1. Modify the configuration file: mosquitto.conf, increase the login user, for example, the currently logged on user is root.

2. Execute the command to increase the current user: AddUser Mosquitto

3. Restart Mosquitto

I found a lot of information on the internet did not mention how to restart the server, and on the official website does not have the corresponding command prompt.

So we use LIUNX to terminate the process command and forcibly exit.

kill First, then restart:
[[Email protected] ~]# PS-A | grep mosquitto21674 ?        xx:921674 

4, the connection is not responding

The server is open normally, but when you publish information remotely, you will be prompted as follows:

no route to hostThe firewall on the remote server connects the information, so perform the following command problem resolution[email protected] ~]$ sudo iptables-f 

Mosquitto build Android Push service Chapter One: various error resolution

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.