I am trying out azure container services with docker swarm as orch. i am an aws guy and completely new to azure and it has been really tough to get it to work so far.
i followed the azure dashboard to create a container service which created a resource group. i was able to tunnel in to the swarm-master and run docker commands on the swarm-master. the containers launched successfully too but im unable to access the deployed web app. i tried 80 and 8080 ports. i tried pinging the public IP and dns of the swarm-agent, the pings timed out with message Request timeout for icmp_seq 0 in aws similar issues can be resolved by setting inbound security rules but in azure it seemed like they are already set. Can someone please tell me if im missing something.
following is the guide i followed:https://www.youtube.com/watch?v=-wjxpng6jYs
Please try looking at this guide: https://blogs.msdn.microsoft.com/jcorioland/2016/04/25/create-a-docker-swarm-cluster-using-azure-container-service/
The service should be available by accessing the service port on the agent's load balancer's public ip.
If it's not running on port 80, you need to open NSG ports manually.
Please offer more details about the steps you've taken exactly if this doesn't unblock you. What container image? Why are you trying both 80 and 8080? Etc.
Related
So i wrote two microservices in Java Quarkus:
user-microservice running on port 8080
game-microservice running on port 8282
and i successfully test their endpoints with POSTMAN.
Now i need to build a simple API Gateway running for example on port 8000, and when i receive a request on localhost:8000 the Gateway will fetch for me the needed data from the two microservices and show me them on 8000 on POSTMAN. Any suggestions?
Thanks in advance.
Believe me . if you just need a simple gateway . nigix will be helpful, you just should rewrite the config file, and start it. it's done.
But if you want to build a project called gateway. you might need zookeepr and rpc framework for your diff port of every app. your port sould be store with zk or redis. if it runing even in diff device, ip shold be store, too.
Read the document of dubbo or eureka might help you.
I have a docker container running java program, which is using API service of a third party. When I run the jar file on ec2 machine, it works well and gets connected to service and fetches the data also but when I containerize the jar file, it doesn't connect to the API service. API service exposes itself on port 14002. I do understand that container can send the things out but cant receive anything unless we tell it to do.
Can anybody tell me, how do I tell my java program to get the service of API running on 14002 port?
Thanks
thanks all for your comments here. I was able to resolve this issue, simply by changing the base image from FROM openjdk:8-jdk-alpine to FROM openjdk:8-jdk. In the alpine image, I was not able to ping the api dns from inside the container usining telnet. But after changing it to only openjdk:8-jdk, I was able to ping the external dns. So it was the issue in image
I have just created a Hello World RESTful Java API with IntelliJ IDEA and Spring and I make several requests with http://localhost:8080/function and it works fine and return the JSON data well, but now I want to make request from my android app to get the same JSON data from another network. How to create global API or make my local API global or online?
If it is working on your PC, your next step is to host it somewhere which is reachable from the outside world. If it is still in testing mode, probably what you need to do is port-forwarding from your router, so that your requests to your public IP get forwarded to your PC.
In the long term of course you need to host it somewhere, unless you want to leave your PC running. You can buy a cheap hosting to start with on something like Digital Ocean, or go for the more advanced cloud service providers like Google and AWS.
in your router you have to redirect port 8080 to you network IP and allow port 8080 in your firewall
And use this IP address https://whatismyip.com.br/
You can create your java application in a container and deploy it on one of the cloud providers (AWS, Azure, Google App Engine).
I am working on a mac machine and installed the latest Kubernetes and followed the example here (this is for dev’t purpose). All went smooth but I was hoping that Kubernetes provide me an ip address and port number where my service will be listening to so that I can access it from anywhere.
Please correct me if I am wrong.
I was able to run ifconfig as well as curl $(minikube service hello-minikube --url) and I was able to see the ip address and port but I wasn’t able to access it outside command line where Kubernetes lives in.
The reason I am trying to access it outside the VM is because we have other projects that run on other machines and I wanted to call the REST service I installed while we are on dev env. This way we don’t have to wait until the service is pushed to production.
FYI: This is my first micro service project and I would appericiate your feedback.
I followed the steps in the article you linked and it works as expected.
Just do:
minikube service hello-minikube --url
You will get a url like http://192.168.99.100:32382/ - the port and IP could and will change for you. Also note that the exposed port will be a random port like the 32382 and not 8080 that the pod uses.
Use the url in your browser, say and you should be able to see the output of the service.
Noob question but I'm not sure where to look:
I'm running a Java Web App on a remote linux machine (Jersey RESTful API is the goal). The server successfully runs and can handle requests locally to localhost:8080/foobar but I cannot make requests to the various urls from anywhere else (For example, my laptop through a browser).
This is a simple problem I've have many times but have no idea what terms to search on google or where to look for help debugging the problem, so any leads or advice would be greatly appreciated.
Further details:
Project is code added to a Maven2 generated archetype of a Jersey Service
This is most likely caused by firewalling on the server or in front of the internal network your server is running on. Talk to your network administrators about opening a hole for port 8080, or consider using a reverse proxy on port 80 (if open) to forward requests to port 8080. See http://en.wikipedia.org/wiki/Reverse_proxy if you are not familiar with the idea of a reverse proxy or load balancers.
Change the localhost entry in your "/etc/hosts" file, with the network configs, and if server is tomcat, edit the $CATALINA_HOME/conf/server.xml to add IP the relevant <Connector> element.
Make sure you have better idea handling /etc/hosts