Need to make a SOAP connection from .php code running as a webapp to a c++ console mode application that is looking for a SOAP connection on a given port while running as a webjob fired off from a batch file.
in php the call looks like this and does not work:
$this->m_webservice_location="http://localhost:8080";
The error that comes back is:
Error from AddressPro SOAP: Could not connect to host
Any ideas what to try or how to gather the address that will hit the webjob?
The Azure WebJob cannot listen on tcp ports.
You can use web sockets to communicate between web app and webjob, for example with signal-r: http://www.jerriepelser.com/blog/communicate-from-azure-webjob-with-signalr
You can also communicate using the file-system by writing to a file under d:\home\... and listening to changes on that file.
Related
I am trying to document a server and replicate its setup done by another person. Server is running Play Framework which also acts as a reverse proxy to MediaWiki running on Apache on the same server on a port that is not open externally on the server.
The Play Framework routes requests to the Media Wiki Server using ScalaWS. When I check the request it creates a request by using the server domain with the Apache port and the media wiki file.
In the real server it is working fine but in the test deployment it fails to reach mediawiki. It works if in the test deployment I open the Apache port externally.
So Somehow the request to the local server running internally on the machine needs to be accessed without routing the request externally. How can this be done? If anyone can give some quick tips or things I can check or even explain how this may be working, that would really help save me some time.
The /etc/hosts file had the wrong domain defined. Fixing that fixed the problem.
Can an Azure Web Job listen on a public TCP port (socket)
I am deploying a Web Application to Azure, and it has a long running Web Job that listens to a TCP port (a custom protocol is involved, so a raw socket is required)
The listener runs, but I want to send data from outside of Azure, from another on-prem machine.
The port is listening OK, it can open an incoming socket, but it is internal (10.0.X.X)
I suspect a public port like this is NOT possible, but I want to be 100% sure of that limitation, before I invest in an alternate solution.
FWIW, the protocol is for HL7
If it is not possible, would a point to point VPN into the Web Application be one option, to tunnel the connection from on-prem to the Web App?
Are there other approaches (maybe Azure Functions) that I should consider instead?
Indeed, you will not be able to listen on a public socket. See wiki for more details about the App Service sandbox.
I have tried it but doesn't work!
See the limitations:
https://github.com/projectkudu/kudu/wiki/Azure-Web-App-sandbox#network-endpoint-listening
But I could create a client application that can listen a non-http port.
Also, It is possible to host the TCPListener app in ServiceFabric. I could host my existing application (WCF Console host) as a GuestExecutable in ServiceFabric without any code changes. I would recommend to go for ServiceFabric..its scalable and very reliable service.
We have java application running on bluemix that is supposed to submit some files over FTP to the server located in intranet.
Everything works as expected when executing the application locally, but something goes wrong when the application tries to submit something over the secure gateway.
The Gateway has a destination configured for the port 21. Looking through the logs we can see that the application is able to connect to the server and execute some commands there, but fails when it comes to the file submission (by timeout in case of passive mode and saying that the connection is closed in active)
Passive attempt results:
Active attempt results:
We are able to use the gateway to connect to the external db2 instance successfully.
Is some additional configuration required? Is FTP is possible at all over the Secure Gateway?
This question was also asked on dW Answers at the following URL:https://developer.ibm.com/answers/questions/386433/ftp-over-secure-gateway-on-bluemix.html
As stated in response to that question, SFTP doesn't run over port 21; it runs over port 22.
Answer found at: https://developer.ibm.com/answers/questions/386433/ftp-over-secure-gateway-on-bluemix.html
"you need to define two secure gateway destinations - one for command
port 21 and one for data port, which will depend on your connection
mode."
I need to monitor a http request and response for web site running on remote web server. The web server makes lot of web service call and would like to trace them.
If the web site was running locally, Fiddler traces every web service call request and provides me with a report. Could someone please help me with how the same is possible
*e.g.
If the web application is running locally and calls two web services fiddler shows the total time on statistics. However, if the web application is running on web server hosted on different web server hosted internally (intranet) and I ran fiddler on my machine, I don't get the statistics for each web service call. All I can see is the total time for the aspx page.*
So question is how (if possible) can I trace the statistics of each web services invoked by web application that's running on different machine and fiddler is running on my machine.
Thanks.
You could always use WireShark http://www.wireshark.org/ to catch all the packets, if you are on the same network as the server, that is.
Say you're running a website on port 80 of a machine named WEBSERVER. You're connecting to the website using Internet Explorer Mobile Edition on a Windows SmartPhone device for which you cannot configure the web proxy. You want to capture the traffic from the phone and the server's response.
0.)Start Fiddler on the WEBSERVER machine, running on the default port of 8888.
1.)Click Tools | Fiddler Options, and ensure the "Allow remote clients to connect" checkbox is checked. Restart if needed.
2.)Choose Rules | Customize Rules.
3.)Inside the OnBeforeRequest handler, add a new line of code:
if (oSession.host.toLowerCase() == "webserver:8888") oSession.host = "webserver:80";
5.) navigate to http://webserver:8888
Requests from the SmartPhone will appear in Fiddler. The requests are forwarded from port 8888 to port 80 where the webserver is running. The responses are sent back through Fiddler to the SmartPhone, which has no idea that the content originally came from port 80.
You can setup Fiddler in your machine and set it as a proxy in the web application you want trace. Easy inside a network, not so easy accross the interwebs.
I have my server hosted on Heroku. The data source for my app is an external to my app. The following is the way to fetch the data :
Initialize a process that connects to a socket # the external-party server.
Save the data that comes through this socket connection.
Now my question is, Is it possible on Heroku to launch such processes, which needs to run constantly for-ever, listening to a socket on an external server?
A processes in Heroku can only listen to HTTP traffic on port 80. Like andy mentioned, Node.js is your best bet for running a service like this on Heroku.
I think this might be a job for Node.js which you can run on heroku. The logic flow will be to connect to the party server with a node.js app and then when data is received it will trigger a "callback" method. This method can then make a web request back to a Rails server with the data.
For examples of something like this, checkout the pubnub node.js sample app:
https://github.com/pubnub/pubnub-api/tree/master/nodejs
If I understand you correctly you need to launch a background process on heroku that connects to an external server -- this process then saves data from the api locally?
Accessing an external service:
That I'm aware of Heroku does not restrict access to external hosts or ports. Indeed, I have an app that connects to my mongodb database on mongohq.
Long running process: This is certainly possible using the new Celadon Cedar stack. The new cedar stack uses a concept called a Procfile, this enables running any script (e.g. ruby, bash, node.js) as a process.
Saving the data: Heroku has a read-only filesystem (excepting /tmp), so you'll need to save the data coming from the API in a database (or somewhere similar).