title: MQTT paho client Connection timeout error
body: <p>I am running MQTT Mosquitto broker on my laptop. Then I am trying to connect 2 Paho MQTT clients to it: 1) From Android phone using Java Paho and 2) From Raspberry Pi using Python Paho. </p>
  
  <p>From Android connection is made perfectly. No problems.</p>
  
  <p>However, Raspberry for some reason can not connect. Instead the client.connect method blocks and after some time I receive the following:</p>
  
  <pre><code>Traceback (most recent call last):
    File "sensorsClient.py", line 28, in &lt;module&gt;
      client.connect(mqttServer, 1883)
    File "/usr/local/lib/python2.7/dist-packages/paho/mqtt/client.py", line 700, in connect
      return self.reconnect()
    File "/usr/local/lib/python2.7/dist-packages/paho/mqtt/client.py", line 822, in reconnect
      sock = socket.create_connection((self._host, self._port), source_address=(self._bind_address, 0))
    File "/usr/lib/python2.7/socket.py", line 571, in create_connection
      raise err
  socket.error: [Errno 110] Connection timed out
  </code></pre>
  
  <p>The code for the connection is below:</p>
  
  <pre><code>import paho.mqtt.client as mqtt
  
  def on_connect(client, userdata, flags, rc):
      print("Connected with result code "+str(rc))
      client.subscribe("$SYS/#")
  
  def on_message(client, userdata, msg):
      print(msg.topic+" "+str(msg.payload))
  
  mqttServer = 'zzz.xxx.ccc.qqq' # Public IP of the laptop
  
  
  client = mqtt.Client("", True, None, mqtt.MQTTv31)
  client.on_connect = on_connect
  client.on_message = on_message
  
  client.connect(mqttServer, 1883)
  client.loop_start()
  </code></pre>
  
  <p>Everythin is done within one network via WIFI. No mobile data. Can somebody please explain me why that might happen?</p>