cloudfoundry NoHostAvailableException while deploying app - spring

I have deplyed my local cloudfoundry instance. When I try to deploy my application , my app requires cassandra to be up and running. I have cassandra host setup on independant server. Cloud foundry throws com.datastax.driver.core.exceptions.NoHostAvailableException
Whereas when I try to ping this host from the machine on which CF is installed , Ping is successful. Even this cassandra host is accessible from my local computer and works fine with my eclipse deployment.
How can I make cloudfoundry recognize this host?

You will need to make sure that (a) your application has access to the information about the address and credentials to access the cassandra server, and that (b) networking (and maybe DNS) are such that your application instances will actually be able to reach the cassandra server.
For (a), you will want to bind your application to a "user-provided service instance". For (b), you need to make sure your application's running security groups allow it to reach your cassandra server.

Related

Connection has timed out when trying to access spring boot app from another machine

I'm trying to deploy a spring boot app which will be usable in a LAN. I'm running the command mvn spring-boot:run, the application is launched perfectly, i can access it via localhost but not via other machines : The page loads until the error : The connection has timed out appears .
ANy recommendations ?
It is not accessible because the port in which your application is running is not exposed to the other machines. You can open firewall port to access it across the network.
The best approach is to setup either Apache httpd or nginx as fron't server to server your application on regular ports(80 and 443).

Exposing several services with Vagrant and Kubernetes on my own server

Assume the following stack:
A dedicated server
The server is running Vagrant
Vagrant is running 2 virtual machines master + minion-1 (Kubernetes)
minion-1 is running a pod
Within the pod is 2 containers: webservice and fileservice
Both webservice and fileservice should be accessible from internet i.e. from outside. Either by web.mydomain.com - file.mydomain.com or www.mydomain.com/web/ - www.mydomain.com/file/
Before using Kubernetes, I was using a remote proxy (HAproxy) and simply mapped domain names to an internal ip / port.
Now with Kubernetes, I can imagine there is something dedicated to this task but I honestly have no clue from where to start.
I read about "createExternalLoadBalancer", kubernetes Services and kube-proxy. Should a reverse-proxy still be put somewhere (before vagrant or within a pod ?) also is using Vagrant a good option for production (staying in the scope of this question) ?
The easiest thing for you to do at the moment is to make a service of type "nodePort", and to configure your HAproxy to point at minion-1:.
createExternalLoadBalancer is the old, less flexible, way to do this--it requires the cloud provider to do work. Type=nodePort doesn't require anything special from the cloud provider.

Turning laptop into a server to run spring tool suite over the internet

I am trying to run a website from my computer using Spring Tool Suite (STS). Using pivotal tc Server I can access this website that I made by running the server and using localhost:8080 as a url.
My laptop contains other software that is permitted to only run in the laptop and it is needed to run my code in Spring tool suite.(School policy to SSH's into another computer to get access to my database; it is a requirement)
How would I be able to access that website that is running in my laptop that uses pivotal tc Server. Please assume I know nothing about IP address and DNS. Also, assume that I can move my laptop around like a mobile device.
To solve this problem you need to tunnel to your local machine

Can't get Amazon EC2 instance work

I am trying to setup an amazon ec2 instance for first time.
I've created one with ubuntu 10.4, managed to connect to ssh and installed mongodb, mysql, php and apache which need for my proyect(also python but it is already setup).
Then I associated an elastic ip to the instance, but when I try to open the IP, I can't. It gives timeout.
Could it be that the apache root is not where I think it is?(/var/www/)
You need to check the security group that is associated with the instance. Make sure that you open up port 80.
Also make sure that apache is started, and configured to start on boot.
If you're logged in, you should be able to use wget localhost to verify if apache is serving up pages.

Mule on Amazon Cloud

I installed Mule Community Server on AWS cloud and it is functioning properly. When I use http end point and invoke Mule services from browser on my Amazon EC2 machine they work. When I access them from outside, the request timeout. The end points are not bound to local host but mapped to 0.0.0.0:8081. I have checked all firewall settings using amaozon security group and set permission for all. Yet it doesnt work. I am able to access the Windows IIS http server on the same machine but not mule on port 8081. Any clues would help.
Hope this doesn't sound rude, but did you disable the windows firewall, or allow 8081 through the windows firewall?

Resources