Backstage Application not fetching catalog entities

593 views Asked by At

I have installed a fresh backstage application on a Azure Ubuntu 20 server. I am following the steps mentioned in the backstage documentation https://backstage.io/docs/getting-started/. I have also have an external public IP in Azure which i want to use to access the backstage application from my machine. below is my app-config.yaml configuration. I have added 0.0.0.0 for both frontend, backend baseUrl and Cors Url

app:
  title: Scaffolded Backstage App
  baseUrl: http://0.0.0.0:3000

organization:
  name: My Company

backend:
  # Used for enabling authentication, secret is shared by all backend plugins
  # See https://backstage.io/docs/auth/service-to-service-auth for
  # information on the format
  # auth:
  #   keys:
  #     - secret: ${BACKEND_SECRET}
  baseUrl: http://0.0.0.0:7007
  listen:
    port: 7007
    # Uncomment the following host directive to bind to specific interfaces
    # host: localhost
  csp:
    connect-src: ["'self'", 'http:', 'https:']
    # Content-Security-Policy directives follow the Helmet format: https://helmetjs.github.io/#reference
    # Default Helmet Content-Security-Policy values can be removed by setting the key to false
  cors:
    origin: http://0.0.0.0:3000
    methods: [GET, HEAD, PATCH, POST, PUT, DELETE]
    credentials: true

I am able to access the backstage application with the external IP but get the error 'Cannot fetch catalog entities' See Scerror sreenshot.

I then went ahead and added the external IP to the /etc/hosts file and added the external IP to the app-config.yaml. baseURL (both frontend and backend) now becomes http://52.249.200.192:3000 as well as cors URL. Save and run yarn dev and get the below error EADDDRNOTAVAIL

I have added the external IP to the NIC of the VM. Ports 3000, 7007, 22 are allowed as inbound rules to the network security group associated with the VM.

I went ahead and played with the config file and changed the front end baseUrl and CorsUrl to 0.0.0.0 and the backend baseUrl to http://52.249.200.192:7007. Save and yarn dev but still no luck and now i get this when accessing the applicationCORS POlicy Blocked

and this is what i get in the consoleConsole Log

Not sure what to change in the configuration file or any other file to make this work.

0

There are 0 answers