Opened 6 years ago

Closed 6 years ago

#1110 closed defect (fixed)

Logging of connection failures

Reported by: killyourtv Owned by:
Priority: minor Milestone: 0.9.9
Component: api/utils Version: 0.9.8.1
Keywords: Cc:
Parent Tickets: Sensitive: no

Description

If a tunnel is configured for a service that is not running the logs can fill up fairly quickly.

    11/02/13 22:41:39.105 ↓↓↓ 14 similar messages omitted ↓↓↓
    11/02/13 22:41:21.870 ERROR [7.0.0.1:6969] .i2ptunnel.I2PTunnelHTTPServer: Error connecting to HTTP server /127.0.0.1:6969
         java.net.ConnectException: Connection refused
         at java.net.PlainSocketImpl.socketConnect(Native Method)
         at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
         at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
         at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
         at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
         at java.net.Socket.connect(Socket.java:579)
         at java.net.Socket.connect(Socket.java:528)
         at java.net.Socket.<init>(Socket.java:425)
         at java.net.Socket.<init>(Socket.java:241)
         at net.i2p.i2ptunnel.I2PTunnelServer.getSocket(I2PTunnelServer.java:588)
         at net.i2p.i2ptunnel.I2PTunnelServer.getSocket(I2PTunnelServer.java:562)
         at net.i2p.i2ptunnel.I2PTunnelHTTPServer.blockingHandle(I2PTunnelHTTPServer.java:248)
         at net.i2p.i2ptunnel.I2PTunnelServer$Handler.run(I2PTunnelServer.java:509)
         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
         at java.lang.Thread.run(Thread.java:724)
    11/02/13 22:41:19.805 ↓↓↓ 10 similar messages omitted ↓↓↓
    11/02/13 22:41:12.163 ERROR [7.0.0.1:6969] .i2ptunnel.I2PTunnelHTTPServer: Error connecting to HTTP server /127.0.0.1:6969
         java.net.ConnectException: Connection refused
         at java.net.PlainSocketImpl.socketConnect(Native Method)
         at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
         at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
         at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
         at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
         at java.net.Socket.connect(Socket.java:579)
         at java.net.Socket.connect(Socket.java:528)
         at java.net.Socket.<init>(Socket.java:425)
         at java.net.Socket.<init>(Socket.java:241)
         at net.i2p.i2ptunnel.I2PTunnelServer.getSocket(I2PTunnelServer.java:588)
         at net.i2p.i2ptunnel.I2PTunnelServer.getSocket(I2PTunnelServer.java:562)
         at net.i2p.i2ptunnel.I2PTunnelHTTPServer.blockingHandle(I2PTunnelHTTPServer.java:248)
         at net.i2p.i2ptunnel.I2PTunnelServer$Handler.run(I2PTunnelServer.java:509)
         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
         at java.lang.Thread.run(Thread.java:724)
    11/02/13 22:41:11.723 ↓↓↓ 34 similar messages omitted ↓↓↓
    11/02/13 22:40:42.781 ERROR [7.0.0.1:6969] .i2ptunnel.I2PTunnelHTTPServer: Error connecting to HTTP server /127.0.0.1:6969
         java.net.ConnectException: Connection refused
         at java.net.PlainSocketImpl.socketConnect(Native Method)
         at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
         at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
         at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
         at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
         at java.net.Socket.connect(Socket.java:579)
         at java.net.Socket.connect(Socket.java:528)
         at java.net.Socket.<init>(Socket.java:425)
         at java.net.Socket.<init>(Socket.java:241)
         at net.i2p.i2ptunnel.I2PTunnelServer.getSocket(I2PTunnelServer.java:588)
         at net.i2p.i2ptunnel.I2PTunnelServer.getSocket(I2PTunnelServer.java:562)
         at net.i2p.i2ptunnel.I2PTunnelHTTPServer.blockingHandle(I2PTunnelHTTPServer.java:248)
         at net.i2p.i2ptunnel.I2PTunnelServer$Handler.run(I2PTunnelServer.java:509)
         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
         at java.lang.Thread.run(Thread.java:724)
    11/02/13 22:40:42.163 ↓↓↓ 5 similar messages omitted ↓↓↓
    11/02/13 22:40:36.694 ERROR [7.0.0.1:6969] .i2ptunnel.I2PTunnelHTTPServer: Error connecting to HTTP server /127.0.0.1:6969
         java.net.ConnectException: Connection refused
         at java.net.PlainSocketImpl.socketConnect(Native Method)
         at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
         at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
         at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
         at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
         at java.net.Socket.connect(Socket.java:579)
         at java.net.Socket.connect(Socket.java:528)
         at java.net.Socket.<init>(Socket.java:425)
         at java.net.Socket.<init>(Socket.java:241)
         at net.i2p.i2ptunnel.I2PTunnelServer.getSocket(I2PTunnelServer.java:588)
         at net.i2p.i2ptunnel.I2PTunnelServer.getSocket(I2PTunnelServer.java:562)
         at net.i2p.i2ptunnel.I2PTunnelHTTPServer.blockingHandle(I2PTunnelHTTPServer.java:248)
         at net.i2p.i2ptunnel.I2PTunnelServer$Handler.run(I2PTunnelServer.java:509)
         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
         at java.lang.Thread.run(Thread.java:724)
    11/02/13 22:40:36.407 ↓↓↓ 30 similar messages omitted ↓↓↓
    11/02/13 22:40:07.595 ERROR [7.0.0.1:6969] .i2ptunnel.I2PTunnelHTTPServer: Error connecting to HTTP server /127.0.0.1:6969
         java.net.ConnectException: Connection refused
         at java.net.PlainSocketImpl.socketConnect(Native Method)
         at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
         at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
         at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
         at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
         at java.net.Socket.connect(Socket.java:579)
         at java.net.Socket.connect(Socket.java:528)
         at java.net.Socket.<init>(Socket.java:425)
         at java.net.Socket.<init>(Socket.java:241)
         at net.i2p.i2ptunnel.I2PTunnelServer.getSocket(I2PTunnelServer.java:588)
         at net.i2p.i2ptunnel.I2PTunnelServer.getSocket(I2PTunnelServer.java:562)
         at net.i2p.i2ptunnel.I2PTunnelHTTPServer.blockingHandle(I2PTunnelHTTPServer.java:248)
         at net.i2p.i2ptunnel.I2PTunnelServer$Handler.run(I2PTunnelServer.java:509)
         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
         at java.lang.Thread.run(Thread.java:724)
    11/02/13 22:40:07.231 ↓↓↓ 36 similar messages omitted ↓↓↓
    11/02/13 22:39:38.855 ERROR [7.0.0.1:6969] .i2ptunnel.I2PTunnelHTTPServer: Error connecting to HTTP server /127.0.0.1:6969
         java.net.ConnectException: Connection refused
         at java.net.PlainSocketImpl.socketConnect(Native Method)
         at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
         at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
         at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
         at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
         at java.net.Socket.connect(Socket.java:579)
         at java.net.Socket.connect(Socket.java:528)
         at java.net.Socket.<init>(Socket.java:425)
         at java.net.Socket.<init>(Socket.java:241)
         at net.i2p.i2ptunnel.I2PTunnelServer.getSocket(I2PTunnelServer.java:588)
         at net.i2p.i2ptunnel.I2PTunnelServer.getSocket(I2PTunnelServer.java:562)
         at net.i2p.i2ptunnel.I2PTunnelHTTPServer.blockingHandle(I2PTunnelHTTPServer.java:248)
         at net.i2p.i2ptunnel.I2PTunnelServer$Handler.run(I2PTunnelServer.java:509)
         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
         at java.lang.Thread.run(Thread.java:724)
    11/02/13 22:39:36.152 ↓↓↓ 45 similar messages omitted ↓↓↓
    11/02/13 22:39:09.556 ERROR [7.0.0.1:6969] .i2ptunnel.I2PTunnelHTTPServer: Error connecting to HTTP server /127.0.0.1:6969
         java.net.ConnectException: Connection refused
         at java.net.PlainSocketImpl.socketConnect(Native Method)
         at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
         at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
         at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
         at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
         at java.net.Socket.connect(Socket.java:579)
         at java.net.Socket.connect(Socket.java:528)
         at java.net.Socket.<init>(Socket.java:425)
         at java.net.Socket.<init>(Socket.java:241)
         at net.i2p.i2ptunnel.I2PTunnelServer.getSocket(I2PTunnelServer.java:588)
         at net.i2p.i2ptunnel.I2PTunnelServer.getSocket(I2PTunnelServer.java:562)
         at net.i2p.i2ptunnel.I2PTunnelHTTPServer.blockingHandle(I2PTunnelHTTPServer.java:248)
         at net.i2p.i2ptunnel.I2PTunnelServer$Handler.run(I2PTunnelServer.java:509)
         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
         at java.lang.Thread.run(Thread.java:724)
    11/02/13 22:39:09.352 ↓↓↓ 42 similar messages omitted ↓↓↓
    11/02/13 22:38:41.127 ERROR [7.0.0.1:6969] .i2ptunnel.I2PTunnelHTTPServer: Error connecting to HTTP server /127.0.0.1:6969
         java.net.ConnectException: Connection refused
         at java.net.PlainSocketImpl.socketConnect(Native Method)
         at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
         at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
         at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
         at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
         at java.net.Socket.connect(Socket.java:579)
         at java.net.Socket.connect(Socket.java:528)
         at java.net.Socket.<init>(Socket.java:425)
         at java.net.Socket.<init>(Socket.java:241)
         at net.i2p.i2ptunnel.I2PTunnelServer.getSocket(I2PTunnelServer.java:588)
         at net.i2p.i2ptunnel.I2PTunnelServer.getSocket(I2PTunnelServer.java:562)
         at net.i2p.i2ptunnel.I2PTunnelHTTPServer.blockingHandle(I2PTunnelHTTPServer.java:248)
         at net.i2p.i2ptunnel.I2PTunnelServer$Handler.run(I2PTunnelServer.java:509)
         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
         at java.lang.Thread.run(Thread.java:724)
    11/02/13 22:38:39.144 ↓↓↓ 43 similar messages omitted ↓↓↓
    11/02/13 22:38:12.207 ERROR [7.0.0.1:6969] .i2ptunnel.I2PTunnelHTTPServer: Error connecting to HTTP server /127.0.0.1:6969
         java.net.ConnectException: Connection refused
         at java.net.PlainSocketImpl.socketConnect(Native Method)
         at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
         at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
         at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
         at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
         at java.net.Socket.connect(Socket.java:579)
         at java.net.Socket.connect(Socket.java:528)
         at java.net.Socket.<init>(Socket.java:425)
         at java.net.Socket.<init>(Socket.java:241)
         at net.i2p.i2ptunnel.I2PTunnelServer.getSocket(I2PTunnelServer.java:588)
         at net.i2p.i2ptunnel.I2PTunnelServer.getSocket(I2PTunnelServer.java:562)
         at net.i2p.i2ptunnel.I2PTunnelHTTPServer.blockingHandle(I2PTunnelHTTPServer.java:248)
         at net.i2p.i2ptunnel.I2PTunnelServer$Handler.run(I2PTunnelServer.java:509)
         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
         at java.lang.Thread.run(Thread.java:724)
    11/02/13 22:38:10.711 ↓↓↓ 25 similar messages omitted ↓↓↓
    11/02/13 22:37:44.446 ERROR [7.0.0.1:6969] .i2ptunnel.I2PTunnelHTTPServer: Error connecting to HTTP server /127.0.0.1:6969
         java.net.ConnectException: Connection refused
         at java.net.PlainSocketImpl.socketConnect(Native Method)
         at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
         at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
         at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
         at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
         at java.net.Socket.connect(Socket.java:579)
         at java.net.Socket.connect(Socket.java:528)
         at java.net.Socket.<init>(Socket.java:425)
         at java.net.Socket.<init>(Socket.java:241)
         at net.i2p.i2ptunnel.I2PTunnelServer.getSocket(I2PTunnelServer.java:588)
         at net.i2p.i2ptunnel.I2PTunnelServer.getSocket(I2PTunnelServer.java:562)
         at net.i2p.i2ptunnel.I2PTunnelHTTPServer.blockingHandle(I2PTunnelHTTPServer.java:248)
         at net.i2p.i2ptunnel.I2PTunnelServer$Handler.run(I2PTunnelServer.java:509)
         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
         at java.lang.Thread.run(Thread.java:724)

Subtickets

Change History (3)

comment:1 Changed 6 years ago by zzz

Component: unspecifiedapps/i2ptunnel

The logging subsystem logs the full error once every log flush cycle (30 sec) even if it's a dup. I could extend the dup checking across flush cycles… then you'd get consecutive "omitted" messages, once every cycle.

And/or we could remove the stack trace from that error, which would shorten the log considerably.

Either of these acceptable? Other ideas?

comment:2 in reply to:  1 Changed 6 years ago by killyourtv

Replying to zzz:

The logging subsystem logs the full error once every log flush cycle (30 sec) even if it's a dup. I could extend the dup checking across flush cycles… then you'd get consecutive "omitted" messages, once every cycle.

And/or we could remove the stack trace from that error, which would shorten the log considerably.

Either of these acceptable? Other ideas?

I have no other ideas but IMHO either (or both) of these would satisfy this ticket.

comment:3 Changed 6 years ago by zzz

Component: apps/i2ptunnelapi/utils
Resolution: fixed
Status: newclosed

Fixed in a827e2605c1908122e7b573d4259ae44003e6027 0.9.8.1-22 using the first option.

Example using net.i2p.router.update.NewsTimerTask?=DEBUG:

11/06 21:09:33.204 DEBUG [cheduler 2/4] 2p.router.update.NewsTimerTask: Last fetched 59m ago
11/06 21:19:33.205 DEBUG [cheduler 1/4] 2p.router.update.NewsTimerTask: Last fetched 69m ago
11/06 21:29:33.219 DEBUG [cheduler 4/4] 2p.router.update.NewsTimerTask: Last fetched 80m ago
11/06 21:39:33.219 DEBUG [cheduler 4/4] 2p.router.update.NewsTimerTask: Last fetched 90m ago
11/06 21:49:33.220 DEBUG [cheduler 2/4] 2p.router.update.NewsTimerTask: Last fetched 100m ago
11/06 21:59:33.220 DEBUG [cheduler 4/4] 2p.router.update.NewsTimerTask: Last fetched 110m ago
11/06 22:09:33.219 DEBUG [cheduler 2/4] 2p.router.update.NewsTimerTask: Last fetched 2h ago
11/06 22:19:33.219 ^^^ 1 similar message omitted ^^^
11/06 22:29:33.220 ^^^ 1 similar message omitted ^^^
11/06 22:39:33.220 ^^^ 1 similar message omitted ^^^
11/06 22:49:33.219 ^^^ 1 similar message omitted ^^^
11/06 22:59:33.219 ^^^ 1 similar message omitted ^^^
11/06 23:09:33.220 DEBUG [cheduler 4/4] 2p.router.update.NewsTimerTask: Last fetched 3h ago
11/06 23:19:33.220 ^^^ 1 similar message omitted ^^^
11/06 23:29:33.220 ^^^ 1 similar message omitted ^^^
11/06 23:39:33.221 ^^^ 1 similar message omitted ^^^
11/06 23:49:33.221 ^^^ 1 similar message omitted ^^^
11/06 23:59:33.223 ^^^ 1 similar message omitted ^^^
11/07 00:09:33.223 DEBUG [cheduler 2/4] 2p.router.update.NewsTimerTask: Last fetched 4h ago
11/07 00:19:33.224 ^^^ 1 similar message omitted ^^^
11/07 00:29:33.224 ^^^ 1 similar message omitted ^^^
11/07 00:39:33.224 ^^^ 1 similar message omitted ^^^
11/07 00:49:33.207 ^^^ 1 similar message omitted ^^^
11/07 00:59:33.208 ^^^ 1 similar message omitted ^^^
11/07 01:09:33.208 DEBUG [cheduler 3/4] 2p.router.update.NewsTimerTask: Last fetched 5h ago
Note: See TracTickets for help on using tickets.