mulesoft-catalyst / metrics-toolkit

The metrics toolkit (formerly metrics accelerator/framework) is a Mule application intended to collect, aggregate and load platform metrics into different visualization systems; providing out of the box integrations and visualization options, including useful dashboards and charts.
The Unlicense
83 stars 105 forks source link

Build Failure deploying to Cloudhub IllegalStateException #165

Closed GoBenGoh closed 2 years ago

GoBenGoh commented 2 years ago

I tried to deploy the toolkit (mule-4.4.0 branch) to Cloudhub but I'm getting an IllegalStateException: "Cannot start embedded container". The toolkit appears to work fine on my localhost. Here are the event details from the error log. image

GoBenGoh commented 2 years ago

image Here is the final error message

richardmckinley commented 2 years ago

Hi @GoBenGoh It looks like this is an error executing the MUnit tests before packaging the deployable. If you execute mvn clean test on the project you should get an output similar to this: image If not, there is likely something wrong with your Maven setup, which I cannot advise on. For reference, how are you deploying to CloudHub? For example, I have just tested deploying by exporting the .jar from Studio and uploading to CloudHub without issue. This will not resolve your MUnit/Maven issue but may be a temporary workaround. Richard

GoBenGoh commented 2 years ago

I'm deploying to Cloudhub via Anypoint Studio. I think it's an error with my MUnit or Maven like you said. I cannot run the app if -DskipMunitTests is not present in the Maven command for building.

Here is a screenshot of the errors: image

PS I'm using the embedded Maven installation (3.6.3) which is the default setting in Anypoint Studio

GoBenGoh commented 2 years ago

I've also found that MUnit works fine on my other projects. I'm guessing the pom file you used is exactly the same as the one from the 4.4.0 branch?

richardmckinley commented 2 years ago

Yes I've just cleaned my local Maven repo, and run from feature/mule-4.4.0 to double check and it's working as expected.

I think you should check out this article as I suspect this is the cause.

As I can't reproduce I'm going to close this as not being an issue related to the toolkit. I'm afraid I cannot provide any support on Mule runtime, Maven etc. issues. If you need help with these you can reach out to your Customer Success Manager to direct you appropriately.

If you come across issues that you think are directly related to the toolkit then please do open another issue.

Thanks, Richard

GoBenGoh commented 2 years ago

I found a few people with a similar issue to me online. Is one of the dependencies only accessible from a mule enterprise repository rather than a public mule repository? Because it seems like the most common answer to my issue is setting up my maven settings.xml file to access the enterprise repository which requires credentials from Mulesoft Support.

richardmckinley commented 2 years ago

I found a few people with a similar issue to me online. Is one of the dependencies only accessible from a mule enterprise repository rather than a public mule repository? Because it seems like the most common answer to my issue is setting up my maven settings.xml file to access the enterprise repository which requires credentials from Mulesoft Support.

Yes - that's what is described in the article linked above

GoBenGoh commented 2 years ago

Sorry I don't know how I missed that. That was really dumb on my part.