Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8923973
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T07:16:32+00:00 2026-06-15T07:16:32+00:00

I have multiple webapps which get deployed on a tomcast server. In one of

  • 0

I have multiple webapps which get deployed on a tomcast server.

In one of my webapp’s log4j.properties, i added the following Socket HUB appender so that the logs are sent to that socket.

log4j.appender.SOCKET=org.apache.log4j.net.SocketHubAppender 
log4j.appender.SOCKET.port=9999
log4j.appender.SOCKET.locationInfo=true

Everything gets deployed fine.

My second application’s log4j.properties also has the same appender.

log4j.appender.SOCKET=org.apache.log4j.net.SocketHubAppender 
log4j.appender.SOCKET.port=9999 
log4j.appender.SOCKET.locationInfo=true

Now if I try to add this second webapplication to the tomcat server which already contains the first web-application, it throws out a “Port already in Use” error in the logs.

However, if i change the port of the second application to 9998, then no error can be seen in the logs. Afaik, the port mentioned here is the reciver’s port and hence it should not be problem if multiple applications use the same reciver port.

Or should I configure this appender in Tomcat’s log4j.properties, but not in every application that gets deployed in it.

Adavanced Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T07:16:33+00:00Added an answer on June 15, 2026 at 7:16 am

    SocketHubAppender acts as TCP server here and starts listening on given localhost port. Log viewer (Apache Chainsaw, OstrosLogViewer,…) connects to this port and receives/pulls data from.

    SocketAppender, on other hand, acts as TCP client, connects to given remote server:port and sends/pushes data to.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

multiple webapp running on same tomcat using same jvm. sometime, one webapp that have
I'm using one server to host multiple Node.js web apps, which are distributed across
We have multiple webapps running in our container (Tomcat 6/7) and each webapp configures
I have two applications. One is a legacy webapp which is servlet-based. The other
I have multiple projects which are to be hosted together in a Tomcat container,
I have multiple UpdatePanels on a webpage, one inside UserControl (Purple ColorBox as show
I have multiple domains on my server. I want to redirect all of them
I'm starting an Android app which will have multiple Activities. It will be using
I have a ASP.NET C# business webapp that is used internally. One issue we
I have several webapps deployed to production. I have used Tomcat as my servlet

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.