• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

How to delete this WARNING

 
Ranch Hand
Posts: 198
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a spring boot app which is deployed on tomcat on RHEL server which is trying to connect to ActiveMQ and it keeps on throwing following error in tomcat logs. The main reasons I have noticed why this happened was because either ActiveMQ isn't running or listening over another port.

The main issue is how to get rid of this warning from tomcat? How can I kill this? Because of this warning, it won't let other deployed apps on the tomcat to run properly. So I had to ask my server team to reeboot the server to get rid of this warning. This option isn't feasible for me everytime I run into this issue.  Another weird thing I have noticed is that, whenever the following error occured, I deleted the application from tomcat webapps directory which was trying to connect to tcp://localhost:61616 and the tomcat live logs were still showing same error. So even though the application didn't exists in tomcat, this WARNING was still going on and preventing other apps from deploying.

My application.properties of springboot app has following configuration:

 


   

 
Ranch Foreman
Posts: 1903
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you want want to disable console logging. Here is an example https://www.baeldung.com/spring-boot-disable-console-logging
 
Jack Tauson
Ranch Hand
Posts: 198
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Himai Minh wrote:I think you want want to disable console logging. Here is an example https://www.baeldung.com/spring-boot-disable-console-logging



Thanks. But I think that would disable 100 % of console logging. I was wondering about killing this WARNING specific to ActiveMQ. Because if such a thing happens I would like to see the logs that something failed and at the same time I need to have a way to kill this. Is it possible?
 
Marshal
Posts: 25594
69
Eclipse IDE Firefox Browser MySQL Database
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can either hide those messages or you can fix whatever it is that causes the messages to appear. It may be that you can fine-tune the logging configuration to exclude those specific messages, but I don't know how to do that.

However you said

Because of this warning, it won't let other deployed apps on the tomcat to run properly.



So it doesn't sound like hiding the warning is what you want to do. Instead you want to fix the underlying problem.

But it seems to me that you already had a long thread about not being able to connect to ActiveMQ. Looks like that problem never did get solved. Maybe you should reply to that thread and carry on there.

 
Saloon Keeper
Posts: 22125
151
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yeah. It's pretty plain that your app cannot connect to port 61616 on the local machine. While this could indicate a firewall problem, usually localhost has free connection abilities, so the #1 reason why you'd get this would be if there was no ActiveMQ server running and listening to the localhost port 61616.

Three possible reasons for this:

1. ActiveMQ is not running on the local machine
2. ActiveMQ is not configured to listen at address 127.0.0.1 (localhost). Many servers understand that a machine may have multiple network interfaces and can be configured to only listen to certain ones.
3. Whatever is listening on port 61616 isn't hearing the connection protocol it wishes to accept. A web equivalent would be if you made an HTTP request to an HTTPS connection port - stuff that would normally go to port 80 but you're sending it to port 443.

And, while the log seems to indicate total failure to connect, even if some connections were getting through, that many messages would indicate a very inefficient operation that needs fixing.
 
Himai Minh
Ranch Foreman
Posts: 1903
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, you may find this stackoverflow thread helpful :https://stackoverflow.com/questions/30030086/activemq-unable-to-connect-to-a-public-queue
Do you need to add this property queueTCP = tcp://localhost:61616
 
I found some pretty shells, some sea glass and this lovely tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic