aspose file tools*
The moose likes Other Open Source Projects and the fly likes log4j:ERROR Could not connect to remote log4j server at [localhost]. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "log4j:ERROR Could not connect to remote log4j server at [localhost]. " Watch "log4j:ERROR Could not connect to remote log4j server at [localhost]. " New topic
Author

log4j:ERROR Could not connect to remote log4j server at [localhost].

marshal ma
Greenhorn

Joined: May 31, 2004
Posts: 23
Though I solve the old problem, their is new problem.I got the following error when I started weblogic on local machine (localhost:7001).

--------------------------------------------------------------------------------------------------------------------------

log4j:ERROR Could not connect to remote log4j server at [localhost]. We will try again later.

java.net.ConnectException: Connection refused: connect

at java.net.PlainSocketImpl.socketConnect(Native Method)

at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)

at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)

at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)

at java.net.Socket.connect(Socket.java:434)

at java.net.Socket.connect(Socket.java:384)

at java.net.Socket.<init>(Socket.java:291)

at java.net.Socket.<init>(Socket.java:147)

at org.apache.log4j.net.SocketAppender.connect(SocketAppender.java:224)

at org.apache.log4j.net.SocketAppender.activateOptions(SocketAppender.ja

va:182)

at org.apache.log4j.PropertyConfigurator.configureOptionHandler(Property

Configurator.java:451)

at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigura

tor.java:585)

at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigura

tor.java:555).................(lots of such information)

----------------------------------------------------------------------------------------------------------------------------

The configuration for log4j is like the following:

----------------------------------------------------------------------------

log4j.rootCategory=INFO,A4,Chainsaw

log4j.appender.A4=org.apache.log4j.FileAppender

log4j.appender.A4.File=XMLformat.log

log4j.appender.A4.layout=org.apache.log4j.xml.XMLLayout

log4j.appender.A4.append=false


log4j.appender.Chainsaw=org.apache.log4j.net.SocketAppender

log4j.appender.Chainsaw.RemoteHost=localhost

log4j.appender.Chainsaw.port=7005

log4j.appender.Chainsaw.locationInfo=false

---------------------------------------------------------------------------
I know their is problem about socket, since I run the server in local machine(7001), client is also on the same machine, in such case I don't know what I should do? I tried to configure Chainsaw.port=7001, still didn't work.

Any help will be appreciated!

Thanks!

marshal
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: log4j:ERROR Could not connect to remote log4j server at [localhost].