Forum

Mqtt.cool is not wo...
 
Notifications
Clear all

Mqtt.cool is not working with our infrastructure


anonym
(@anonym)
New Member
Joined: 1 month ago
Posts: 3
Topic starter  

Hello guys,

we are trying to implement mqtt.cool but can't get it up and running.

 

Our infrastructure:

We are currently working with docker and having a container for the mqtt broker installed inside our corporate network, which is protected and can only be accessed via port 443 and port 80. But outside of that network we need clients to send data to that broker. Therefore we tried to install the mqtt.cool extension in a container as well. 

As we deployed the container there was no default.config created, so we took the configuration from here.

Our configuration was:

<?xml version="1.0" encoding="UTF-8"?>

<mqttcool_brokers_config>
<configurations>
<paramname="mosquitto.server_address">address</param>
 
<paramname="mosquitto.clientid_prefix">mosquitto_client</param>
 
<paramname="mosquitto.connection_timeout">30</param>
 
<paramname="mosquitto.keep_alive">10</param>
 
<param name="mosquitto.username">username</param>
 
<param name="mosquitto.password">password</param>
 
</configurations>
 
</mqttcool_brokers_config>
 
 
Is there anything more to add to get it done?
 
 
Thank you in advance!

Quote
Dario Crivelli
(@dario-crivelli)
Member Admin
Joined: 4 months ago
Posts: 3
 

Please retry with a test installation if mqtt.cool without a container, to have more control over the system.

Then run the mqtt.cool server and specify if the problem you see is a failure of server startup or if the server starts but cannot connect to the broker.

The configuration shown is of the expected form, as long as it is the content of the "brokers_configuration.xml" file.
On the other hand, no "default.config" file is expected; please clarify where you found this name indicated.

BTW, in your text I see some occurrences of the "paramname" string instead of "param name";
please check if this typo also affects the "brokers_configuration.xml" file.


ReplyQuote
anonym
(@anonym)
New Member
Joined: 1 month ago
Posts: 3
Topic starter  

Thanks for responding.

 

We are trying to implement it without containers now but mqtt.cool won't start.

The error messages:

Java environment:
JAVA_HOME = "/usr/lib/jvm/java-11-openjdk-amd64"
JAVA_OPTS = "-server -XX:MaxGCPauseMillis=1000"

Setting file descriptor limit to 1048576
Configured file descriptors, soft limit: 1048576
Configured file descriptors, hard limit: 1048576
Configured sysctl fs.file.* values:
fs.file-max = 812011
fs.file-nr = 1568	0	812011

MQTT.Cool Server directory:
MC_HOME = "/home/ubuntu/mqtt.cool"

MQTT.Cool Server main configuration file:
MC_CONFIG = "/home/ubuntu/mqtt.cool/conf/configuration.xml"

Starting MQTT.Cool Server...
Please check logs for detailed information.
17.Dec.21 14:30:34,114 < INFO> MQTT.Cool 2.1.0 build 691
17.Dec.21 14:30:34,117 < INFO> Server launched on Java Virtual Machine: Ubuntu, OpenJDK 64-Bit Server VM, 11.0.13+8-Ubuntu-0ubuntu1.18.04, 11.0.13+8-Ubuntu-0ubuntu1.18.04 on Linux
17.Dec.21 14:30:34,130 < INFO> License correctly bound with the following parameter(s):
17.Dec.21 14:30:34,130 < INFO>         Product                          : LS-MQTT-EXTENDER
17.Dec.21 14:30:34,130 < INFO>         Edition                          : COMMUNITY
17.Dec.21 14:30:34,130 < INFO>         License Type                     : FREE
17.Dec.21 14:30:34,131 < INFO>         Contract Id                      : -
17.Dec.21 14:30:34,280 < INFO> Number of detected cores: 4
17.Dec.21 14:30:34,280 < INFO> MQTT.Cool starting in COMMUNITY edition.
17.Dec.21 14:30:44,420 < INFO> Started RMI server for JMX on port 8888
17.Dec.21 14:30:44,430 < INFO> Binding of RMI Connector for JMX on port 8888 (communication on port 8888) started...
17.Dec.21 14:30:44,584 < INFO> Binding of RMI Connector for JMX on port 8888 (communication on port 8888) successful.
17.Dec.21 14:30:44,587 < INFO> Test of reachability of the JMX Connector at localhost:8888 started...
17.Dec.21 14:30:44,620 < INFO> Test of reachability of the JMX Connector at localhost:8888 successful.
17.Dec.21 14:30:44,683 < INFO> Binding of RMI Connector for Platform mbeans on port 8888 (communication on port 8888) started...
17.Dec.21 14:30:44,689 < INFO> Binding of RMI Connector for Platform mbeans on port 8888 (communication on port 8888) successful.
17.Dec.21 14:30:44,699 < INFO> SERVER pool size set by default at 1000.
17.Dec.21 14:30:44,700 < INFO> ACCEPT pool size set by default at 4.
17.Dec.21 14:30:44,730 < INFO> Queue limit checks for SERVER pool added to checks for ACCEPT pool.
17.Dec.21 14:30:44,799 <ERROR> XML parsing fatal error: org.xml.sax.SAXParseException; lineNumber: 93; columnNumber: 10; The content of elements must consist of well-formed character data or markup..
17.Dec.21 14:30:44,801 <ERROR> XML parsing fatal error: org.xml.sax.SAXParseException; lineNumber: 93; columnNumber: 10; The content of elements must consist of well-formed character data or markup..
17.Dec.21 14:30:44,802 <ERROR> Unable to read configuration file.: org.xml.sax.SAXParseException; lineNumber: 93; columnNumber: 10; The content of elements must consist of well-formed character data or markup..
17.Dec.21 14:30:44,802 <ERROR> Error while loading the Adapters: ConfigurationException: The content of elements must consist of well-formed character data or markup..
17.Dec.21 14:30:44,802 <ERROR> Error while loading the Adapters: The content of elements must consist of well-formed character data or markup..
17.Dec.21 14:30:44,802 <FATAL> Adapters initialization failed.

lineNumber: 93 

We checked that error -> this line is empty

 


ReplyQuote
Dario Crivelli
(@dario-crivelli)
Member Admin
Joined: 4 months ago
Posts: 3
 

To have a more insightful log you can modify the logback configuration file mqtt.cool/conf/log_configuration.xml to set the LightstreamerLogger.init logger at DEBUG level.

In any case, please ensure that the mqtt.cool/conf/brokers_configuration.xml file doesn't contain the "paramname" string but the correct "param name". The reported line may not be precise if a syntax error scrambles the interpretation of the file.


ReplyQuote
anonym
(@anonym)
New Member
Joined: 1 month ago
Posts: 3
Topic starter  

@dario-crivelli

Thanks for your response. We have been able to deploy mqtt cool semi-successfully. It's practically running now after we corrected some syntax errors in the configuration file.

But we still can't connect to the broker which is located outside of our cooperate network. Do I need to open port 1883 if my broker is running on that port? We thought by using MQTT cool it wouldn't be necessary to do so.

We launched the Test Client and were able to connect to our localhost broker but further than that we didn't get. We also tried to connect to the broker which is located outside using the Test Client but received a "connection error to MQTT broker" message.

 

 

 


ReplyQuote
Dario Crivelli
(@dario-crivelli)
Member Admin
Joined: 4 months ago
Posts: 3
 

The idea of mqtt.cool is that you can have a mqtt client communicate with a mqtt broker through an unreliable connection, but the condition is that the mqtt.cool server is next to the broker, whereas the unreliable connection is handled internally by mqtt.cool, between a mqtt.cool client and the mqtt.cool server, as shown in the first picture of the Getting Started document.

Nevertheless, many brokers are publicly accessible, hence can be accessed remotely, through the internet, and we take advantage of this in our Test Client to simplify the demonstration of the mqtt.cool capabilities.
But if your broker is protected from access and you want to keep it protected, then you should run the mqtt.cool server from inside your intranet; then you can expose the mqtt.cool server instead, and leverage the fine-grained authentication and authorization configuration offered.
Otherwise, yes, you should open port 1883.


ReplyQuote
MQTT.Cool Logo

Put MQTT.Cool in front of your MQTT broker and instantly boost the security, the performance, and the architecture of your IoT solution.

Subscribe to Our Newsletter

Get the latest updates and news on MQTT.Cool