How to call a remote kie server - timeout

I implemented a kie-server on Wilfly and deployed a decision service.
Calling it on the same machine with Insomnia works fine, Just using http://localhost:8080.
Trying to make the same call from another machine using xx.xxx.xxx.xxx:8080 just runs into a timeout.
What am I doing wrong?
Please help.

Issue solved using portlistener.exe
Still wonder why the port is not opened by the server. Kie server claims it is.
Now I have another issue. See next question.

Related

How to access a program running on localhost from another program running on localhost

I have two programs running on my local machine : a wordpress and a spring boot webservice
How can i access the webservice from the wordpress ? I've tried the following code ( It doesn't work without the "http://" either ) :
$response = wp_remote_get( 'http://localhost:8088/hello');
of course the port and the path is correct, But It seems like two applications on localhost cannot communicate together Am I right ?
If someone is facing a similar problem, the free solution is to use free argo tunnel service. I used Cloudflare and it works great, i think you can also use Ngrok.
There is a link that may help you : https://blog.cloudflare.com/a-free-argo-tunnel-for-your-next-project/

asp.net core Jwt Tokenl SSL issues

We are running a few aspnet core APIs in a docker swarm with nginx as the reverse proxy server.
We have been running this set up for a while without any issue. However recently we added an SSL certificate that we got from letsencrypt. Since then we notice that after we hit the /api/TokenAuth/Authenticate endpoint and get assign a Bearer token if we try and make a subsequent call using the token that was just assigned, the call sometimes fail and we get a 302 (it works about 40% of the time). It seems that if we try using that same token again after some time has passed than the call works.
It's strange that this only seems to be an issue if we have ssl(https) on.
I cannot replicate the issue locally. It seems to only show up when the api is deployed to our docker swarm (which is running nginx and the api as containers, nginx handles the ssl cert).
Does anyone have any idea what the issue might be? Has anyone experienced something like this before that could point me in the right direction?
There are two console below: The top one is an example of it working and I got the expected results back. The bottom is the response when it fails.
I found the issue. We have 3 instances/replica of api that is set to issue the Token. The server time on each server seems to be off by seconds. Therefore if the server that issues the token is ahead of the server that processes the subsequent request, then the token is not valid yet.

Twilio IP Messaging token issue

I'm setting up an iOS app to use the IP Messaging and video calling apis. I'm able to connect, create channels and setup a video call if I manually create hard-coded tokens for the app. However, if I want to use the PHP server (as described here https://www.twilio.com/docs/api/ip-messaging/guides/quickstart-ios) then I always get an error and it can't connect anymore.
I'm attaching a screenshot of what I see when I hit the http://localhost:8080 address which seems to produce a 500 Internal error on this URL: https://cds.twilio.com/v2/Streams
Thanks so much!
After much time spent on this I decided to try the node backend instead - under other server-side languages of the PHP and I have it running in 2 minutes! I used the exact same credentials as the ones that I was using on the PHP config file so either my PHP environment has something strange or the PHP backend needs some fixing. In any case, I'm able to move forward using the node backend, so if you run into the same issue just try node instead of PHP. woohoo!

IdFTP.Connect via proxy server

Our Delphi application is trying to connect to our website via IdFTP on a client machine using a proxy server, and I always get a 'read timed out' message. I don't know how to fix it.
My code:
IdFTP1.Host :=Website_address;
IdFTP1.Username :=Website_user;
IdFTP1.Password :=Website_password;
IdFTP1.TransferType:=ftBinary;
IdFTP1.ProxySettings.ProxyType:=fpcmNone;
IdFTP1.ProxySettings.Host :=Proxy_server;
IdFTP1.ProxySettings.Port :=Proxy_port;
IdFTP1.ProxySettings.Username :=Proxy_username;
IdFTP1.ProxySettings.Password :=Proxy_password;
IdFTP1.Connect;
...which returns a 'read timed out' exception.
Having looked on the web for possible solutions, I have tried various combinations of the following with no joy (although there might be a combination that might work, I just don't really know what I'm doing):
IdFTP1.IOHandler :=TIdSSLIOHandlerSocketOpenSSL.Create
(IdFTP1);
IdFTP1.UseTLS :=utUseExplicitTLS;
IdFTP1.NATKeepAlive.UseKeepAlive:=True;
IdFTP1.NATKeepAlive.IdleTimeMS :=100000;
IdFTP1.DataPortProtection :=ftpdpsPrivate;
The frustrating thing is I can't test it on my machine, I have to compile a new version of the application, copy it to their machine, and then see if it works.
There is nothing complex about the installation on the client side as far as I can tell. They have given me the proxy host address, and the proxy username and password are blank.
Other bits of the application connect to the same website via HTTP and the proxy server, and this works perfectly. So my logic is that it can't be firewalls or anything like that.
IdHTTP1.HandleRedirects :=True;
IdHTTP1.ProxyParams.BasicAuthentication:=True;
IdHTTP1.ProxyParams.ProxyServer :=Proxy_server;
IdHTTP1.ProxyParams.ProxyPort :=Proxy_port;
IdHTTP1.ProxyParams.ProxyUsername :=Proxy_username;
IdHTTP1.ProxyParams.ProxyPassword :=Proxy_password;
I am using Delphi XE8.
They have created a virtual server for our testing, it runs Windows 7 64 bit.
Update
Remy, is this the right idea? One problem I am having is the TIdConnectThroughHttpProxy component, what must be in the uses clause for this? Delphi is not recognizing it.
var
TempIO : TIdIOHandlerStack;
TempProxy : TIdConnectThroughHttpProxy;
......
TempIO :=TIdIOHandlerStack.Create;
TempProxy :=TIdConnectThroughHttpProxy.Create;
TempProxy.Host :=Proxy_host;
TempIO.TransparentProxy:=TempProxy;
IdFTP1.IOHandler :=TempIO;
IdFTP1.Connect;
Update 2
A point of clarity: the HTTP request that is successfully reaching the web server through the proxy server goes to a different web address than the FTP request. In other words, they both go through the same proxy server, but the destination addresses are different. Just in case this is of use.
I have now tried using Fiddler to find the problem, not sure if this is a great idea? My understanding is is that Fiddler acts as a proxy server, so I thought I would see if I encountered the same problem. Sure enough, can't connect.
To be clear about my steps:
Run Fiddler, and check the box that says 'Capture FTP requests'.
Update my IdHTTP component:
IdHTTP1.ProxyParams.ProxyServer:='127.0.0.1';
IdHTTP1.ProxyParams.ProxyPort :=Fiddler port;
Update my IdFTP component:
IdFTP1.ProxySettings.Host:='127.0.0.1';
IdFTP1.ProxySettings.Port:=Fiddler port;
So now I have removed the client setup completely, I am mirroring the problem from my local machine using Fiddler as far as I can tell. If I don't use Fiddler, everything works great. If I use Fiddler as described above, then the HTTP request works correctly, but the FTP request can't connect.
Any ideas as to what I can do to try and solve this? I'm sure it is something really stupid that I'm doing wrong.
IdFTP1.ProxySettings.ProxyType:=fpcmNone
This tells TIdFTP not to communicate with an FTP-aware proxy. If you want to use the TIdFTP.ProxySettings properties, you need to set the ProxyType so TIdFTP.Connect() will connect to the ProxySettings.Host and TIdFTP.Login() will know what kind of commands it needs to send to login to the proxy and request a connection to the next host.
Note that TIdFTP.ProxySettings only works with FTP proxies. If you need to connect to a different type of proxy, before you call TIdFTP.Connect() you will have to assign a TIdIOHandler-derived component to the TIdFTP.IOHandler property, and then assign a TIdCustomTransparentProxy-derived component to the TIdIOHandler.TransparentProxy property. To connect to an HTTP proxy (which it sounds like you need, since that is what TIdHTTP.ProxyParams works with), use TIdConnectThroughHttpProxy. To connect to a SOCKS proxy, use TIdSocksInfo.

Running a live Rails environment

I'm new to web development, rails, etc. I have what is probably a very dumb questions but I searched and was not able to find the specific answer, though there's a good chance I asked the wrong question.
I'm following this tutorial which wants you to create a test rails app locally and view it via localhost in a browser. However I am learning directly on the server itself. This is because currently I only have an iPad to work with, but I've been able to do everything directly on the server itself using Panic's Prompt. To continue with these lessons I need to be able to see what I've done via a browser which since I can't use localhost, I want to see directly on my server. Here is the tutorial I'm following:
http://installfest.railsbridge.org/installfest/create_a_rails_app
Here is my website:
redvardo.com
Any help or pointers toward the correct information would be helpful. Please tell me if I did not include enough information as well. Thanks!
If your server provides a public IP address, use that ip to access the project. First of all make sure the brick server is running via rails s then you can go ahead and access the page directly via the ip: 12.13.31.115:3000 for example. This would be the fastest way, otherwise you need to setup dns to point to your server via your domain name registrar.
Hope that helps.
Thanks for the help but for me, what I did was simply install a VNC server on the server itself, now I can view localhost on the server for everything the tutorials are asking.

Resources