AWS EC2 - not able to trigger spring boot webservice from outside but running fine in local host - spring-boot

I am running a spring boot web app for restful sevices in ec2 windows. It is working fine local host. I am using port 8083. But not able to trigger s3rvices from outside.
I have opened port 8083 in security group as TCP.
Plz help..What could be issue.
Same EC2 has .Net web application running and it is working fine and able to access from outside.

Ensure that 8083 port is open for inbound and outbound properties in security groups of ec2 instance.
Refer this to do the same.
How to open a web server port on EC2 instance

Related

ELB not able expose 2 services

I have one spring-boot and one react app deployed on 1 ec2 instance.
I am trying to expose both to public internet via and ELB.
Spring-boot runs on 8080 port. eg localhost:8080/v1/api**
react app runs of 3000 port. eg. localhost:3000
I would like to expose them both using Elastic Load balancer on aws.
I have 2 target group created.
one maps / --> this is mapped to the springboot app.
another one maps to /index.html
But it not able to resolve.

spring boot actuator works in local but not in production (aws)

Spring boot actuator works fine on my local and I can access it in browser
http://localhost:8000/actuator
I can access my system in production as follows
https://somedomain.com/#/overview
But I cannot access the actuator when the system is deployed in AWS, when accessed as follows
https://somedomain.com:8000/actuator
In AWS EC2 console, I notice that port 8000 is enabled as custom TCP for inbound rules

Spring boot micro service Deployment

I am new to Micro services architecture.. I want know if it is required to deploy all Spring boot micro services in the same local network ..? As Eureka Discovery service uses Private/Internal IP Address for Registration , i am unable to call a services from another service deployed in different local network...
Please let me know how micro services deployed across multiple Sub nets should communicate each other in this case
or is there a way to tell eureka to use only public IP Address..?
Not sure if this would help, but by default, your eureka client will try to connect to the default localhost:8761 where the eureka discovery server should exist.
In case you have a different location for your discovery-service you can use the following in the application.properties file in your client services.
eureka.client.service-url.defaultZone=http://{address}-{port}/eureka

Pivotal Cloud Foundry - Deployed Spring Boot App failed to run because of java netsocket(port) permission denied

so, i tried to deploy spring boot app to a PCF Server. When i deployed it, the logs showed that my application was shut down because it failed to open a tomcat server because there is a java.netsocketexception where it says that permission denied. The tomcat server was fine for a moment (it successfully use the port) but the next moment, it was shut down because there is the permission denied netsocketexception.
the port i tried to use is port 443. i tried to look up to several kinds of problems. one of it said that i need to have root access to be able to use port lower than 1000. the problem is, my other apps, which is eureka server run perfectly even when i use port 443.
the configuration, build-pack, and everything is the same. and it is even deployed on a same pcf platform. so, why can this app failed but the other (eureka server) can use the 443 port.
can anyone tell me for the things i need to check to make sure of the problem?
Remove server.port configuration from Spring Boot yml / properties configuration. It will by default expose the service to 443 on PCF

Programmatically find Eureka server host and port

I want to setup Eureka server for service registry and erueka clients that will get access rest api using the service registry from Eureka server. But we use mesos as our container management system and when we start the Eureka server we will not know which host and port it is running on. So there is an api that we can use that gives us the complete url where Eureka server will be running. Now all the examples for Eureka client that I have seen have hard coded the Eureka server in the config file. Is it possible for Eureka clients to use that api and get the url for Eureka server.
FYI: we are using spring boot and have our own DC and are not on any cloud
I think I found the answer but if someone can confirm that will be great. I need to create my own EurekaClientConfigBean and override the following methods:
public void setEurekaServiceUrlPollIntervalSeconds(int eurekaServiceUrlPollIntervalSeconds)
List<String> getEurekaServerServiceUrls(String zone);

Resources