Azure Application Insights error when deploying to tomcat - azure

I kept running into the following error messages when after deploying my application using Application Insights. I'm following the Microsoft tutorial, found here, but there still seems to be a dependency error.
Error creating bean with name 'webRequestTrackingFilterRegistrationBean'
java.lang.NoSuchMethodError: com.microsoft.applicationinsights.internal.config.ReflectionUtils.addClass(Ljava/lang/Class;)

I found that the issue was with my dependencies. It turns out that I needed to add the insight-core dependency. Previously I only had applicationinsights-web as my dependency and this ran fine locally but did did not work once I deployed my app.
implementation group: 'com.microsoft.azure', name: 'applicationinsights-core', version: '2.+'

Related

Elastic Beanstalk fails to deploy my basic Node.js MERN app

ERROR
During an aborted deployment, some instances may have deployed the new application version. To ensure all instances are running the same version, re-deploy the appropriate application version.
I have know idea how to fix this? I can deploy my app on vercel in seconds but AWS is giving me pain for 3 days now. Please somebody help. I checked logs and it only returns this error
Have you followed the upgrade guide in the documentation?
https://metabase.com/docs/latest/operations-guide/running-metabase-on-elastic-beanstalk.html#deploying-new-versions-of-metabase
You cannot use github.com/metabase/metabase/archive/v0.33.2.zip - that's the source code of the entire project - it's not the same as the binary version.

Why do I keep getting the SAME error in ALL meanstack projects: Failed to load resource: net::ERR_CONNECTION_REFUSED

I have been following multiple tutorials on meanstack apps implementing simple CRUD functionalities. I have downloaded several of their complete projects from Github, installed the modules and ran the apps.
I always get this error in the console in the HomePage:
:3000/certain_name:1 Failed to load resource: net::ERR_CONNECTION_REFUSED
Here's the projects codes:
Project1 Github Project2 Github Project3 Github
What is really confusing me is that is the SAME error with EVERY project. So it must have something to do with my pc configuration/vs code configuration ... something else in my configuration?
I don't think there's any problem with the projects code. You can check them out on Github. They should be fully functional.
Any idea what may be causing this?
Connection ERR_CONNECTION_REFUSED means, that your service which you are trying to access is not running. Are you sure that your projects are running?

DotNet Core web app working locally but not when deployed to Azure

I am trying to build a new web app using DotNet Core.
The app is Web API + AngularJS with ui-router.
The same app was working correctly both locally and on Azure using ASP.NET 5.
When I updated, I fixed a lot of stuff and got the new app working locally.
However, on Azure, I have the following error whenever I try to do any action:
"The resource you are looking for has been removed, had its name changed, or is temporarily unavailable."
I searched for the error online and tried to use the provided solutions but in vain (e.g.: ASP.NET Core app not working after publish to Azure).
I did not post any code here because honestly I don't know where to start and what to post. Could someone please advise?
Regards,
In case someone was facing the same issue:
I was able to detect the problem by following this link (How do I debug an ASPNET Core MVC Application Deployed in Azure)
This helped me detect that it was not able to find node_modules
I added the node_modules directory to the publishOptions -> include
It worked!
Regards,

Deployment failure of helloworld-spring-webapp, Spring 3 and Jersey sample to Glassfish 4

I've pulled helloworld-spring-webapp from https://github.com/marko-asplund/jersey.git and tried to deploy it onto the latest Glassfish 4 application server, using java ee-7 (jdk 1.7.0_45) and jersey 2.3-SNAPSHOT. Deployment fails with this error:
Error occurred during deployment: Exception while loading the app : CDI deployment failure:WELD-001408 Unsatisfied dependencies for type [Ref] with qualifiers [#Default] at injection point [[BackedAnnotatedParameter] Parameter 1 of [BackedAnnotatedConstructor] #Inject org.glassfish.jersey.server.internal.routing.UriRoutingContext(Ref, ProcessingProviders)]. Please see server.log for more details.
My installed version of Jersey on Glassfish 4 is 2.0-0.1, with an update available to move to 2.0-0.2.
I attempted this because I'm getting similar errors attempting to get CDI working with an application I'm working with, so it's fortunate to find that this example also fails with similar results. Does anyone know how to make this deploy and function correctly with Glassfish 4?
Edit:
I pulled a mirror image of that example and pulled it again from the source (here: https://github.com/jersey/jersey/tree/2.4.1). I can deploy that sample. There is a reference to a jira item JERSEY-2032 in the latest pom of the helloworld-spring-webapp. So now I need to figure out what was done differently between versions that makes this sample deploy correctly so that I can make the same changes to my work-in-progress application.

Glassfish DeploymentException: Error in linking security policy for

I have been trying to deploy my web application (war) from Glassfish AdminConsole but I keep getting the following error message -
Exception while loading the app : Error in linking security policy for MyApp-war -- Inconsistent Module State.
But it deploys without any problem when I do it from Netbeans. (I don't know if Netbeans is doing something that I am missing before deploying the application.)
And I also tried with the latest version of Glassfish (i.e. V3.1.1 (build 12)
), and I can deploy the same application without any problem from AdminConsole.
I am using Glassfish 3.1 (build 43) and Netbeans 7.0.
Is there any Security Policy setting that I have to have before deploying my application with this version of Glassfish?
The same thing was happening to me.
Here is what I did:
Stoped the Glassfish server
Deleted all the content from glassfishhome/glassfish/domains/yourdomainname/generated
Started Glassfish
It worked for me. But what still sucks is that everytime I need to deploy I need to follow this procedure again...
I will answer this in response to the comment of #SteveTaylor. His answer in the above comment helped me solving the problem, so he is the one who deserves the credits.
Original answer from #SteveTaylor:
The problem is a corrupt OSGi cache. The reason upgrading worked for
you is because you started with a clean OSGi cache. All that's needed
to fix this problem is delete the entire OSGi cache under
$GLASSFISH_HOME/glassfish/domains//osgi-cache
This answer worked for me as well. Thanks a lot. I am using a cluster (Oracle GlassFish 3.1.2.2) consisting of two nodes and a domain server. I removed the OSGi cache under all three directories (2 nodes and domain) after I stopped the cluster and restarted it then. After that, the problem was solved.
It happen to me to, especially after I check out different version of my web application and try to deploy it to Glassfish.
The only certain solution I've found is to completely stop galssfish, restart it and deploy the application.
Probably a bug in the version of Glassfish I was using.
Basically changing to a different (later) version solved the problem.
In my case, I was missing #Stateless tag in one of my Managed Beans. Adding it, solved it for me. Hope it helps.
I don't know if this helps, but I got the same error when deploying from the command line. In my case I'm using a pretty up-to-date version (GlassFish Server Open Source Edition 3.1.2 (build 23)). What worked for me was removing --force=true from this:
$ sudo /usr/local/glassfish3/bin/asadmin deploy --force=true ~cornell/designer.war
What's important (I think) is that I had not previously deployed the app. Confusing!
In my case ,just I do "clean and build". that usually works well.
It happen to me too. In my case, it have occurred when I try to deploy the project and forget to start the database server, and then when I start the database server and I deployed again, I got this error message.
When this occurred, I recompile the code, stop the server, undeploy the old project and deploy the new again.

Resources