can you please send your configuration *and* the actual exception message with 
traceback (NOT the code)?

    On Tuesday, May 10, 2022, 08:39:06 AM EDT, EDMONDO SENA <edse...@gmail.com> 
wrote:  
 
 The exception is the following:




Which exception are you seeing? That block of code could throw about 5 
different exceptions.Can Which exception are you seeing? That block of code 
could throw about 5 different exceptions. Can you post the actual exception and 
traceback?Sent from AT&T Yahoo Mail on AndroidOn Tue, May 10, 2022 at 5:19 AM, 
EDMONDO SENA<ed...@gmail.com> wrote: Hi all,I am sending the logs of my 
subsystems to the SyslogServerbut I see that the following exception is raised 
in TCPSocketManager.Could you help me understand why? I am using log4j 2.17 and 
syslog0.9.46.The exception is this line 243 of the TCPSocketManager class:206   
 @SuppressWarnings("sync-override") // synchronization on "this"is done within 
the method207    @Override208    protected voidwrite(final byte[] bytes, final 
int offset, final int length, finalboolean immediateFlush) {209        if 
(socket == null) {210if (reconnector != null && !immediateFail) 
{211reconnector.latch();212            }213            if (socket == null){214  
              throw new AppenderLoggingException("Error writingto " + getName() 
+ ": socket not available");215            }216}217        synchronized (this) 
{218            try {219  writeAndFlush(bytes, offset, length, 
immediateFlush);220} catch (final IOException causeEx) {221                
final Stringconfig = inetAddress + ":" + port;222                if (retry 
&&reconnector == null) {223                    reconnector 
=createReconnector();224                    try {225    
reconnector.reconnect();226                    } catch (finalIOException 
reconnEx) {227                        LOGGER.debug("Cannotreestablish socket 
connection to {}: {}; starting reconnector thread{}",228                        
        config,reconnEx.getLocalizedMessage(), reconnector.getName(), 
reconnEx);229                    reconnector.start();230throw new 
AppenderLoggingException(231String.format("Error sending to %s for %s", 
getName(), config),causeEx);232                    }233                    try 
{234                writeAndFlush(bytes, offset, length,immediateFlush);235     
               } catch (final IOException e){236                        throw 
new AppenderLoggingException(237                          String.format("Error 
writing to %s afterreestablishing connection for %s", getName(),238             
   config),239causeEx);240                    }241                    
return;242          }243                final String message 
=String.format("Error writing to %s for connection %s", getName(),config);244   
             throw new AppenderLoggingException(message,causeEx);245            
}246        }247    }Thanks in advance.
  
//Edmondo.you post the actual exception and traceback?
  

Reply via email to