Start/Stop in Spring STS boot dashboard - spring-boot

I’m having an issue with the spring boot dashboard. When I start an app the icon show the loading icon and never reaches the green up icon though the app does start and accepts requests. When I stop the app it takes a couple of minutes to stop.
I have access to another machine where the dashboard behaves as expected.
I’m using the getting started rest service app (gs-rest-service-complete) targeting spring boot 1.4.3.release with no modifications. I’m using sts 3.8.3.
I’m experiencing the issue on OSX El Capitan 10.11.6
My jdk version is 1.8.0_112
I've found a couple of similar questions but the suggestions don't resolve my issue.
This one relates to bad entry in hosts file - mine is ok (Spring Boot Dashboard projects never finish starting)
This one suggests switching life-cycle-bean support off, but I want to know how to use run the dashboard with it enabled. The response to this question also requests a sample app, as stated I'm using the gs-rest-service-complete sample app (STS Spring Boot Dashboard Doesn't Recognize Successful Start)
What might be causing this problem?

It sounds like the machine where it doesn't work might have some kind of firewall stopping the JMX connections. These connections are made via sockets. Firewall type software sometimes prevents the connections. If you know of firewall type software running on your machine you could try disabling it or (less drastically) trying to reconfigure it so it allows connections between different processes running on your machine.

Related

How to configure SSL on Spring Boot - Angular app on EC2 instance

I can't get my backend to send data after switching to secure connection.
I was able to successfully configure SSL with ssl_mod on Apache web server that serves my Angular app on AWS Linux 2 instance, the site is secure - but my Spring Boot backend is not responding, it is not sending any data. When I additionally convert .crt and .key files to PK12 that Spring understands and I use it in Spring app - I get this error:
net::ERR_SSL_PROTOCOL_ERROR
I've tried using AWS Load Balancer, but same thing happens, frontend is loaded in secure environment, but backend is not sending any data even after I change backend calls from http to https://my-site.com. I've tried following documentation and added this to my backend app properties file:
server.tomcat.remoteip.remote-ip-header=x-forwarded-for
server.tomcat.remoteip.protocol-header=x-forwarded-proto
and security configuration upgraded with this:
http.requiresChannel().anyRequest().requiresSecure()...
but to no avail.
Lastly, I created a new instance on EC2 and this time I didn't configure apache for the frontend on linux, I just used SSL certificate on my backend app with following properties:
server.ssl.enabled=true
server.ssl.key-store=/etc/ssl/mydomain_com.p12
server.ssl.key-store-password=******
server.ssl.key-alias=mydomain
To no avail, now my site doesn't load at all. I'm despearate, struggling with this for a week now. What is the procedure for a full stack app? How do I do it?
Let me respond because on the same day I asked the question - I found a solution. The solution was - converting free SSL certificate with the help of this website:
https://www.sslshopper.com/ssl-converter.html
After I've plugged it in my Spring Boot app - it works. Before that, I made the conversion with OpenSSL on Windows, and it seems it was faulty. I'm so happy now... I read so many articles on this website on my one and a half year journey of learning to code - and got stuck on the last step. I'm so happy. Thank you all for this amazing website and all the help. I love you! I'm proud of being a part of this programming community... the best humor, the best people!
Peace

Our GITBLIT/Jetty service has stopped working after new stringent network security at our company

The GitBlit service on one of our Windows Server 2012 R1 was working just fine until our company implemented hyper-stringent security corporate-wide.
The gitblit service is running, but when trying to reach the gitblit page via web browser results in Jetty error 503, service unavailable.
I've been unable to come up with a google query to find out how I can check to see if jetty is running or how to troubleshoot.
Any help would be very much appreciated.
It turns out that what I needed to do is check the gitblit logs where I found that a colleague across the pond left me with a corrupted config file. When I removed the problem, it started working again.

Glassfish 4.1.1, domain installed as a service does not restart as a service

I got a Glassfish 4.1.1 copy with two domains on Win2012R2 (no clusters, no instances). I've set a windows service for each of those.
Both services run regularly up until the moment when I restart either or both of them thru their admin web console (server (Admin Server) -> Restart). The following happens:
The domain-related service stops, but does not start again,
The allegedly stopped domain is perfectly functional (deployed apps and admin console are there) (!!!),
When I try to start the win service manually, I get Error 1067 (GF reports "something" is already listening on required ports and that's the domain itself that is now, somehow, NOT run as a service!),
I can start the service again only after I've stopped the domain thru server (Admin Server) -> Stop.
Why did I mention two domains? Because this does not happen when I have just one domain with its' service.
Domains do not share ports, only things in common are the JDK/JRE and general GF files.
Is this a bug in Glassfish or did I set something wrong?
This is a limitation, rather than a bug. The problem is that GlassFish has no way to tell whether or not it is running as a service (and, if it is, what the name of that service would be).
The restart command means that GlassFish is restarting itself, so Windows detects that the process it started has been terminated and shows the service as stopped, but GlassFish spawns a new JVM itself. It has no capability to tell Windows to start the service again.
Essentially, the behaviour you are seeing is expected.
After some more testing, I realized what was going on:
Glassfish is definitively capable of restarting its' own Windows service,
The thing that was happening is it takes GF a few seconds do this on its' own,
But, before GF domain could restart as a service, I clicked the URL to return to admin console, every time. That forced it to run as an ordinary executable.
It does seem like the restart happens faster with just one win service, but I won't claim that as an absolute truth without more testing, for which I have no time now.

Can ehcache monitor be configured over https?

I have an application that is running on a secure site and I installed the ehcache probe jar. Everything seems to be running but I can't access it through the browser because by default the server is running on secure https.
Is there a way to view the monitor through https://myserver.com:9889/monitor?
I'm using the 30-day trial development version of ehcache monitor. Could this be the problem and perhaps the paid production version works?
Thanks.
You are using a free version and some resources maybe are not working or has a restriction , remember all that is free won't work perfect.

Spring OAuth2 Provider Client Authentication 401 not authorized error using CloudFoundry as client

This question is primarily for the CloudFoundry developers. Has something changed that would make a client application using spring social unable to use basic client authentication to communicate with my core application hosting an oauth2 provider? When I run the client application on a tomcat server everything works. It also worked on a cloudfoundry microinstance about 2 weeks ago. Now I get a 401 unauthorized error making a call to the service at "../oath/token" on my core application. To see what I am referring to, my application is http://www.metroseattlegamers.com If you click the "Games" link at the top it brings you to a separate application. If you sign in using the application at http://gamerepository.metroseattlegamers.com, the "sign in with metroseattlegamers account" button uses custom spring social code to communicate to my spring oauth2 provider code at http://www.metroseattlegamers.com. That all works fine because it is running on two separate tomcat servers on different machines. However, I tested and wrote everything using cloudfoundry micro instances to run client apps. As I said, it was working about a week or two weeks ago. Now I get a 401 error when I run the client on a cloudfoundry instance. Everything still works great when I run two separate tomcat servers on separate machines. Rather than include a bunch of code, I am just curious if anything has changed with how cloudfoundry microinstances work in the last week or two that may have caused this problem.
No as far as I know. Would it be possible for you to file a ticket at the official support page: http://support.cloudfoundry.com. There you can get a private agent to assist and maybe share the implementation of your app to further debug. You will need to sign in by the account you registered on www.cloudfoundry.com.

Resources