Splunk Enterprise

ERROR Unable to send HTTP in appender

vigneshwaran280
New Member
status = ON
name = log4j
monitorInterval=30

rootLogger.level = OFF

property.defaultUrl = http://localhost:8000
property.defaultToken = 321d1411-04a4-4179-8f49-6ce502f1236a
property.defaultPattern = %d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n

appender.console.type = Console
appender.console.name = console
appender.console.layout.type = PatternLayout
appender.console.layout.pattern = %d [%t] %-5p %c - %m%n

appender.lightconsole.type = Console
appender.lightconsole.name = lightconsole
appender.lightconsole.layout.type = PatternLayout
appender.lightconsole.layout.pattern = %m%n


loggers = DATABASE

logger.DATABASE.name = DATABASE
logger.DATABASE.level = INFO
logger.DATABASE.additivity = false
logger.DATABASE.appenderRefs = database
logger.DATABASE.appenderRef.database.ref = database

appenders = database

appender.database.type = http
appender.database.name = database
appender.database.url = ${defaultUrl}
appender.database.token = ${defaultToken}
appender.database.layout.type = PatternLayout
appender.database.layout.pattern = ${defaultPattern} 
With the following set up when I try to post the logs into the splunk I am getting the following error.
main ERROR Unable to send HTTP in appender [updater] java.io.IOException
public class TestSplunk {
public static final Logger direct = LogManager.getLogger("DATABASE");

    public static void main(String[] args) {
        /*
         * *Log message which has to be visible in splunk dashboard
         */
        direct.info("The following message should be displayed); 
        direct.info("!!!!!!!!!!!!!!!!!!!!!!");
}
The program which I used to post the message into the splunk Dashboard.

 

Labels (1)
0 Karma
Get Updates on the Splunk Community!

Index This | What did the zero say to the eight?

June 2025 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with this month’s ...

Splunk Observability Cloud's AI Assistant in Action Series: Onboarding New Hires & ...

This is the fifth post in the Splunk Observability Cloud’s AI Assistant in Action series that digs into how to ...

Now Playing: Splunk Education Summer Learning Premieres

It’s premiere season, and Splunk Education is rolling out new releases you won’t want to miss. Whether you’re ...