I write some tests that involve grpc invoking and 100% pass on local machine, but on Travis CI build, it's 100% fail claiming: TCP Read Failed, can anyone shed some light on where goes wrong?
Detail logs here:
https://travis-ci.com/Jeff-Tian/grpc-man/builds/140791394?utm_medium=notification&utm_source=email
Thanks in advance!
My investigations:
Firstly I doubt it's caused by the host or port I'm listening so I changed the grpc endpoint from 0.0.0.0:8080 to 127.0.0.1:8080, but the result remains the same.
Related
I am facing this issue for a couple of days and I am unable to reproduce it outside the Ubuntu Docker container.
Please refer to this simplified diagram of my architecture:
As you can see, I have everything running inside the Docker container.
This is not the typical issue of not being able to connect to inside the container, the whole application runs on the local network of the Docker container.
The Ubuntu Image is the official one with just some packages installed so that everything works (nothing too fancy, just python3 and some c++ tools).
It is running Mosquitto 2.0.15 with the following configuration:
listener 1883
protocol mqtt
allow_anonymous true
log_dest file /home/user/mosquitto.log
So, in summary, I am running an unsecured MQTT broker in the default port 1883. I also added a log file in an attempt to debug what is going on.
On my Python Client, the connection is made in the simplest way possible:
...
self.mqtt_client = mqtt.Client(client_id="Client Id")
self.mqtt_client.connect("localhost", 1883, 6000)
...
self.mqtt_client.loop_start()
...
This Client is able to connect to the broker with no issue at all.
Subscribe and Publish works perfectly too!
On my C++ Client, I try to keep it simple as well:
...
mqtt::async_client MQTTClient("tcp://localhost:1883", "Another Client Id");
MQTTClient.connect()->wait();
...
Yet, this Client fails every attempt to connect to the broker:
terminate called after throwing an instance of 'mqtt::exception'
what(): MQTT error [-1]: TCP/TLS connect failure
Aborted (core dumped)
Although it looks like a SSL/TLS error, this is actually the generic error for when the MQTT broker is not found (If I stop the broker on my local machine I get the same error).
Checking the MQTT broker logs (verbose ON), it does not record anything regarding the attempt to connect from C++ Client:
1672874968: mosquitto version 2.0.15 starting
1672874968: Config loaded from /etc/mosquitto/conf.d/default.conf.
1672874968: Opening ipv4 listen socket on port 1883.
1672874968: mosquitto version 2.0.15 running
(I do get log messages when connecting with Python Client)
On my own Linux machine I am unable to reproduce this issue. Both clients work fine.
I am using the same configuration for the Mosquitto broker and the Clients are exactly the same.
Already tried to play with the IP used to connect to the broker (localhost/127.0.0.1/0.0.0.0) and using different ports, the result is the same.
It is weird that the Python Client can connect with no issue at all.
At this point, I am fairly confident that the issue must be something Docker-specific and how it handles TCP sockets. But I am unable to find anything helpful online.
I can easily check that the port is open:
lsof -i -P -n | grep :1883
mosquitto 56 user 5u IPv4 1633274841 0t0 TCP 127.0.0.1:1883 (LISTEN)
Any ideas what is going on? Or debug tools ideas?
Thanks in advance!
I have tried:
Playing with IP and port of the broker;
Stating the preferable MQTT version (tried with every version);
Run Client with strace and try to find something unusual;
Verify if I am running the exact same Client as my Linux machine;
I finally found out what my issue was.
I had a HTTP proxy configured and Paho C will automatically use this proxy.
It is detecting by checking if "http_proxy" environment variable is set.
My solution was simply unset this variable:
unset http_proxy
Interestingly, the Python MQTT client does not have this behavior.
And for that reason, it worked perfectly!
We've been trying to connect to a PLC but it's not working. We used the basic example "hello-world-plc4x" with JAVA from the PLC4x Github repo.
When we start the PLC4x from the console java -jar .\plc4j-datacare-plc4x-0.9.1-uber-jar.jar --connection-string s7://10.250.46.28 --field-addresses %DB67:10:INT[1] it's working but as soon as we build the container an start running the container it is not working because of the timeout error as you can see in the Docker log file:
Connection timeout
Can someone help us to fix the issue or does anyone have any suggestions?
i've changed nothing within my setup and ngrok seems to have stopped working for me.
Running ngrok http -host-header=rewrite launch.localhost:80 would usually work just fine.
This is my error:
The connection to http://d678207f86ae.ngrok.io was successfully tunneled to your ngrok client, but the client failed to establish a connection to the local address launch.localhost:80.
Make sure that a web service is running on launch.localhost:80 and that it is a valid address.
The error encountered was: dial tcp: lookup launch.localhost: no such host
If I navigate to launch.localhost the docker server is running just fine.
Not too sure what kind of other information you'd need to help?
For me, it was never running before, but I was getting the same error for
ngrok http -host-header=rewrite launch.local:80
It helped when I changed it to
ngrok http -host-header=launch.local 80
i'm running ZAP daemon, listening to localhost and running some test. The problem is, i don't get any result back, it just keep listening to localhost.
Does anyone knows how can i fix that? Is there some more specific documentation about the Daemon?
Thank you very much!
ZAP exposes a powerful API that allows you to do nearly everything that the desktop UI can do: https://www.zaproxy.org/docs/api/
I am having issues while connecting to remote docker cluster. I did provide bind.port and bind.hostname. Still, I am having the following error on server side.
[ERROR] [08/04/2017 12:36:34.623] [SereverApplication-akka.remote.default-remote-dispatcher-6] [akka://SereverApplication/system/endpointManager/reliableEndpointWriter-akka.tcp%3A%2F%2FClientApplication%4010.0.75.1%3A2553-0/endpointWriter] dropping message [class akka.actor.ActorSelectionMessage] for non-local recipient [Actor[akka.tcp://SereverApplication#127.0.0.1:2552/]] arriving at [akka.tcp://SereverApplication#127.0.0.1:2552] inbound addresses are [akka.tcp://SereverApplication#172.17.0.2:2552]
From the error I could see the messages are being sent to server actor from client. However the server child actor is unable to respond to client. Any help will be highly appreciated. I have the code at the following github location.
https://github.com/thedatatechie/akka_remote_actor
The Dockerfile is also placed at root folder. Please use it for any help in setting up the docker cluster with single node.
Many thanks in advance
I have the same error. Maybe can help you.
In the config, remote.netty.tcp.hostname="localhost". However, I use the url: akka.tcp://HelloRemoteSystem#127.0.0.1:5150/user/RemoteActor to connect the remote server. After correct it, error is dismiss.