WARNING: Failed to accept a connection.

jesusle7 years ago

Hi Anton, logs give me this error and how can I solve it?

in ubuntu server

INFO|960/0|Service traccar|18-02-01 18:46:15|Feb 01, 2018 6:46:15 PM org.jboss.netty.channel.socket.nio.AbstractNioSelector
INFO|960/0|Service traccar|18-02-01 18:46:15|WARNING: Failed to accept a connection.
INFO|960/0|Service traccar|18-02-01 18:46:15|java.io.IOException: Demasiados archivos abiertos
INFO|960/0|Service traccar|18-02-01 18:46:15|   at sun.nio.ch.ServerSocketChannelImpl.accept0(Native Method)
INFO|960/0|Service traccar|18-02-01 18:46:15|   at sun.nio.ch.ServerSocketChannelImpl.accept(ServerSocketChannelImpl.java:422)
INFO|960/0|Service traccar|18-02-01 18:46:15|   at sun.nio.ch.ServerSocketChannelImpl.accept(ServerSocketChannelImpl.java:250)
INFO|960/0|Service traccar|18-02-01 18:46:15|   at org.jboss.netty.channel.socket.nio.NioServerBoss.process(NioServerBoss.java:100)
INFO|960/0|Service traccar|18-02-01 18:46:15|   at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:337)
INFO|960/0|Service traccar|18-02-01 18:46:15|   at org.jboss.netty.channel.socket.nio.NioServerBoss.run(NioServerBoss.java:42)
INFO|960/0|Service traccar|18-02-01 18:46:15|   at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
INFO|960/0|Service traccar|18-02-01 18:46:15|   at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)
INFO|960/0|Service traccar|18-02-01 18:46:15|   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
INFO|960/0|Service traccar|18-02-01 18:46:15|   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
INFO|960/0|Service traccar|18-02-01 18:46:15|   at java.lang.Thread.run(Thread.java:748)
Anton Tananaev7 years ago
jesusle7 years ago

Thank you very much!

Anisha Vishnoi6 years ago

@jesus leguizamon

Have you fixed this issue? I am facing the same issue

jesusle6 years ago

@Anisha Vishnoi

Hi,
I just modified this file limits.conf

To increase the limit add following lines to "/etc/security/limits.conf":

  • soft nofile 50000
  • hard nofile 50000
jesusle6 years ago

the points must be asterisks

Anisha Vishnoi6 years ago

I have already done this but issue is not fixed.

jesusle6 years ago

Maybe it's something else, you can show me logs

Anisha Vishnoi6 years ago

Logs are below mentioned. and device stop responding one by one.

INEST|1286/0|Service traccar|18-09-22 18:53:14|Sep 22, 2018 6:53:14 PM org.jboss.netty.channel.socket.nio.AbstractNioSelector
FINEST|1286/0|Service traccar|18-09-22 18:53:14|WARNING: Failed to accept a connection.
FINEST|1286/0|Service traccar|18-09-22 18:53:14|java.io.IOException: Too many open files
FINEST|1286/0|Service traccar|18-09-22 18:53:14|	at sun.nio.ch.ServerSocketChannelImpl.accept0(Native Method)
FINEST|1286/0|Service traccar|18-09-22 18:53:14|	at sun.nio.ch.ServerSocketChannelImpl.accept(ServerSocketChannelImpl.java:250)
FINEST|1286/0|Service traccar|18-09-22 18:53:14|	at org.jboss.netty.channel.socket.nio.NioServerBoss.process(NioServerBoss.java:100)
FINEST|1286/0|Service traccar|18-09-22 18:53:14|	at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:337)
FINEST|1286/0|Service traccar|18-09-22 18:53:14|	at org.jboss.netty.channel.socket.nio.NioServerBoss.run(NioServerBoss.java:42)
FINEST|1286/0|Service traccar|18-09-22 18:53:14|	at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
FINEST|1286/0|Service traccar|18-09-22 18:53:14|	at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)
FINEST|1286/0|Service traccar|18-09-22 18:53:14|	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
FINEST|1286/0|Service traccar|18-09-22 18:53:14|	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
FINEST|1286/0|Service traccar|18-09-22 18:53:14|	at java.lang.Thread.run(Thread.java:745)
FINEST|1286/0|Service traccar|18-09-22 18:53:14|
FINEST|1286/0|Service traccar|18-09-22 18:53:15|Sep 22, 2018 6:53:15 PM org.jboss.netty.channel.socket.nio.AbstractNioSelector
FINEST|1286/0|Service traccar|18-09-22 18:53:15|WARNING: Failed to accept a connection.
FINEST|1286/0|Service traccar|18-09-22 18:53:15|java.io.IOException: Too many open files
FINEST|1286/0|Service traccar|18-09-22 18:53:15|	at sun.nio.ch.ServerSocketChannelImpl.accept0(Native Method)
FINEST|1286/0|Service traccar|18-09-22 18:53:15|	at sun.nio.ch.ServerSocketChannelImpl.accept(ServerSocketChannelImpl.java:250)
FINEST|1286/0|Service traccar|18-09-22 18:53:15|	at org.jboss.netty.channel.socket.nio.NioServerBoss.process(NioServerBoss.java:100)
FINEST|1286/0|Service traccar|18-09-22 18:53:15|	at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:337)
FINEST|1286/0|Service traccar|18-09-22 18:53:15|	at org.jboss.netty.channel.socket.nio.NioServerBoss.run(NioServerBoss.java:42)
FINEST|1286/0|Service traccar|18-09-22 18:53:15|	at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
FINEST|1286/0|Service traccar|18-09-22 18:53:15|	at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)
FINEST|1286/0|Service traccar|18-09-22 18:53:15|	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
FINEST|1286/0|Service traccar|18-09-22 18:53:15|	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
FINEST|1286/0|Service traccar|18-09-22 18:53:15|	at java.lang.Thread.run(Thread.java:745)
jesusle6 years ago

but you get error 500 when you enter your page? Or just device stop responding one by one?

jesusle6 years ago

How many devices do you have and after how much time does it give error?

Anisha Vishnoi6 years ago

just device stop responding one by one.

Anisha Vishnoi6 years ago

I have 350+ devices and it stop responding after 3-4 hrs. This problem start arsing from yesterday only.

jesusle6 years ago

the devices turn red or just stop sending location?

Anisha Vishnoi6 years ago

I think stop sending location. after restarting server everything works fine.