Issue while starting bench

While starting bench I am getting following error how can i solve it.
please help.

swift@ubuntu:~/frappe-bench$ bench start
15:44:20 system | worker_long.1 started (pid=3540)
15:44:20 system | watch.1 started (pid=3549)
15:44:20 system | redis_queue.1 started (pid=3541)
15:44:20
redis_queue.1 | 3554:M 25 May 15:44:20.033 * Increased maximum
number of open files to 10032 (it was originally set to 1024).
15:44:20
redis_queue.1 | 3554:M 25 May 15:44:20.033 # Creating Server TCP
listening socket 127.0.0.1:11000: bind: Address already in use
15:44:20 system | redis_queue.1 stopped (rc=1)
15:44:20 system | redis_socketio.1 started (pid=3548)
15:44:20
redis_socketio.1 | 3552:M 25 May 15:44:20.034 * Increased maximum
number of open files to 10032 (it was originally set to 1024).
15:44:20
redis_socketio.1 | 3552:M 25 May 15:44:20.034 # Creating Server TCP
listening socket 127.0.0.1:12000: bind: Address already in use
15:44:20 system | redis_socketio.1 stopped (rc=1)
15:44:20 system | web.1 started (pid=3542)
15:44:20 system | schedule.1 started (pid=3551)
15:44:20 system | redis_cache.1 started (pid=3557)
15:44:20
redis_cache.1 | 3565:M 25 May 15:44:20.126 * Increased maximum
number of open files to 10032 (it was originally set to 1024).
15:44:20
redis_cache.1 | 3565:M 25 May 15:44:20.126 # Creating Server TCP
listening socket 127.0.0.1:13000: bind: Address already in use
15:44:20 system | redis_cache.1 stopped (rc=1)
15:44:20 system | worker_default.1 started (pid=3555)
15:44:20 system | socketio.1 started (pid=3556)
15:44:20 system | worker_short.1 started (pid=3575)
15:44:20 system | sending SIGTERM to worker_long.1 (pid 3540)
15:44:20 system | sending SIGTERM to watch.1 (pid 3549)
15:44:20 system | sending SIGTERM to web.1 (pid 3542)
15:44:20 system | sending SIGTERM to schedule.1 (pid 3551)
15:44:20 system | sending SIGTERM to worker_default.1 (pid 3555)
15:44:20 system | sending SIGTERM to socketio.1 (pid 3556)
15:44:20 system | sending SIGTERM to worker_short.1 (pid 3575)
15:44:20 system | socketio.1 stopped (rc=-15)
15:44:20 system | schedule.1 stopped (rc=-15)
15:44:20 system | worker_long.1 stopped (rc=-15)
15:44:20 system | watch.1 stopped (rc=-15)
15:44:20 system | web.1 stopped (rc=-15)
15:44:20 system | worker_default.1 stopped (rc=-15)
15:44:20 system | worker_short.1 stopped (rc=-15)

It seems that ports are being used already. Have you tried restarting your pc?

Yeah I tried that but didnot work any solution for it.
I also tried to server next port with
bench serve --port portnumber

still getting error while setup .
It shows "There is error " in message.

Any solution please.

Traceback (most recent call last):
File “/usr/lib/python2.7/threading.py”, line 801, in __bootstrap_inner
File “/home/swift/frappe-bench/env/local/lib/python2.7/site-packages/watchdog/observers/api.py”, line 237, in run
<type ‘exceptions.AttributeError’>: ‘NoneType’ object has no attribute ‘Empty’

Traceback (most recent call last):
File “/usr/lib/python2.7/threading.py”, line 801, in __bootstrap_inner
File “/usr/lib/python2.7/threading.py”, line 754, in run
File “/usr/lib/python2.7/SocketServer.py”, line 599, in process_request_thread
File “/home/swift/frappe-bench/env/local/lib/python2.7/site-packages/werkzeug/serving.py”, line 548, in handle_error
<type ‘exceptions.AttributeError’>: ‘NoneType’ object has no attribute ‘handle_error’

  • Restarting with inotify reloader
  • Debugger is active!
  • Debugger PIN: 896-698-726

instead of bench serv ,try to kill the ports 11000,12000,13000 using

kill $(lsof -t -i:{PORT_NUMBER})
ex.

kill $(lsof -t -i:11000)

Thank you for you support.
But unfortunately i cannot able to overcome from issue.
This command doesn’t kill the port instead suggest for the commands.
seeking for more support please.

Traceback (most recent call last):
File “/usr/lib/python2.7/threading.py”, line 801, in __bootstrap_inner
File “/home/swift/frappe-bench/env/local/lib/python2.7/site-packages/watchdog/observers/api.py”, line 237, in run
<type ‘exceptions.AttributeError’>: ‘NoneType’ object has no attribute ‘Empty’
swift@ubuntu:~/frappe-bench$ kill $(lsof -t -i:11000)
kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec … or kill -l [sigspec]
swift@ubuntu:~/frappe-bench$ kill $(lsof -t -i:11000)
kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec … or kill -l [sigspec]
swift@ubuntu:~/frappe-bench$ kill $(lsof -t -i:11000)
kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec … or kill -l [sigspec]
swift@ubuntu:~/frappe-bench$

run with sudo

ex. sudo kill $(lsof -t -i:8080)

I got this.
Still same error while running bench.

swift@ubuntu:~/frappe-bench$ sudo kill $(lsof -t -i:11000)

Usage:
kill [options] […]

Options:
[…] send signal to every listed
-, -s, --signal
specify the to be sent
-l, --list=[] list all signal names, or convert one to a name
-L, --table list all signal names in a nice table

-h, --help display this help and exit
-V, --version output version information and exit

For more details see kill(1).

kill -9 $(lsof -t -i:11000)
the above command works but only if the port is in use it will kills hence first try bench start if still it shows the same error
i.e.,
listening socket 127.0.0.1:13000: bind: Address already in use

127.0.0.1:12000: bind: Address already in use

Try
$ ps aux | grep redis
you will get
redis 3044 0.0 0.0 37000 8780 ? Ssl 14:59 0:00 /usr/bin/redis-server *:6379

$ sudo kill -9 3044
$ sudo service redis-server restart