Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. General Discussion
  3. Mosquitto

Mosquitto

Scheduled Pinned Locked Moved General Discussion
11 Posts 3 Posters 4.9k Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    moskovskiy82
    wrote on last edited by
    #1

    Not really related to mysensors but many are using MQTT so the question goes like this.
    Currently moving from UBUNTU 14 server to the latest RASPBIAN on raspberry. The gateway is the MQTT client ESP12
    Installed mosquitto, mosquitto-clients and mosquitto python (both)

    Running tcommand on ubuntu

    $ mosquitto_sub -v -t 'mygateway1-out/#'
    

    gives me output from mysensors

    running

    $ mosquitto_sub -v -t 'mygateway1-out/#'
    

    on raspbian gives me silence

    Mosquitto is up and running and i can see it on the sockets

    And yes i have a loopback in interfaces.

    auto lo
    iface lo inet loopback
    

    Any help will be appreciated

    1 Reply Last reply
    0
    • M Offline
      M Offline
      moskovskiy82
      wrote on last edited by
      #2

      In the logs i notice

      1465234765: New connection from ::1 on port 1883.
      1465234765: New client connected from ::1 as mosqsub/1701-homepi (c1, k60).
      1465234774: Socket error on client mosqsub/1701-homepi, disconnecting.
      1465234789: mosquitto version 1.3.4 terminating
      1465234789: Saving in-memory database to /var/lib/mosquitto/mosquitto.db.

      YveauxY 1 Reply Last reply
      0
      • M moskovskiy82

        In the logs i notice

        1465234765: New connection from ::1 on port 1883.
        1465234765: New client connected from ::1 as mosqsub/1701-homepi (c1, k60).
        1465234774: Socket error on client mosqsub/1701-homepi, disconnecting.
        1465234789: mosquitto version 1.3.4 terminating
        1465234789: Saving in-memory database to /var/lib/mosquitto/mosquitto.db.

        YveauxY Offline
        YveauxY Offline
        Yveaux
        Mod
        wrote on last edited by Yveaux
        #3

        @moskovskiy82 Maybe different Mosquitto versions?
        Caused me headaches in the past...

        http://yveaux.blogspot.nl

        1 Reply Last reply
        0
        • M Offline
          M Offline
          moskovskiy82
          wrote on last edited by
          #4

          Touche... Will try to install a new one. Wonder if it is worth going MQTT path after this...

          Ubuntu

          libmosquitto0:amd64/trusty 0.15-2ubuntu1 uptodate
          libmosquitto1:amd64/trusty 1.4.9-0mosquitto1 uptodate
          mosquitto:amd64/trusty 1.4.9-0mosquitto1 uptodate
          mosquitto-clients:amd64/trusty 1.4.9-0mosquitto1 uptodate
          

          Raspbian

          libmosquitto1:armhf/jessie 1.3.4-2 uptodate
          mosquitto:armhf/jessie 1.3.4-2 uptodate
          mosquitto-clients:armhf/jessie 1.3.4-2 uptodate
          python-mosquitto:all/jessie 1.3.4-2 uptodate
          python3-mosquitto:all/jessie 1.3.4-2 uptodate
          
          1 Reply Last reply
          0
          • M Offline
            M Offline
            moskovskiy82
            wrote on last edited by
            #5

            Well now i have a hedache as well..
            Updated to 1.4.8 freom http://repo.mosquitto.org/debian/mosquitto-jessie.list (as it seems the latest avail)

            Upgraded mosquitto and mosquitto clients

             $ apt-show-versions | grep mosquitto
            libmosquitto1:armhf/jessie 1.4.8-0mosquitto2 uptodate
            mosquitto:armhf/jessie 1.4.8-0mosquitto2 uptodate
            mosquitto-clients:armhf/jessie 1.4.8-0mosquitto2 uptodate
            

            And still i get

             1465238048: Config loaded from /etc/mosquitto/mosquitto.conf.
             1465238048: Opening ipv4 listen socket on port 1883.
             1465238048: Opening ipv6 listen socket on port 1883.
             1465238066: New connection from 127.0.0.1 on port 1883.
             1465238066: New client connected from 127.0.0.1 as mosqsub/1282-homepi (c1, k60).
             1465238078: Socket error on client mosqsub/1282-homepi, disconnecting.
            
            YveauxY 1 Reply Last reply
            0
            • M moskovskiy82

              Well now i have a hedache as well..
              Updated to 1.4.8 freom http://repo.mosquitto.org/debian/mosquitto-jessie.list (as it seems the latest avail)

              Upgraded mosquitto and mosquitto clients

               $ apt-show-versions | grep mosquitto
              libmosquitto1:armhf/jessie 1.4.8-0mosquitto2 uptodate
              mosquitto:armhf/jessie 1.4.8-0mosquitto2 uptodate
              mosquitto-clients:armhf/jessie 1.4.8-0mosquitto2 uptodate
              

              And still i get

               1465238048: Config loaded from /etc/mosquitto/mosquitto.conf.
               1465238048: Opening ipv4 listen socket on port 1883.
               1465238048: Opening ipv6 listen socket on port 1883.
               1465238066: New connection from 127.0.0.1 on port 1883.
               1465238066: New client connected from 127.0.0.1 as mosqsub/1282-homepi (c1, k60).
               1465238078: Socket error on client mosqsub/1282-homepi, disconnecting.
              
              YveauxY Offline
              YveauxY Offline
              Yveaux
              Mod
              wrote on last edited by
              #6

              @moskovskiy82 Did you try google'ing for the error?
              When I do, I get e.g. http://jpmens.net/2014/07/03/the-mosquitto-mqtt-broker-gets-websockets-support/#comment-1907704831
              Maybe that helps?

              http://yveaux.blogspot.nl

              1 Reply Last reply
              0
              • M Offline
                M Offline
                moskovskiy82
                wrote on last edited by
                #7

                I tried. But i don't have any username/password
                Strange thing is that this is a fresh raspbian install (downloaded yesterday)

                pid_file /var/run/mosquitto.pid
                persistence true
                persistence_location /var/lib/mosquitto/
                log_dest file /var/log/mosquitto/mosquitto.log
                include_dir /etc/mosquitto/conf.d
                
                1 Reply Last reply
                0
                • Harry van der WolfH Offline
                  Harry van der WolfH Offline
                  Harry van der Wolf
                  wrote on last edited by Harry van der Wolf
                  #8

                  I had some issues as well and read somewhere that there was an issue with the mosquitto packages for raspberri, so I installed from git.

                  wget http://repo.mosquitto.org/debian/mosquitto-repo.gpg.key
                  sudo apt-key add mosquitto-repo.gpg.key
                  cd /etc/apt/sources.list.d/
                  

                  for wheezy: sudo wget http://repo.mosquitto.org/debian/mosquitto-wheezy.list
                  for jessie: sudo wget http://repo.mosquitto.org/debian/mosquitto-jessie.list

                  apt-get update
                  apt-get install mosquitto
                  sudo /etc/init.d/mosquitto start
                  

                  All working flawless for months now.

                  1 Reply Last reply
                  0
                  • M Offline
                    M Offline
                    moskovskiy82
                    wrote on last edited by
                    #9

                    This i what i did above to solve the old version problem
                    Installed from http://repo.mosquitto.org/debian/mosquitto-jessie.list

                    With no luck.
                    Turning debug i see the following only

                    1465240376: mosquitto version 1.4.8 terminating
                    1465240386: New connection from 127.0.0.1 on port 1883.
                    1465240386: New client connected from 127.0.0.1 as mosqsub/1948-homepi (c1, k60).
                    1465240386: Sending CONNACK to mosqsub/1948-homepi (0, 0)
                    1465240386: Received SUBSCRIBE from mosqsub/1948-homepi
                    1465240386:     mygateway1-out/# (QoS 0)
                    1465240386: Sending SUBACK to mosqsub/1948-homepi
                    1465240419: Socket error on client mosqsub/1948-homepi, disconnecting.
                    

                    Not that much of a help...

                    1 Reply Last reply
                    0
                    • M Offline
                      M Offline
                      moskovskiy82
                      wrote on last edited by
                      #10

                      What is also strange i tried to start mosquitto with
                      sudo mosquitto -c /etc/mosquitto/mosquitto.conf -v

                      Than on the second console i tried
                      mosquitto_sub -v -t 'mygateway1-out/#'
                      and also
                      mosquitto -c /etc/mosquitto/mosquitto.conf -v

                      Strange thing is that id didn't see any messages in cosole. In the log file

                      1465242491: mosquitto version 1.4.8 (build date Tue, 17 May 2016 11:26:59 +0100) starting
                      1465242491: Config loaded from /etc/mosquitto/mosquitto.conf.
                      1465242491: Opening ipv4 listen socket on port 1883.
                      1465242491: Opening ipv6 listen socket on port 1883.
                      1465242495: New connection from ::1 on port 1883.
                      1465242495: New client connected from ::1 as mosqsub/1848-homepi (c1, k60).
                      1465242495: Sending CONNACK to mosqsub/1848-homepi (0, 0)
                      1465242495: Received SUBSCRIBE from mosqsub/1848-homepi
                      1465242495:     mygateway1-out/# (QoS 0)
                      1465242495: mosqsub/1848-homepi 0 mygateway1-out/#
                      1465242495: Sending SUBACK to mosqsub/1848-homepi
                      1465242527: Socket error on client mosqsub/1848-homepi, disconnecting.
                      1465242530: New connection from ::1 on port 1883.
                      1465242530: New client connected from ::1 as mosqpub/1850-homepi (c1, k60).
                      1465242530: Sending CONNACK to mosqpub/1850-homepi (0, 0)
                      1465242530: Received PUBLISH from mosqpub/1850-homepi (d0, q0, r0, m0,     'mygateway1-in/99/0/1/0/40', ... (6 bytes))
                      1465242530: Received DISCONNECT from mosqpub/1850-homepi
                      1465242530: Client mosqpub/1850-homepi disconnected.
                      1465242536: mosquitto version 1.4.8 terminating
                      
                      YveauxY 1 Reply Last reply
                      0
                      • M moskovskiy82

                        What is also strange i tried to start mosquitto with
                        sudo mosquitto -c /etc/mosquitto/mosquitto.conf -v

                        Than on the second console i tried
                        mosquitto_sub -v -t 'mygateway1-out/#'
                        and also
                        mosquitto -c /etc/mosquitto/mosquitto.conf -v

                        Strange thing is that id didn't see any messages in cosole. In the log file

                        1465242491: mosquitto version 1.4.8 (build date Tue, 17 May 2016 11:26:59 +0100) starting
                        1465242491: Config loaded from /etc/mosquitto/mosquitto.conf.
                        1465242491: Opening ipv4 listen socket on port 1883.
                        1465242491: Opening ipv6 listen socket on port 1883.
                        1465242495: New connection from ::1 on port 1883.
                        1465242495: New client connected from ::1 as mosqsub/1848-homepi (c1, k60).
                        1465242495: Sending CONNACK to mosqsub/1848-homepi (0, 0)
                        1465242495: Received SUBSCRIBE from mosqsub/1848-homepi
                        1465242495:     mygateway1-out/# (QoS 0)
                        1465242495: mosqsub/1848-homepi 0 mygateway1-out/#
                        1465242495: Sending SUBACK to mosqsub/1848-homepi
                        1465242527: Socket error on client mosqsub/1848-homepi, disconnecting.
                        1465242530: New connection from ::1 on port 1883.
                        1465242530: New client connected from ::1 as mosqpub/1850-homepi (c1, k60).
                        1465242530: Sending CONNACK to mosqpub/1850-homepi (0, 0)
                        1465242530: Received PUBLISH from mosqpub/1850-homepi (d0, q0, r0, m0,     'mygateway1-in/99/0/1/0/40', ... (6 bytes))
                        1465242530: Received DISCONNECT from mosqpub/1850-homepi
                        1465242530: Client mosqpub/1850-homepi disconnected.
                        1465242536: mosquitto version 1.4.8 terminating
                        
                        YveauxY Offline
                        YveauxY Offline
                        Yveaux
                        Mod
                        wrote on last edited by
                        #11

                        @moskovskiy82 can you subscribe and publish something on the pc? Then do the same on the rpi. At least that should work...

                        http://yveaux.blogspot.nl

                        1 Reply Last reply
                        0
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        18

                        Online

                        11.7k

                        Users

                        11.2k

                        Topics

                        113.1k

                        Posts


                        Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                        • Login

                        • Don't have an account? Register

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • MySensors
                        • OpenHardware.io
                        • Categories
                        • Recent
                        • Tags
                        • Popular