Unable to connect MQTT Broker using Ethernet Sheild

yaronz:
The examples of Ethernet works fine as suppose to.

The problem is with the MQTT examples.

i tried also PubSubLibrary example.

i am getting client.state = -2, means MQTT_CONNECT_FAILED - the network connection failed.

i cant understand what is the problem.

post your test sketch