ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vladimir Ozerov <voze...@gridgain.com>
Subject Re: ignite logging not captured in log file (log4j)
Date Wed, 20 Apr 2016 09:26:29 GMT
Hi Binti,

This appears to be a problem with your log4j configuration. Please
double-check it on your side. I did the following:
1) Create a file with the same content as you provided.
2) Set it through system
property:  -Dlog4j.configuration=file:/c:/logger/logger.cfg
3) Run Ignite node.

Result: thousands of debug/info statements from Ignite.

Vladimir.

On Tue, Apr 19, 2016 at 10:28 PM, bintisepaha <binti.sepaha@tudor.com>
wrote:

> Hi,
>
> I am using log4j for clients connecting to the grid. sample log4j file
> below
> (file name = RGP-log4j.properties). I set this file name in VM arguments
> for
> both these args
>
> -Dlog4j.configuration=file:RGP-log4j.properties
> -Djava.util.logging.config.file=file:RGP-log4j.properties
>
> log4j.rootCategory=DEBUG, file
> log4j.appender.file=org.apache.log4j.RollingFileAppender
> log4j.appender.file.File=C:/tmp/logs/RGP.log
> log4j.appender.file.threshold=DEBUG
> log4j.appender.file.layout=org.apache.log4j.EnhancedPatternLayout
> log4j.appender.file.layout.ConversionPattern=[%d{dd MMM yyyy HH:mm:ss.SSS
> z}] [%t] %-5p (%F:%L) %m%n
> log4j.appender.file.MaxFileSize=250MB
> log4j.appender.file.MaxBackupIndex=200
> log4j.logger.org.springframework=INFO
> log4j.logger.org.springframework.jms=INFO
> log4j.logger.org.apache.activemq=INFO
> log4j.logger.org.apache.commons=INFO
> log4j.logger.com.tudor.datagrid=INFO
> log4j.logger.org.apache.ignite=DEBUG
>
> However, on console I see the logging like below, but I do not see the
> below
> being logged to the file.
> This error happen when the grid is down and a client tries to connect to
> it.
> since it does not get logged on the client logs, only the exception stack
> trace, its hard to say which all grid nodes it tried to connect to. Is
> there
> anyway to enable the below logging to file. I am also worried that maybe
> some ignite level logging does not make it to the file, and we may be
> unaware of some exceptions/errors.
>
> [13:44:27]   /  _/ ___/ |/ /  _/_  __/ __/
> [13:44:27]  _/ // (7 7    // /  / / / _/
> [13:44:27] /___/\___/_/|_/___/ /_/ /___/
> [13:44:27]
> [13:44:27] ver. 1.5.0-final#20151229-sha1:f1f8cda2
> [13:44:27] 2015 Copyright(C) Apache Software Foundation
> [13:44:27]
> [13:44:27] Ignite documentation: http://ignite.apache.org
> [13:44:27]
> [13:44:27] Quiet mode.
> [13:44:27]   ^-- To see **FULL** console log here add -DIGNITE_QUIET=false
> or "-v" to ignite.{sh|bat}
> [13:44:27]
> [13:44:27] OS: Windows 7 6.1 amd64
> [13:44:27] VM information: Java(TM) SE Runtime Environment 1.7.0_45-b18
> Oracle Corporation Java HotSpot(TM) 64-Bit Server VM 24.45-b08
> [13:44:27] Initial heap size is 95MB (should be no less than 512MB, use
> -Xms512m -Xmx512m).
> [13:44:29] Configured plugins:
> [13:44:29]   ^-- None
> [13:44:29]
> [13:44:30] Security status [authentication=off, tls/ssl=off]
> [13:45:54] Failed to connect to any address from IP finder (will retry to
> join topology every 2 secs): [grid-tp1-dev/10.22.50.95:47500,
> grid-tp1-dev/10.22.50.95:47501, grid-tp1-dev/10.22.50.95:47502,
> grid-tp1-dev/10.22.50.95:47503, grid-tp1-dev/10.22.50.95:47504,
> grid-tp1-dev/10.22.50.95:47505, grid-tp1-dev/10.22.50.95:47506,
> grid-tp1-dev/10.22.50.95:47507, grid-tp1-dev/10.22.50.95:47508,
> grid-tp1-dev/10.22.50.95:47509, grid-tp2-dev/10.22.50.249:47500,
> grid-tp2-dev/10.22.50.249:47501, grid-tp2-dev/10.22.50.249:47502,
> grid-tp2-dev/10.22.50.249:47503, grid-tp2-dev/10.22.50.249:47504,
> grid-tp2-dev/10.22.50.249:47505, grid-tp2-dev/10.22.50.249:47506,
> grid-tp2-dev/10.22.50.249:47507, grid-tp2-dev/10.22.50.249:47508,
> grid-tp2-dev/10.22.50.249:47509, grid-tp3-dev/10.22.50.250:47500,
> grid-tp3-dev/10.22.50.250:47501, grid-tp3-dev/10.22.50.250:47502,
> grid-tp3-dev/10.22.50.250:47503, grid-tp3-dev/10.22.50.250:47504,
> grid-tp3-dev/10.22.50.250:47505, grid-tp3-dev/10.22.50.250:47506,
> grid-tp3-dev/10.22.50.250:47507, grid-tp3-dev/10.22.50.250:47508,
> grid-tp3-dev/10.22.50.250:47509, grid-tp4-dev/10.22.50.251:47500,
> grid-tp4-dev/10.22.50.251:47501, grid-tp4-dev/10.22.50.251:47502,
> grid-tp4-dev/10.22.50.251:47503, grid-tp4-dev/10.22.50.251:47504,
> grid-tp4-dev/10.22.50.251:47505, grid-tp4-dev/10.22.50.251:47506,
> grid-tp4-dev/10.22.50.251:47507, grid-tp4-dev/10.22.50.251:47508,
> grid-tp4-dev/10.22.50.251:47509]
>
> However, thi sis what is logged in the log file
> [19 Apr 2016 13:45:54.345 EDT] [main] ERROR (ReconcilePositions.java:149)
> class org.apache.ignite.IgniteException: Failed to start manager:
> GridManagerAdapter [enabled=true,
> name=org.apache.ignite.internal.managers.discovery.GridDiscoveryManager]
> class org.apache.ignite.IgniteException: Failed to start manager:
> GridManagerAdapter [enabled=true,
> name=org.apache.ignite.internal.managers.discovery.GridDiscoveryManager]
>         at
>
> org.apache.ignite.internal.util.IgniteUtils.convertException(IgniteUtils.java:882)
>         at org.apache.ignite.Ignition.start(Ignition.java:350)
>         at
>
> com.tudor.datagridI.TradingDataAccessImpl.<init>(TradingDataAccessImpl.java:95)
>         at
>
> com.tudor.datagridI.DataGridClient.getTradingDataAccess(DataGridClient.java:22)
>         at
> com.tudor.reconcile.ReconcilePositions.<init>(ReconcilePositions.java:82)
>         at
> com.tudor.reconcile.ReconcilePositions.main(ReconcilePositions.java:119)
> Caused by: class org.apache.ignite.IgniteCheckedException: Failed to start
> manager: GridManagerAdapter [enabled=true,
> name=org.apache.ignite.internal.managers.discovery.GridDiscoveryManager]
>         at
>
> org.apache.ignite.internal.IgniteKernal.startManager(IgniteKernal.java:1510)
>         at
> org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:917)
>         at
>
> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1688)
>         at
>
> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1547)
>         at
> org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1003)
>         at
>
> org.apache.ignite.internal.IgnitionEx.startConfigurations(IgnitionEx.java:929)
>         at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:815)
>         at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:714)
>         at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:584)
>         at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:554)
>         at org.apache.ignite.Ignition.start(Ignition.java:347)
>         ... 4 more
> Caused by: class org.apache.ignite.IgniteCheckedException: Failed to start
> SPI: TcpDiscoverySpi [addrRslvr=null, sockTimeout=5000, ackTimeout=5000,
> reconCnt=5, maxAckTimeout=30000, forceSrvMode=false,
> clientReconnectDisabled=false]
>         at
>
> org.apache.ignite.internal.managers.GridManagerAdapter.startSpi(GridManagerAdapter.java:258)
>         at
>
> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.start(GridDiscoveryManager.java:660)
>         at
>
> org.apache.ignite.internal.IgniteKernal.startManager(IgniteKernal.java:1505)
>         ... 14 more
> Caused by: class org.apache.ignite.spi.IgniteSpiException: Join process
> timed out.
>         at
>
> org.apache.ignite.spi.discovery.tcp.ClientImpl$MessageWorker.tryJoin(ClientImpl.java:1512)
>         at
>
> org.apache.ignite.spi.discovery.tcp.ClientImpl$MessageWorker.body(ClientImpl.java:1327)
>         at
> org.apache.ignite.spi.IgniteSpiThread.run(IgniteSpiThread.java:62)
>
>
> Please let me know if I can provide more information.
>
> Thanks,
> Binti
>
>
>
> --
> View this message in context:
> http://apache-ignite-users.70518.x6.nabble.com/ignite-logging-not-captured-in-log-file-log4j-tp4334.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>

Mime
View raw message