0

I am following the MuleSoft Development Fundamentals course for Mule 4 and i'm trying to deploy the project to CloudHub.

As I am using a work machine I do not have access to port 8081 so I do the development in 8080 however I know CloudHub uses 8081 so when I deploy the project I revert to 8081. It deploys successfully but when accessing the Api it gives me a 502 error. Not sure what I am doing wrong.

bradley plater
  • 1,272
  • 2
  • 9
  • 16

1 Answers1

0

It is very likely you are using the wrong port or the wrong URL. Without more details of the URL it is not possible to say. Are you trying to use HTTPS in the URL? Then it will not work because it is listening in the HTTP port for CloudHub apps (8081). Remember that CloudHub maps 8081 to the default HTTP port so your URL should not have a port number. Use the URL from the dashboard page if in doubt.

Be sure that the port is the correct one. It is better to use the property ${http.port} to be sure, because it is predefined in CloudHub. To test locally you can define it in Studio run configuration / Arguments / VM Arguments as -Dhttp.port=8080.

aled
  • 21,330
  • 3
  • 27
  • 34
  • I tried using ${http.port} however thats not working when deploying, I am using the Link which is given in Runtime Manager. – bradley plater Jun 01 '20 at 07:17
  • That's too vague a description. What is exactly the error message? Does it happen running in Studio or deploying to CloudHub? What is the URL (you can mask the actual application name)? And what is the configuration of the connector in XML? Without more details it will be very difficult that someone can help. – aled Jun 01 '20 at 13:55
  • I am sure Bradly would have resolved it by now, I wanted to add another pointer to this thread, hoping it may help someone. If you are deploying a proxy to your application then double check the implementation URL you entered while deploying proxy from API Manager. – Rai Nov 20 '21 at 01:56