Any way to suppress "WARN P2P [p2p-tcp]: tcp-connect-peer pass max-active-nodes"?

As the title says, is there nny way to suppress the following warning message?

WARN  P2P  [p2p-tcp]: tcp-connect-peer pass max-active-nodes

The log section of my config.xml files is configured as follows:

<log>
    <!--Enable/Disable logback service; if disabled, output will not be logged -->
    <log-file>true</log-file>
    <!--Sets the physical location on disk where log files will be stored.-->
    <log-path>log</log-path>
    <ROOT>INFO</ROOT>
    <GEN>INFO</GEN>
    <VM>ERROR</VM>
    <SYNC>INFO</SYNC>
    <CONS>INFO</CONS>
    <DB>ERROR</DB>
    <API>INFO</API>
    <P2P>INFO</P2P>
    <GUI>INFO</GUI>
</log>

ROOT defaults to WARN, so I changed it to INFO.

P2P is already set to INFO.

Nothing else is set to WARN.

So why is that message still being displayed?

Iā€™m just trying to clean up my node output for easier reading / monitoring.

Thanks.

1 Like

I believe you can get rid of those messages by changing the default peer count in the config.xml file from 128 to a higher number.

You need be sure your network can handle the added peers and have sufficient RAM as the kernel will use more RAM if more peers (nodes) connect.

This particular output is tied to an overide which specifies p2pLOG.warn

@Override
public void run() {
    Thread.currentThread().setName("p2p-tcp");
    while (this.start.get()) {
        INode node;
        try {
            Thread.sleep(PERIOD_CONNECT_OUTBOUND);
            if (this.nodeMgr.activeNodesSize() >= this.maxActiveNodes) {
                p2pLOG.warn("tcp-connect-peer pass max-active-nodes");
                continue;
            }

Would be nice to have this follow user defined P2P log rules instead.

1 Like

aah nice point! Thank you so much for this. I was into this issue and tired to tinker around to check if its possible but couldnt get it done. Now that i have seen the way you did it, thanks guys
with
regards