Why is GRPC Unavailable from a different computer? - grpc

I have been adding GPRC to a micro service I am working on. So far everything works okay, and I have a simple gatling test to verify things work correctly.
However, things only seem to work when I run gatling on the same system as my micro service. When I run the same test on a different system, I always get back an UNAVAILABLE response.
The first part of the test makes an HTTP request (port 8080), and that always succeeds, but the second part of the test makes a GRPC request (port 8081); which always succeeds on the same system, but always fails when the client is on a different system on the network.
I have tried opening up firewalls and such on Windows where the micro service is running, but no luck.
My micro service is running on Windows, and my other system is OS X.
Does anyone have any troubleshooting tips wrt GRPC?

Programmer error: I was not using the correct test host name on the GRPC port. Test works now, except that it cannot handle the same load as the HTTP test. So, something new to investigate.

Related

HTTP response times GUI

I'm looking for an application available on CentOS, that allows me to check periodic connectivity response times between that server and a specific port of a remote server (in this case servers a SOAP API).
Something that preferentially allows me to send periodic API calls, but if not possible, just telnet's that remote port, but shows results in a graphic.
Does someone know about an application that allows this, without the need for me to create a script that writes results to a log file that is less readable in terms of time perspective?
After digging and testing a bit more, ended up using netdata:
https://www.netdata.cloud/
Awesome tool, extremely simple to use and install.

Using TcpClient with VPN connection

I'm writing a proprietary Telnet class and use TcpClient. Everything works well in the console and data transmission generates no issue with devices (sockets) in the same IP group. I tested also a new WPF project using this class again and the functionality is given as well.
Today I tried the identical WPF project again using a VPN connection, but TcpClient generates an exception. At the beginning it looks like the first console version was still working as expected, but during several tests, I noticed that even the console version generates sporadically an exception.
I checked the VPN connection and the availability of the IP/port. Everything should be fine. I used Wireshark (I’m not familiar with) and it looks like in the case, the connection fails, there is no request to the IP in the VPN network.
After a restart of the computer, connecting seems to work several times, but after a view tests, it ends with an exception again.
For sure, I have to handle the exception but first of all, I try to solve this connection issue.
Did anybody have experience using TcpClient and VPN? I read, that it’s sometimes recommended to use a bind, but till now, I don't have a solution.
This is a link to the console version I used as a starting point.

Application Level Network Sniffer

Is there a better tool than WireShark to sniff out where given application is trying to connect and at which port. (So that I could easily overwrite it with my HOSTS file). Being able to log packet data is helpful too.
Ultimately I would prefer an application that I could just throw a running process at and start logging the network activities of the given app
Of course the application and sniffer will be running on the same PC. Preferably I would love a Windows sniffer. Since running that app on Linux will be .... difficult.
Answering myself: http://www.sysprobs.com/monitor-network-traffic-windows-7-microsoft-network-monitor-34
This article helped me big time. The tool in there is really great.
Have you tried socket sniff?
It should let you monitor specific applications:
socket sniff

Secure data transfer over HTTP when HTTPS is not an option

I would like to write an application to manage files, directories and processes on hundreds of remote PCs. There are measurement programs running on these machines, which are currently managed manually using TightVNC / RealVNC. Since the number of machines is large (and increasing) there is a need for automatic management. The plan is that our operators would get a scriptable client application, from which they could send queries and commands to server applications running on each remote PC.
For the communication, I would like to use a TCP-based custom protocol, but it is administratively complicated and would take very long to open pinholes in every firewall in the way. Fortunately, there is a program with a built-in TinyWeb-based custom web server running on every remote PC, and port 80 is opened in every firewall. These web servers serve requests coming from a central server, by starting a CGI program, which loads and sends back parts of the log files of measurement programs.
So the plan is to write a CGI program, and communicate with it from the clients through HTTP (using GET and POST). Although (most of) the remote PCs are inside the corporate intranet, they are scattered all over the country, I would like to secure the communication. It would not be wise to send commands, which manipulate files and processes, in plain text. Unfortunately the program which contains the web server cannot be touched, so I cannot simply prepare it for HTTPS. I can only implement the security layer in the client and in the CGI program. What should I do?
I have read all similar questions in SO, but I am still not sure what to do in this specific situation. Thank you for your help.
There are several webshells but as far as I can see ( http://www-personal.umich.edu/~mressl/webshell/features.html ) they run on the top of an existing SSL/TLS layer.
There is also S-HTTP.
There are several ways of authenticating to an server (username/passwort) in a protected way, without SSL. http://www.switchonthecode.com/tutorials/secure-authentication-without-ssl-using-javascript . But these solutions are focused only on sending a username/password to the server.
Would it be possible to implement something like message-level security in SOAP/WS-Security? I realise this might be a bit heavy duty and complicated to implement, but at least it is
standardised
definitely secure
possibly supported by some libraries or frameworks you could use
suitable for HTTP

Are there any open standards for server failover?

I'm building a client-server application and I am looking at adding failover to the client so that when a server is down it will try to connect to another available server. Are there any standards or specifications covering server failover? I'd rather adopt an existing standard than implement my own mechanism.
I don't there is, or needs to be any. It's pretty straight forward and all depends on how you can connect to your sever, but basically you need to keep sending pings/keepalives/heartbeats whatever you want to call em, and when a fail occurs (or n fails in a row, if you want) change a switch in your config.
Typically, the above would be running as a separate service on the client machine. Altenativly, you could create a method execution handler which handles thr execution of all server calls you make, and on Communication failure, in your 'catch' block, flick your switch in config
You're question is very general. here are some general answers:
Google for Fault Tolerant Computing
Google for High Availability Solutions
This is usually handled at either the load balancer or the server level. This isn't something you normally do in code at the client.
Typically, you multihome the servers each having their own IP + one that is shared between all of them. Further, they communicate with each other over tcp for the heartbeat to know which is the Active node in an Active / Passive cluster.
I can't tell what type of servers you have, but most of the windows servers can do this natively.
You might consider asking the question at serverfault to see how to properly configure your servers to support this.

Resources