I'm trying to open a TCP connection from cloudfoundry application.
As I came to know that Cloudroundtry doesn't support TCP ports yet.
However in the documentation here https://docs.cloudfoundry.org/devguide/deploy-apps/prepare-to-deploy.html#ports
It says under Port Limitations
The default cf-release manifest assigns port 4443 for TCP/WebSocket communications.
Does this mean that I can open TCP connection on port 4443, I have tried running a ServerSocket on 4443, however this port is not accessible from outside cloudfoundry machine.
I'm aware of the long polling, WebSocket and Servlet 3.1 non blocking full duplex method. However I don't want to implement these if I can simply use port 4443 for direct TCP connections.
Please confirm if it's possible to use this port for TCP connections, if not then what does the documentation above mean ?
The documentation above is stating that, by default, port 4443 is used as a WebSocket port to be forwarded to the Cloud Foundry router. This port is not what your application would listen on, but is the external port a client would connect to, e.g. run.pivotal.io:4443. This means that you cannot have a direct TCP connection to your app using it, since the router expects an HTTP request upgrade.
There has been ongoing work to enable TCP routing on Cloud Foundry, and the functionality should start to become available on certain Cloud Foundry installations in the near future. More information can be found on our github repo: https://github.com/cloudfoundry-incubator/routing-release.
Related
I have created project which has two components as Desktop client and web.
web server is communicating to the my another program which i run as client on other systems.
After connecting those clients communication is happening in network as all IP's within network are reachable.
However, when i deployed web app on public IP now i am not able to connect the clients as the local IP's of those clients are not reachable by server.
How can i achieve this communication between local IP to public and vice versa?
There are multiple ways to achieve this.
Anyways, if you want the service to be reachable publically then you´ll probalby want to forward the Port to the machine running the service.
Also, make sure the Firewall allows connections to this port.
Since you´re talking about Web-Apps it´s probably HTTP, Port 80 TCP, or HTTPS, the encrypted version of HTTP running on port 443 TCP.
To explain it, your ISP gives you one public IP address.
Since you probably have multiple devices using internet, they all appear in the internet as the one IP address your provider gave you.
Whenever you send something out your router will remember where you tried to connect and if a response comes in your router knows which device to send the response to.
Now, since you want someone to connect to you, there was no request so your router does not know where to put the packet and simply blocks it.
In most routers you can configure something usually called NAT or Port Forwarding. You simply specify that communication on Port 80 or 443 should be routed to the internal IP. It has one of the following formats:
192.168.0.1 - 192.168.255.254
172.16.XXX.XXX - 172.31.255.254
10.0.0.0 – 10.255.255.254
I have an application running on Google App Engine and a client connects to the server at a specific URL performing an HTTP POST (or GET or whatever) request. My question is simple: how would I go about obtaining the client's port?
Thankyou for any help anyone here can provide!
--- Additional Info ---
Note that in most cases 'Client's port' = a translated port that the Client's Modem's NAT set. If a NAT is present, I do not require the client's local port on their computer that they are using to hit the server, for this is of little use to me. Instead, I require the port from the Modem's public IP that will redirect the request to my original client.
I need this info to send more data to the client (through sockets) at some later point in time. Straight after its initial post request, the original client creates a server socket that listens for requests from the server. The server is only able to send requests to the client if it knows the ip:port of the client.
I am aware of the issue request below. It is 3.5 years old though, and still no action has been taken - it will never be fixed. I was hoping that someone here might know of a workaround.
https://code.google.com/p/googleappengine/issues/detail?id=4210&q=Type%3DDefect&colspec=ID%20Type%20Component%20Status%20Stars%20Summary%20Language%20Priority%20Owner%20Log&start=100
Afaik, the info on remote TCP port is not available via GAE APIs.
Most of the time clients are behind NAT so they are not accessible from internet, i.e. even if the have a listening port open, you can not Make a TCP connection to it due to one-way nature of NAT translation.
If a client has a public IP, then they can just simply tell server on which port they will be listening and you can then use URL Fetch or Outgoing Sockets to make a connection.
I have a TCP server running on a specified port (23232), and an Android app that needs to connect to the IP and Port of this server. Is it possible to obtain the IP by scanning for a port only? I have media player control apps that do this but I have no idea how to implement it.
Thanks in advance.
This is on a local network, correct? I would recommend that you use a multicast service discovery mechanism via UDP, since this is the exact kind of scenario it is intended for. Fixed port, unknown entities on the LAN providing the service.
I'm trying to setup a Solaris KSSL proxy (http://www.c0t0d0s0.org/archives/5575-Less-known-Solaris-Features-kssl.html) as a frontend to a Jetty web server.
I'm able to make KSSL work with Apache web server so that KSSL redirects all incoming SSL traffic from port 443 into an Apache web server listening on port 28080.
However the same configuration does not work when Jetty is listening on port 28080. I verified that the KSSL requests does not even reach Jetty or at least I cannot see them in the access log. Furthermore even if I set a simple Java class which just listens on a server socket, KSSL cannot redirect requests to it.
My question is what are the pre-requisites from a web server in order to be able to get requests from KSSL ?
Best regards,
Lior
There are 2 very common gotchas when working with kssl.
The first is that the apache listening IP has to be the same
as your ksslcfg command. So if you have Listen 123.123.123.123:28080 in
the httpd.conf file, then you must use a ksslcfg command with the same IP.
You cannot have it listening on ANY (*) and then list an IP in ksslcfg,
or listen on an IP and leave out the IP on ksslcfg. Whatever netstat shows
is listening on port 28080 must match the IP used in ksslcfg
(or don't use the IP it is listening on *)
The second is that you must do the operations in this order:
ksslcfg
restart apache
It doesn't not work if ksslcfg is run without restarting apache afterward.
I've seen many people on the web testing with something like
localhost in their ksslcfg command. It won't work unless you also
had localhost as the Listen IP in the apache configuration.
I am running Apache ActiveMQ 5.5 on CentOS 5.5.
I have searched the ActiveMQ website, source code, configuration files, and I cannot find any reference to this port. Yet, when I start the broker, this is one of three TCP ports listened to by the JVM.
Does anyone know what port 64119 is used for by Apache ActiveMQ?
I have tried with ActiveMQ 5.4.2 on Ubuntu. It listens on:
61616 - broker protocol
8161 - web admin
39271 - JMX remote port
Server is not listening on any other ports.
EDIT: I checked with 5.5.0 and also restarted the broker (both 5.4.2 and 5.5.0) several times. JMX port is always different, looks like it's being randomized. I bet your 64119 changes over time as well.
To make it clear, connect to ActiveMQ broker with jvisualvm, you should see an open connection from jvisualvm to ActiveMQ process on this port (I can see it with lsof).