Internal server error after switching to production mode

Hello guys, i installed erpnext in my windows via ubuntu 22 wsl, it was working fine and then i tried to switch from development to production mode.
However the site says internal server error, im not into writing or understanding commands much don’t know what went wrong. my address- http://172.22.96.230/:8000
Please help
Thanks


  1. bench setup requirements.
  2. bench build
  3. bench migrate

Try this.

Hi @RK_1214
i tried but still not working please help
Thanks

@RK_1214
do you need any additional information ?

Use bench setup requirements after that use bench build then migrate bench

Try this

bench use site_name

then start bench

Hi @RK_1214
I tried all still not working also i already set the site, when i use bench start it gives me this-
rahul@Rahul-PC:~/frappe-bench$ bench start
14:57:50 system | redis_cache.1 started (pid=14975)
14:57:50 system | redis_queue.1 started (pid=14978)
14:57:50 system | web.1 started (pid=14980)
14:57:50 redis_cache.1 | 14979:C 28 Mar 2024 14:57:50.049 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
14:57:50 redis_cache.1 | 14979:C 28 Mar 2024 14:57:50.050 # Redis version=6.0.16, bits=64, commit=00000000, modified=0, pid=14979, just started
14:57:50 redis_cache.1 | 14979:C 28 Mar 2024 14:57:50.050 # Configuration loaded
14:57:50 redis_cache.1 | 14979:M 28 Mar 2024 14:57:50.051 * Increased maximum number of open files to 10032 (it was originally set to 1024).
14:57:50 system | schedule.1 started (pid=14989)
14:57:50 redis_cache.1 | 14979:M 28 Mar 2024 14:57:50.053 # Could not create server TCP listening socket 127.0.0.1:13000: bind: Address already in use
14:57:50 system | redis_cache.1 stopped (rc=1)
14:57:50 system | socketio.1 started (pid=14985)
14:57:50 system | worker.1 started (pid=14994)
14:57:50 redis_queue.1 | 14984:C 28 Mar 2024 14:57:50.060 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
14:57:50 redis_queue.1 | 14984:C 28 Mar 2024 14:57:50.061 # Redis version=6.0.16, bits=64, commit=00000000, modified=0, pid=14984, just started
14:57:50 redis_queue.1 | 14984:C 28 Mar 2024 14:57:50.061 # Configuration loaded
14:57:50 redis_queue.1 | 14984:M 28 Mar 2024 14:57:50.061 * Increased maximum number of open files to 10032 (it was originally set to 1024).
14:57:50 redis_queue.1 | 14984:M 28 Mar 2024 14:57:50.062 # Could not create server TCP listening socket 127.0.0.1:11000: bind: Address already in use
14:57:50 system | redis_queue.1 stopped (rc=1)
14:57:50 system | watch.1 started (pid=14993)
14:57:50 system | sending SIGTERM to web.1 (pid 14980)
14:57:50 system | sending SIGTERM to socketio.1 (pid 14985)
14:57:50 system | sending SIGTERM to watch.1 (pid 14993)
14:57:50 system | sending SIGTERM to schedule.1 (pid 14989)
14:57:50 system | sending SIGTERM to worker.1 (pid 14994)
14:57:50 system | worker.1 stopped (rc=-15)
14:57:50 system | watch.1 stopped (rc=-15)
14:57:50 system | schedule.1 stopped (rc=-15)
14:57:50 system | socketio.1 stopped (rc=-15)
14:57:50 system | web.1 stopped (rc=-15)
rahul@Rahul-PC:~/frappe-bench$

as i tried to setup the production mode.
only after this i’m unable to access the site.

Thanks

your message is empty

bench use site_name

i switched back to the development mode nvm.
Thanks

Please change the port. It says the port is already in use. Use the below command to check all used ports in the server.

sudo netstat -plnt

@Hardik_Zinzu

i switched back to the development mode nvm.

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:6379 0.0.0.0:* LISTEN 227/redis-server 12
tcp 0 0 127.0.0.1:11000 0.0.0.0:* LISTEN 25648/redis-server
tcp 0 0 127.0.0.1:13000 0.0.0.0:* LISTEN 25643/redis-server
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 253/sshd: /usr/sbin
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 299/mariadbd
tcp 0 0 0.0.0.0:8000 0.0.0.0:* LISTEN 25652/python
tcp6 0 0 :::9000 :::* LISTEN 25654/node
tcp6 0 0 ::1:6379 :::* LISTEN 227/redis-server 12
tcp6 0 0 :::22 :::* LISTEN 253/sshd: /usr/sbin

use sudo with the given command. As mentioned in the output 8000 is already in use. If that’s not started by you and supervisorctl is installed.

sudo supervisorctl stop all

if not working then try to kill the python process manually.

1 Like

There are always Following Issues

  1. The Folder ownership issues (chown -R <your-user> .) in your root frappe-bench folder
  2. Using Latest Frappe with Latest ERPNext (You cannot solve this)
  3. Nginx is unable to Read the Static file Directory (13: permission denied) this is solvable after adding www user to group
  4. sometimes simple sudo reboot also works if some socket is blocked

Thanks

1 Like

Thank you all i managed to run in production mode now, now i want to access the erpnext from my local lan can someone share the steps ?
Thanks