WSO2 APIM carbon console is not accessible through aws elastic load balancer - wso2

Hi I have running wso2 docker image running inside aws instance. I am accessing wso2 apim services(store/publisher/carbon console) through aws ELB. And I have mapped ELB with DNS name inside Route 53.
Problem is I am able to access store and publisher(https://wso2.vitkutin.com./store/ and https://wso2.vitkutin.com./publisher/) successfully but when I'm trying carbon console https://wso2.vitkutin.com./carbon/ gives me below error.I am able to successfully curl -v -k https://localhost:9443/carbon/admin/login.jsp inside docker container. Can someone help me to solve this error ?
<am:fault xmlns:am="http://wso2.org/apimanager">
<am:code>404</am:code>
<am:type>Status report</am:type>
<am:message>Not Found</am:message>
<am:description>The requested resource is not available.</am:description>
</am:fault>
Route 53 DNS name is configured inside carbon.xml and apimanager.xml as shown below :
carbon.xml
<HostName>wso2.xxx.com.</HostName>
<MgtHostName>wso2.xxx.com.</MgtHostName>
apimanager.xml
<GatewayEndpoint>http://wso2.xxx.com.:80,https://wso2.xxx.com.:443</GatewayEndpoint>
<APIStore>
<URL>https://wso2.xxx.com.:443/store</URL>
</APIStore>
<APIPublisher>
<URL>https://wso2.xxx.com.:443/publisher</URL>
</APIPublisher>

As per the access log, it seems the request is sent to 8280 or 8243, instead of 9443. Please check your loadbalancer rules.

Related

How to use AWS ECS Service Discovery Endpoint in Java Springboot

I am new to AWS ECS. I am developing two services in Java Spring Boot, Service 1 and Service 2. I have created two ECS services with one task each, in the same clsuter.
I can see that there is a "Service Discovery Endpoint" Service2.local and "Service discovery name" Service2. I can also see SRV and Type A record in Route 53 for Service 2. I do not know how do I call Service 2 from Service 1. Before I could try from SpringBoot, I tried the following curl command to try to get status from Service2.
curl service2.local/status
I get the error could not resolve host service2.local . I want to understand how to use the service discovery entpoint or name correctly.
Edit:
I have tried to execute the following command, but it returns nothing.
dig +short service2.local
If
you have the entry in your hosted zone
and
you can curl using the posted IP inside your hosted zone (so the ports are correct and the security groups work, and the app is up) then:
Check that your VPC has both DNS hostnames and DNS resolution otherwise AWS will not resolve the DNS server correctly. (NB it can take a while for it to come online, go brew a cuppa while you wait)

AWS unable to connect to Java springboot API endpoints

I am trying to run my springboot API on AWS however when i try to connect to the endpoint the error Site cannot be reached IP refused to connect. This my first time working with AWS.
I created a linux instance and connected to it using filezilla. Afterwards i added my jar to a folder which i created on the linux instance using filezilla. I started the springboot project and its running but the problem is that i cannt seem to connect to the endpoints. Am i missing something, how do i connect to my endpoints.
The other thing to note is that i enabled https on my API and added swagger also.
You need to enable relevant ports in the instances' Security Group.
Look at this to create a new Inbound rule for the specific port.
You can go to the aws console, (here I am assuming you have deployed to us-east-1 if its something else, go to the relevant region.
Open up the relevant security group, and then click edit Inbound roles.

Troubles with deploying Pivotal Cloud Foundry on AWS

I have been trying to install Pivotal Cloud Foundry on AWS and I have troubles with it.
In the section upload-cert mentioned that I need to create SSL Certificates for:
*.system.example.com
*.login.system.example.com
*.uaa.system.example.com
*.apps.example.com
So, I've created domain xxxxx.com on AWS Route53 and created a certificate on AWS ACM for domain and subdomains.
So, my questions are:
do I need to create subdomains (system, login, uaa, apps) in AWS Route53
do I need to bound my domain and subdomain somehow to PCF? Or the installation process had to do it for me?
for now, if I open http://login.xxxxx.com/ it responses with 503. what can be the reason?
what is the correct url to open the PCF UI?
I have such error in Ops Manager. What can be the reason of such error?
The same about logs. When I tried to download logs for failed services it failed too. What can be the reason?
Thank you for the help!
do I need to create subdomains (system, login, uaa, apps) in AWS Route53
do I need to bound my domain and subdomain somehow to PCF? Or the installation process had to do it for me?
You can create a wildcard subdomain (*.xxxxx.com) and alias using the instructions here: https://docs.pivotal.io/pivotalcf/1-10/customizing/cloudform-er-config.html#cname
what is the correct url to open the PCF UI?
If you mean Ops Manager, it is whatever DNS entry you created and pointed to the Ops Manager public IP address in this step: https://docs.pivotal.io/pivotalcf/1-10/customizing/cloudform-om-deploy.html#create-dns
For the ERT UI, there is the Pivotal Apps Manager https://docs.pivotal.io/pivotalcf/1-10/console/index.html
which is usually apps.system.xxxx.com
You can see what system apps are deployed by connecting to Cloud Foundry using the CLI and seeing which apps are in the system org, and what their routes are.
for now, if I open http://login.xxxxx.com/ it responses with 503. what can be the reason?
If the DNS has not been set up, I'm surprised you're getting any response whatsoever. Usually you get 503s when the routers connected to the load balancers are failing for some reason (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/ts-elb-error-message.html#ts-elb-errorcodes-http503)
I have such error in Ops Manager. What can be the reason of such error?
This would explain the 503s if the router is unhealthy. I would SSH into those machines and see what the logs say (in /var/vcap/sys/logs), which should tell you what is going wrong.
The reason of the red instances on the Status page was that my AWS account had limit on number of instances and it failed to create VMs for this nodes.
To find more information open Changelog (https://ops_manager_host/change_log) and the open log of the FAILED setup.

Django Elastic Beanstalk App - Cannot Set Secure Listener Port to 443: LoadBalancerHTTPSPort

I'm a pretty new developer and deployed my first Django app via Elastic Beanstalk. I want to serve https requests and have configured my SSL certificate and have my load balancer set up correctly. When I go into EB > Configuration > Secure listener port and set it to 443 I'm getting the error upon saving:
LoadBalancerHTTPSPort: You have specified both the #deprecated(:default.aws:elb:loadbalancer:LoadBalancerHTTPSPort)
option as well as one in the new aws:elb:listener:443 namespace.
The :default.aws:elb:loadbalancer:LoadBalancerHTTPSPort option will be ignored.
Not sure what I'm missing because I'm still not able to serve https requests
I had the same problem with a NodeJS Elastic Beanstalk app. However, I was able to get around it by updating the Listener/Certificate settings via the AWS EC2 console (https://console.aws.amazon.com/ec2/), via the Load Balancers section (under LOAD BALANCING).
I was updating the certificate for a staging version of a cloned environment. This was the only way I could assign a different certificate to the staging environment.
See more at http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-create-https-ssl-load-balancer.html

WSO2 API Manager change in hostname not reflecting

I am trying Wso2 API Manager in EC2 Ubuntu instance. When i run the ./wso2server.sh, the host name is set to the Private IP of the EC2 machine. To change that Private IP to my elastic IP i changed
<ServerURL>https://${carbon.local.ip}:${carbon.management.port}${carbon.context}/services/</ServerURL>
to
https:// <-- elastic_IP --
:${carbon.management.port}${carbon.context}/services/
inside PRODUCT_HOME/repository/conf/carbox.xml.
This didn't solve my issue. So i replaced all ${carbon.local.ip} present inside PRODUCT_HOME/repository/conf/ to my elastic IP, but still when i started the server i am getting 'CarbonUIServiceComponent Mgt Console URL with my private IP'
can someone help me solve this issue of changing the Private_IP to elastic_IP ?
Thanks
Thanks for trying out API Manager on EC2.
This seems to be a bug in API Manager 1.0.0. Created an issue (https://wso2.org/jira/browse/APIMANAGER-703) to track the progress. Fix will be available on API Manager 1.0.1 release (scheduled to happen by mid of September 2012).