Forum

Be the first to pos...
 
Notifications
Clear all

Be the first to post a message!  

  RSS

Gianluca Finocchiaro
(@gianluca-finocchiaro)
Member Admin
Joined: 3 years ago
Posts: 8
27/06/2018 12:18 pm  

Welcome to the MQTT.Cool general forum. Here you can discuss MQTT.Cool's architecture, installation, and configuration.


Quote
Alessandro Alinone
(@alessandro-alinone)
Member Admin
Joined: 3 years ago
Posts: 1
19/11/2018 9:35 pm  

The MQTT.Cool website will go live soon!


ReplyQuote
dominous
(@dominous)
New Member
Joined: 1 month ago
Posts: 4
14/08/2020 3:36 pm  

Hi, I tried to install on both platforms, ubuntu and windows and had the same error. Thanks!

 

Microsoft Windows [Version 10.0.18363.1016]
(c) 2019 Microsoft Corporation. All rights reserved.

C:\Users\diego>cd ..

C:\Users>cd ..

C:\>cd mqtt.cool-2.0.0\mqtt.cool\bin\windows

C:\mqtt.cool-2.0.0\mqtt.cool\bin\windows>start.bat

C:\mqtt.cool-2.0.0\mqtt.cool\bin\windows>call mc.bat run
Java environment:
JAVA_HOME = C:\Program Files\Java\jdk-14.0.2\
JAVA_OPTS = -server -XX:MaxGCPauseMillis=1000 -Dcom.sun.xml.bind.v2.bytecode.ClassTailor.noOptimize

MQTT.Cool Server directory:
MC_HOME = C:\mqtt.cool-2.0.0\mqtt.cool\bin\windows\..\..\

MQTT.Cool Server main configuration file:
MC_CONFIG = "C:\mqtt.cool-2.0.0\mqtt.cool\bin\windows\..\..\\conf\configuration.xml"

Starting MQTT.Cool Server...
Please check logs for detailed information.
14.Aug.20 09:35:13,816 < INFO> MQTT.Cool 2.0.0 build 541
14.Aug.20 09:35:13,821 < INFO> Server launched on Java Virtual Machine: Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM, 14.0.2+12-46, 14.0.2+12-46 on Windows 10
14.Aug.20 09:35:13,836 < INFO> License correctly bound with the following parameter(s):
14.Aug.20 09:35:13,837 < INFO> Product : LS-MQTT-EXTENDER
14.Aug.20 09:35:13,837 < INFO> Edition : COMMUNITY
14.Aug.20 09:35:13,837 < INFO> License Type : FREE
14.Aug.20 09:35:13,837 < INFO> Contract Id : -
14.Aug.20 09:35:14,148 < INFO> Number of detected cores: 4
14.Aug.20 09:35:14,149 < INFO> MQTT.Cool starting in COMMUNITY edition.
14.Aug.20 09:35:14,314 < INFO> Started RMI server for JMX on port 8990.
14.Aug.20 09:35:14,325 < INFO> Binding of RMI Connector for JMX on port 8990 (communication on port 8990) started...
14.Aug.20 09:35:14,430 < INFO> Binding of RMI Connector for JMX on port 8990 (communication on port 8990) successful.
14.Aug.20 09:35:14,434 < INFO> Test of reachability of the JMX Connector at localhost:8990 started...
14.Aug.20 09:35:14,477 < INFO> Test of reachability of the JMX Connector at localhost:8990 successful.
14.Aug.20 09:35:14,564 < INFO> Binding of RMI Connector for Platform mbeans on port 8990 (communication on port 8990) started...
14.Aug.20 09:35:14,569 < INFO> Binding of RMI Connector for Platform mbeans on port 8990 (communication on port 8990) successful.
14.Aug.20 09:35:14,584 < INFO> SERVER pool size set by default at 1000.
14.Aug.20 09:35:14,585 < INFO> ACCEPT pool size set by default at 4.
14.Aug.20 09:35:14,620 < INFO> Queue limit checks for SERVER pool added to checks for ACCEPT pool.
14.Aug.20 09:35:14,797 <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..
14.Aug.20 09:35:14,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..
14.Aug.20 09:35:14,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..
14.Aug.20 09:35:14,804 <ERROR> Error while loading the Adapters: ConfigurationException: The content of elements must consist of well-formed character data or markup..
14.Aug.20 09:35:14,806 <ERROR> Error while loading the Adapters: The content of elements must consist of well-formed character data or markup..
14.Aug.20 09:35:14,807 <FATAL> Adapters initialization failed.
Press any key to continue . . .

C:\mqtt.cool-2.0.0\mqtt.cool\bin\windows>


ReplyQuote
Gianluca Finocchiaro
(@gianluca-finocchiaro)
Member Admin
Joined: 3 years ago
Posts: 8
14/08/2020 4:17 pm  

Hi dominous,

thank you very much for trying mqtt.cool!

I guess you modified the brokers_configuration.xml file, probably introducing a typo or something similar which makes the file no more XML compliant.

Could you please send us the file to verify if my hypothesis is correct?

Regards,

Gianluca

This post was modified 1 month ago by Gianluca Finocchiaro

ReplyQuote
dominous
(@dominous)
New Member
Joined: 1 month ago
Posts: 4
14/08/2020 10:21 pm  
Gianluca, thanks for the faster response.
I left my config
 
Thanks!
 
 
<?xml version="1.0" encoding="UTF-8" ?>
<!-- Do not remove this line. File tag: mqtt.cool_brokers_config-20200318. -->

 

<mqttcool_brokers_config>

 

    <!-- Optional. Fully qualified class name of a hook with purpose of
         authentication and authorization of users. Must implement the
         MqttCoolHook interface.
         See docs for more information. -->
    <!--  
    <hook_class>my.package.MyHook</hook_class>
     -->

 

    <configurations>

 

        <!-- A configuration for a target MQTT broker is given by the set of
             parameters used to establish the connection. Each configuration is
             uniquely identified by a connection alias, which will be then used
             by the clients to specify the MQTT broker to connect to.
             It is also possible to define multiple configurations (to the same
             or different brokers).

 

             The name of each single parameter must be expressed in the
             following form:

 

             <param name="<connection_alias>.<connection_param>">...</param>

 

             where:
             - <connection_alias> is the alias which identifies the configuration
             - <connection_param> is the specific connection parameter to set.

 

             For example, to define a configuration for a Mosquitto instance, it
             could be possible to use the connection alias "mosquitto" and then
             specify all related parameters as follows:

 

             <param name="mosquitto.server_address">...</param>
             <param name="mosquitto.connnection_timeout">...</param>
             <param name="mosquitto.keep_alive">...</param>

 

             and so on.

 

             In the same way, a configuration for a VerneMQ instance could be
             defined as follows:

 

             <param name="vernemq.server_address">...</param>
             <param name="vernemq.connnection_timeout">...</param>
             <param name="vernemq.keep_alive">...</param>

 

             where "vernemq" is the alias of choice.

 

             The following are examples of configurations. -->

 

        <!--
          =====================================
          CONFIGURATION EXAMPLE FOR "Mosquitto"
          =====================================
        -->
        <!-- Mandatory. The address of the MQTT broker to connect to.
             Accepted URI forms are:
               - tcp://<host>:<port>
               - mqtt://<host>:<port>
               - mqtts://<host>:<port>
               - ssl://<host>:<port>
               
             Note that the use of "mqtts" and "ssl" triggers encrypted
             communication with the MQTT broker. Therefore, further parameters
             might be required in order to properly support the secure channel.
             See below "security_protocol", "truststore_path",
             "truststore_password", "keystore_path", "keystore_password", and
             "private_key_password". -->
        <param name="mosquitto.server_address">tcp://192.168.157.126:1883</param>

 

        <!-- Optional. Client Id prefix to be used for shared connections. If
             the clients want to share a single connection, then a randomly
             generated suffix will be appended to generate a unique ClientId for
             opening the physical connection toward the MQTT broker. Uniqueness
             of the ClientId is mandatory as multiple shared connections may
             exist for the same broker.
             Default: MQTT_Cool. -->
        <param name="mosquitto.clientid_prefix">mosquitto_client</param>

 

        <!-- Optional. The connection timeout expressed in seconds.
             Default: 5. -->
        <param name="mosquitto.connection_timeout">30</param>

 

        <!-- Optional. The keep alive interval expressed in seconds.
             Default: 30. -->
        <param name="mosquitto.keep_alive">10</param>

 

        <!-- Optional. The username for authenticating with the MQTT broker. The
             value that may be provided by the client will take precedence over
             this setting. -->
        <--
        <param name="mosquitto.username">diex</param>
        -->

 

        <!-- Optional. The password for authenticating with the MQTT broker. The
             value that may be provided by the client will take precedence over
             this setting. -->
        <--
        <param name="mosquitto.password">password$$</param>
        -->

 

        <!-- Optional. The payload of the Will Message, which is interpreted
             on the basis of the "will_message_format" parameter.
             The Will Message and related parameters (as defined below) are
             processed only in the case of dedicated connections.
             The Will Message and related parameters that may be provided by
             the client will take precedence over the corresponding settings.
             -->
        <!--
        <param name="mosquitto.will_message">will_message</param>
        -->

 

        <!-- Optional. As the CONNECT Control Packet will contain just a
             sequence of raw bytes for the Will Message, this setting specifies
             how to interpret the payload provided through the "will_message"
             parameter in order to give the opportunity to supply either a
             string or binary sequence.
             Specify:
             - "UTF-8" to interpret the text as a regular string, which will
                then be encoded into the final sequence of bytes using the UTF-8
                character set.
             - "base64" to interpret the text as a Base64 encoded string, which
                will then be decoded accordingly to make the final sequence of
                bytes.
             Default: UTF-8. -->
        <!--
        <param name="mosquitto.will_message_format">base64</param>
        -->

 

        <!-- Mandatory if "will_message" is defined. The topic name of the
             Will Message. Must be at least 1 character in length. -->
        <!--
        <param name="mosquitto.will_topic">will_topic</param>
        -->

 

        <!-- Optional, but considered only if "will_message" is defined. The QoS
             integer value of the Will Message.
             Default: 0. -->
        <!--
        <param name="mosquitto.will_qos">1</param>
        -->

 

        <!-- Optional, but considered only if "will_message" is defined. The
             retain flag of the Will Message.
             Default: false. -->
        <!--
        <param name="mosquitto.will_retain">true</param>
        -->

 

        <!-- Optional. Sets the log interval (expressed in milliseconds) at
             which basic statistics (e.g., number of brokers, number of client
             connections, current upstream and downstream message frequency,
             etc.) are logged through the "MQTTCoolLogger.statistics" logger
             defined in <MQTT.COOL_HOME>/conf/log_configuration.xml.
             This same statistics are accessible through the JMX interface.
             If 0, basic statistics are not logged.
             Default: 0. -->
        <!--
        <param name="mosquitto.basic_statistics_log_interval">5</param>
        -->

 

        <!--  Optional, but considered only if a secure schema is used in
              "server_address". The protocol to be used in the case of encrypted
              connection to the broker.
              Default: TLSv1.2. -->
        <!--
        <param name="mosquitto.security_protocol">TLSv1.1</param>
        -->
        
        <!--  Optional, but considered only if a secure schema is used in
              the "server_address". The path to the JKS truststore relative to
              the "conf" folder.
              The truststore contains the MQTT broker certificate to trust.
              If no truststore is specified, then a default one is determined
              according to the JSSE Reference Guide
              -->
        <!--
        <param name="mosquitto.truststore_path">trust-store.jks</param>
        -->

 

        <!--  Mandatory if "truststore_path" is defined. The password for the
              truststore. -->
        <!--
        <param name="mosquitto.truststore_password">mytruststorepassword</param>
        -->

 

        <!--  Optional, but considered only if a secure schema is used in
              the "server_address". The path to the JKS keystore relative to
              the "conf" folder.
              The keystore contains the client certificate and the private key
              to be used in the case the target MQTT broker requires client
              authentication.
              If no keystore is specified, then a default one is determined
              according to the JSSE Reference Guide
              -->
        <!--
        <param name="mosquitto.keystore_path">keystore.jks</param>
        -->

 

        <!--  Mandatory if "keystore_path" is defined. The password for the
              keystore. -->
        <!--
        <param name="mosquitto.keystore_password">mykeystorepassword</param>
        -->

 

        <!--  Mandatory if "keystore_path" is defined. The password for the
              private key stored into the keystore. -->
        <!--
        <param name="mosquitto.private_key_password">myprivatekeypassword</param>
        -->

 

        <!--
          ====================================
          CONFIGURATION EXAMPLE FOR "VerneMQ"
          ====================================
        -->
        <!-- MQTT broker connection parameters for a local instance of the
             "VerneMQ" broker, listening on port 1883. See above. -->
        <param name="cool.server_address">tcp://192.168.157.126:1883</param>
        <param name="cool.clientid_prefix">cool_client</param>
        <param name="cool.connection_timeout">1</param>
        <param name="cool.keep_alive">30</param>

        <!--
          ====================================================
          CONFIGURATION EXAMPLE FOR "VerneMQ" on remote address
          ====================================================
        -->
        <!-- MQTT broker connection parameters for a remote instance of the
             "VerneMQ" broker, listening on port 1883 of the (fictitious)
             address "remote_broker.com". See above. -->
        <param name="vernemq2.server_address">tcp://myhost.com:1883</param>
        <param name="vernemq2.clientid_prefix">vernemq2_client</param>
        <param name="vernemq2.connection_timeout">4</param>
        <param name="vernemq2.keep_alive">20</param>

        <!--
          =========================================================
          CONFIGURATION EXAMPLE FOR THE "Mosquitto Test server"
          =========================================================
        -->
        <!-- MQTT broker connection parameters for plain connection to the
             publicly accessible instance of the "Mosquitto" broker.
             See above. -->
        <param name="public-mosquitto.server_address">tcp://test.mosquitto.org:1883</param>
        <param name="public-mosquitto.clientid_prefix">mosquitto_client</param>
        <param name="public-mosquitto.connection_timeout">10</param>
        <param name="public-mosquitto.keep_alive">30</param>

        <!--
          =============================================================================
          CONFIGURATION EXAMPLE FOR ENCRYPTED CONNECTION TO THE "Mosquitto Test server"
          =============================================================================
        -->
        <!-- MQTT broker connection parameters for encrypted connections to the
             publicly accessible instance of the "Mosquitto" broker.
             See above. -->
        <param name="public-tls-mosquitto.server_address">ssl://test.mosquitto.org:8883</param>
        <param name="public-tls-mosquitto.clientid_prefix">mosquitto_client</param>
        <param name="public-tls-mosquitto.connection_timeout">10</param>
        <param name="public-tls-mosquitto.keep_alive">30</param>
        <param name="public-tls-mosquitto.truststore_path">mosquitto_truststore_example.jks</param>
        <param name="public-tls-mosquitto.truststore_password">password</param>

        <!--
          ========================================================================================================
          CONFIGURATION EXAMPLE FOR ENCRYPTED CONNECTION WITH CLIENT AUTHENTICATION TO THE "Mosquitto Test server"
          ========================================================================================================
        -->
        <!-- MQTT broker connection parameters for encrypted connection to the
             publicly accessible instance of the "Mosquitto" broker, with 
             client authentication. See above. -->
        <param name="public-tls-client-auth-mosquitto.server_address">ssl://test.mosquitto.org:8884</param>
        <param name="public-tls-client-auth-mosquitto.clientid_prefix">mosquitto_client</param>
        <param name="public-tls-client-auth-mosquitto.connection_timeout">10</param>
        <param name="public-tls-client-auth-mosquitto.keep_alive">30</param>
        <param name="public-tls-client-auth-mosquitto.truststore_path">mosquitto_truststore_example.jks</param>
        <param name="public-tls-client-auth-mosquitto.truststore_password">password</param>
        <param name="public-tls-client-auth-mosquitto.keystore_path">mosquitto_keystore_example.jks</param>
        <param name="public-tls-client-auth-mosquitto.keystore_password">password</param>
        <param name="public-tls-client-auth-mosquitto.private_key_password">clientpass</param>

 

        <!--
          ====================================================
          CONFIGURATION EXAMPLE FOR THE "HiveMQ Public Broker"
          ====================================================
        -->
        <!-- MQTT broker connection parameters for the "HiveMQ Public Broker".
             See above. -->
        <param name="public-hivemq.server_address">tcp://broker.hivemq.com:1883</param>
        <param name="public-hivemq.clientid_prefix">hivemq_client</param>
        <param name="public-hivemq.connection_timeout">10</param>
        <param name="public-hivemq.keep_alive">15</param>

 

        <!--
          ====================================================
          CONFIGURATION EXAMPLE FOR THE "Eclipse IoT" SANDBOX
          ====================================================
        -->
        <!-- MQTT broker connection parameters for the "Mosquitto" instance of
             the "Eclipse IoT" sandbox. See above. -->
        <param name="eclipse-iot.server_address">tcp://iot.eclipse.org:1883</param>
        <param name="eclipse-iot.clientid_prefix">eclipseiot_client</param>
        <param name="eclipse-iot.connection_timeout">15</param>
        <param name="eclipse-iot.keep_alive">8</param>

 

    </configurations>

 

</mqttcool_brokers_config>

 


ReplyQuote
Gianluca Finocchiaro
(@gianluca-finocchiaro)
Member Admin
Joined: 3 years ago
Posts: 8
14/08/2020 11:21 pm  

Hi dominous,

please check the following parameters:

<--

   <param name="mosquitto.username">diex</param>

-->

<--

     <param name="mosquitto.password">password$$</param>
-->

 

They are not well-formatted as commented blocs. Please update as follows:

<!--

   <param name="mosquitto.username">diex</param>

-->

<!--
     <param name="mosquitto.password">password$$</param>
-->

 

Let us know.

 

Best,

Gianluca

This post was modified 1 month ago 3 times by Gianluca Finocchiaro

ReplyQuote
dominous
(@dominous)
New Member
Joined: 1 month ago
Posts: 4
15/08/2020 2:25 am  

@gianluca-finocchiaro

Thanks, now is working. I will use my own mqtt server, so i thought my broker config has to be put in this side.

I will follow testing

Great !


ReplyQuote
Gianluca Finocchiaro
(@gianluca-finocchiaro)
Member Admin
Joined: 3 years ago
Posts: 8
15/08/2020 10:00 am  

Great @dominous,

please keep us up to date with your progress.

May I ask you to share with us a little description of your use case? It would be highly appreciated!

Best,

Gianluca


ReplyQuote
dominous
(@dominous)
New Member
Joined: 1 month ago
Posts: 4
15/08/2020 4:08 pm  

Yes, of course

My idea is to integrate a chat inside an open source software called home assistant  https://www.home-assistant.io/

In place of use a standards chat like whatsapp or telegram, i,'ll use a private chat like mqtt cool.

This chat inclusive should work without internet, only on LAN and could be integrated directly in a chrome web browser

Is that possible?

Regards


ReplyQuote
Gianluca Finocchiaro
(@gianluca-finocchiaro)
Member Admin
Joined: 3 years ago
Posts: 8
15/08/2020 7:40 pm  

Very interesting use case!

Here you can find a chat demo using mqtt.cool (probably you are already aware of it).

Consider that mqtt.cool has been designed exactly to act as a web gateway, either on the internet or in a private cloud, for any mqtt broker of your choice, therefore your idea fits perfectly.

Please let us know how we could help you with this scenario.

 

Gianluca

 


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