After Starting the Bench I am facing this issue "cannot create logs/worker.log: Permission denied" but page is hitting

04:55:33 system | redis_cache.1 started (pid=1815)
04:55:33 redis_cache.1 | 1821:C 28 Apr 2022 04:55:33.952 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
04:55:33 redis_cache.1 | 1821:C 28 Apr 2022 04:55:33.952 # Redis version=5.0.7, bits=64, commit=00000000, modified=0, pid=1821, just started
04:55:33 redis_cache.1 | 1821:C 28 Apr 2022 04:55:33.952 # Configuration loaded
04:55:33 redis_cache.1 | 1821:M 28 Apr 2022 04:55:33.952 * Increased maximum number of open files to 10032 (it was originally set to 1024).
04:55:33 redis_cache.1 | 1821:M 28 Apr 2022 04:55:33.953 # Could not create server TCP listening socket 127.0.0.1:13000: bind: Address already in use
04:55:33 system | redis_cache.1 stopped (rc=1)
04:55:33 system | watch.1 started (pid=1826)
04:55:33 system | redis_queue.1 started (pid=1820)
04:55:33 redis_queue.1 | 1832:C 28 Apr 2022 04:55:33.958 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
04:55:33 redis_queue.1 | 1832:C 28 Apr 2022 04:55:33.958 # Redis version=5.0.7, bits=64, commit=00000000, modified=0, pid=1832, just started
04:55:33 redis_queue.1 | 1832:C 28 Apr 2022 04:55:33.958 # Configuration loaded
04:55:33 redis_queue.1 | 1832:M 28 Apr 2022 04:55:33.959 * Increased maximum number of open files to 10032 (it was originally set to 1024).
04:55:33 redis_queue.1 | 1832:M 28 Apr 2022 04:55:33.959 # Could not create server TCP listening socket 127.0.0.1:11000: bind: Address already in use
04:55:33 system | redis_queue.1 stopped (rc=1)
04:55:33 system | worker_default.1 started (pid=1838)
04:55:33 worker_default.1 | /bin/sh: 1: cannot create logs/worker.log: Permission denied
04:55:33 system | worker_default.1 stopped (rc=2)
04:55:33 system | schedule.1 started (pid=1830)
04:55:33 system | redis_socketio.1 started (pid=1817)
04:55:33 redis_socketio.1 | 1835:C 28 Apr 2022 04:55:33.963 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
04:55:33 redis_socketio.1 | 1835:C 28 Apr 2022 04:55:33.963 # Redis version=5.0.7, bits=64, commit=00000000, modified=0, pid=1835, just started
04:55:33 redis_socketio.1 | 1835:C 28 Apr 2022 04:55:33.963 # Configuration loaded
04:55:33 redis_socketio.1 | 1835:M 28 Apr 2022 04:55:33.963 * Increased maximum number of open files to 10032 (it was originally set to 1024).
04:55:33 redis_socketio.1 | 1835:M 28 Apr 2022 04:55:33.963 # Could not create server TCP listening socket 127.0.0.1:12000: bind: Address already in use
04:55:33 system | redis_socketio.1 stopped (rc=1)
04:55:33 system | socketio.1 started (pid=1824)
04:55:33 system | worker_long.1 started (pid=1837)
04:55:33 worker_long.1 | /bin/sh: 1: cannot create logs/worker.log: Permission denied
04:55:33 system | worker_long.1 stopped (rc=2)
04:55:33 system | worker_short.1 started (pid=1842)
04:55:33 worker_short.1 | /bin/sh: 1: cannot create logs/worker.log: Permission denied
04:55:33 system | worker_short.1 stopped (rc=2)
04:55:33 system | web.1 started (pid=1843)
04:55:33 system | sending SIGTERM to web.1 (pid 1843)
04:55:33 system | sending SIGTERM to socketio.1 (pid 1824)
04:55:33 system | sending SIGTERM to watch.1 (pid 1826)
04:55:33 system | sending SIGTERM to schedule.1 (pid 1830)
04:55:33 system | web.1 stopped (rc=-15)
04:55:33 system | watch.1 stopped (rc=-15)
04:55:33 system | socketio.1 stopped (rc=-15)
04:55:33 system | schedule.1 stopped (rc=-15)

1 Like

I am facing the same issue. If anyone can help it is greatly appreciated!

if it can help anyone, I fixed the permission error by deleting the worker logs in /frappe-bench/logs.

issue with the permission was then fixed

1 Like

Now if you change from production env to develop env, worker.log files need to be changed. You can try this:
cd ~/frappe-bench/logs
sudo chown -R frappe:frappe *

3 Likes

This is the soulsion

Thank you Marek, This Worked for me

1 Like