Very Common Error

Hi Experts,

I was trying to create module, but getting below error:

vagrant@frappe:~/frappe-bench$ bench new-app dbss                      
App Title [Dbss]: 
App Description: DBSS
App Publisher: DBSS
App Email: nbanik@gmail.com
App License (agpl-3.0, apache-2.0, bsd-2-clause, bsd-3-clause, bsl-1.0, cc0-1.0, epl-2.0, gpl-2.0, gpl-3.0, lgpl-2.1, mit, mpl-2.0, unlicense) [mit]: 
Create GitHub Workflow action for unittests [y/N]: n
'dbss' created at /home/vagrant/frappe-bench/apps/dbss
Installing dbss
$ /home/vagrant/frappe-bench/env/bin/python -m pip install --quiet --upgrade -e /home/vagrant/frappe-bench/apps/dbss 
$ bench build --app dbss
✔ Application Assets Linked                                                                                                                


yarn run v1.22.21
$ node esbuild --apps dbss --run-build-command
File                                                        Size

 DONE  Total Build Time: 192.536ms

 WARN  Cannot connect to redis_cache to update assets_json
 WARN  Cannot connect to redis_cache to update assets_json
 WARN  Cannot connect to redis_cache to update assets_json
Done in 1.18s.
$ supervisorctl restart frappe:
frappe: ERROR (no such group)
frappe: ERROR (no such group)
ERROR: 
Traceback (most recent call last):
  File "/usr/local/bin/bench", line 8, in <module>
    sys.exit(cli())
  File "/usr/local/lib/python3.10/dist-packages/bench/cli.py", line 121, in cli
    raise e
  File "/usr/local/lib/python3.10/dist-packages/bench/cli.py", line 111, in cli
    bench_command()
  File "/usr/lib/python3/dist-packages/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python3/dist-packages/click/core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python3/dist-packages/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python3/dist-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/bench/commands/make.py", line 177, in new_app
    new_app(app_name, no_git)
  File "/usr/local/lib/python3.10/dist-packages/bench/app.py", line 524, in new_app
    install_app(app, bench_path=bench_path)
  File "/usr/local/lib/python3.10/dist-packages/bench/app.py", line 567, in install_app
    bench.reload()
  File "/usr/local/lib/python3.10/dist-packages/bench/utils/render.py", line 110, in wrapper_fn
    return fn(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/bench/bench.py", line 151, in reload
    restart_supervisor_processes(bench_path=self.name, web_workers=web)
  File "/usr/local/lib/python3.10/dist-packages/bench/utils/bench.py", line 309, in restart_supervisor_processes
    bench.run(f"{sudo}supervisorctl restart {group}")
  File "/usr/local/lib/python3.10/dist-packages/bench/bench.py", line 47, in run
    return exec_cmd(cmd, cwd=cwd or self.cwd)
  File "/usr/local/lib/python3.10/dist-packages/bench/utils/__init__.py", line 153, in exec_cmd
    raise CommandFailedError
bench.exceptions.CommandFailedError

I use vagrant user. I edited file /etc/supervisor/supervisord.conf

; supervisor config file

[unix_http_server]
chown=vagrant:vagrant
file=/var/run/supervisor.sock   ; (the path to the socket file)
chmod=0700                       ; sockef file mode (default 0700)
chown=vagrant:vagrant

[supervisord]
logfile=/var/log/supervisor/supervisord.log ; (main log file;default $CWD/supervisord.log)
pidfile=/var/run/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
childlogdir=/var/log/supervisor            ; ('AUTO' child log dir, default $TEMP)

; the below section must remain in the config file for RPC
; (supervisorctl/web interface) to work, additional interfaces may be
; added by defining them in separate rpcinterface: sections
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface

[supervisorctl]
serverurl=unix:///var/run/supervisor.sock ; use a unix:// URL  for a unix socket

; The [include] section can just contain the "files" setting.  This
; setting can list multiple files (separated by whitespace or
; newlines).  It can also contain wildcards.  The filenames are
; interpreted as relative to this file.  Included files *cannot*
; include files themselves.

[include]
files = /etc/supervisor/conf.d/*.conf

Still getting this very frustrating error. But not getting solution.

Please help me. I stuck here.

Regards.

Very frustrating, nobody is replying. :smiling_face_with_tear: :smiling_face_with_tear: :smiling_face_with_tear: :smiling_face_with_tear: :smiling_face_with_tear: :smiling_face_with_tear:

Hy @Narayan_Banik

Please Try this Command

bench start
bench update --requirements
bench update --reset --no-backup
bench migrate

I hope it’s working

Thank You!

Hi @Mohammadali
Thanks for helping.
I performed the above steps But getting below error:

console logs:

18:10:32 web.1            | WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
18:10:32 web.1            |  * Running on all addresses (0.0.0.0)
18:10:32 web.1            |  * Running on http://127.0.0.1:8000
18:10:32 web.1            |  * Running on http://172.23.18.27:8000
18:10:32 web.1            | Press CTRL+C to quit
18:10:32 web.1            |  * Restarting with watchdog (inotify)
18:10:33 web.1            |  * Debugger is active!
18:10:33 web.1            |  * Debugger PIN: 719-343-552
18:10:45 web.1            | Traceback (most recent call last):
18:10:45 web.1            |   File "apps/frappe/frappe/app.py", line 95, in application
18:10:45 web.1            |     init_request(request)
18:10:45 web.1            |   File "apps/frappe/frappe/app.py", line 179, in init_request
18:10:45 web.1            |     raise frappe.SessionStopped("Session Stopped")
18:10:45 web.1            | frappe.exceptions.SessionStopped: Session Stopped
18:10:45 web.1            | 
18:10:45 web.1            | 172.23.18.2 - - [05/Dec/2023 18:10:45] "GET / HTTP/1.1" 503 -
18:10:45 web.1            | Traceback (most recent call last):
18:10:45 web.1            |   File "apps/frappe/frappe/app.py", line 95, in application
18:10:45 web.1            |     init_request(request)
18:10:45 web.1            |   File "apps/frappe/frappe/app.py", line 179, in init_request
18:10:45 web.1            |     raise frappe.SessionStopped("Session Stopped")
18:10:45 web.1            | frappe.exceptions.SessionStopped: Session Stopped
18:10:45 web.1            | 
18:10:45 web.1            | 172.23.18.2 - - [05/Dec/2023 18:10:45] "GET /website_script.js HTTP/1.1" 503 -
18:10:51 watch.1          | Watching for changes...

Version:

vagrant@frappe:~/frappe-bench$ bench --version
5.12.0
INFO: A newer version of bench is available: 5.12.0 → 5.19.0
vagrant@frappe:~/frappe-bench$ 

Please help.

Hy @Narayan_Banik

Try It

bench set-config maintenance_mode 0

@Mohammadali Thanks.
Now GUI is ok.

But still getting the same error while creating the new module:

vagrant@frappe:~/frappe-bench$ bench new-app dbss
App Title [Dbss]: DBSS
App Description: Digital Business Support Solution
App Publisher: DBSS
App Email: nbanik@gmail.com
App License (agpl-3.0, apache-2.0, bsd-2-clause, bsd-3-clause, bsl-1.0, cc0-1.0, epl-2.0, gpl-2.0, gpl-3.0, lgpl-2.1, mit, mpl-2.0, unlicense) [mit]: 
Create GitHub Workflow action for unittests [y/N]: n
'dbss' created at /home/vagrant/frappe-bench/apps/dbss
Installing dbss
$ /home/vagrant/frappe-bench/env/bin/python -m pip install --quiet --upgrade -e /home/vagrant/frappe-bench/apps/dbss 
$ bench build --app dbss
✔ Application Assets Linked                                                                                                                                                                                                      


yarn run v1.22.21
$ node esbuild --apps dbss --run-build-command
File                                                        Size

 DONE  Total Build Time: 199.576ms

 WARN  Cannot connect to redis_cache to update assets_json
 WARN  Cannot connect to redis_cache to update assets_json
 WARN  Cannot connect to redis_cache to update assets_json
Done in 1.20s.
$ supervisorctl restart frappe:
frappe: ERROR (no such group)
frappe: ERROR (no such group)
ERROR: 
Traceback (most recent call last):
  File "/usr/local/bin/bench", line 8, in <module>
    sys.exit(cli())
  File "/usr/local/lib/python3.10/dist-packages/bench/cli.py", line 121, in cli
    raise e
  File "/usr/local/lib/python3.10/dist-packages/bench/cli.py", line 111, in cli
    bench_command()
  File "/usr/lib/python3/dist-packages/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python3/dist-packages/click/core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python3/dist-packages/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python3/dist-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/bench/commands/make.py", line 177, in new_app
    new_app(app_name, no_git)
  File "/usr/local/lib/python3.10/dist-packages/bench/app.py", line 524, in new_app
    install_app(app, bench_path=bench_path)
  File "/usr/local/lib/python3.10/dist-packages/bench/app.py", line 567, in install_app
    bench.reload()
  File "/usr/local/lib/python3.10/dist-packages/bench/utils/render.py", line 110, in wrapper_fn
    return fn(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/bench/bench.py", line 151, in reload
    restart_supervisor_processes(bench_path=self.name, web_workers=web)
  File "/usr/local/lib/python3.10/dist-packages/bench/utils/bench.py", line 309, in restart_supervisor_processes
    bench.run(f"{sudo}supervisorctl restart {group}")
  File "/usr/local/lib/python3.10/dist-packages/bench/bench.py", line 47, in run
    return exec_cmd(cmd, cwd=cwd or self.cwd)
  File "/usr/local/lib/python3.10/dist-packages/bench/utils/__init__.py", line 153, in exec_cmd
    raise CommandFailedError
bench.exceptions.CommandFailedError

Please help me… :smiling_face_with_tear: :smiling_face_with_tear: :smiling_face_with_tear: :smiling_face_with_tear:

@Narayan_Banik Please change name the module and check

@Mohammadali

Tried…but same error:

vagrant@frappe:~/frappe-bench$ bench new-app dbss1                      
App Title [Dbss1]: 
App Description: dbss1   
App Publisher: dbss1
App Email: dbss@gmail.com
App License (agpl-3.0, apache-2.0, bsd-2-clause, bsd-3-clause, bsl-1.0, cc0-1.0, epl-2.0, gpl-2.0, gpl-3.0, lgpl-2.1, mit, mpl-2.0, unlicense) [mit]: 
Create GitHub Workflow action for unittests [y/N]: n
'dbss1' created at /home/vagrant/frappe-bench/apps/dbss1
Installing dbss1
$ /home/vagrant/frappe-bench/env/bin/python -m pip install --quiet --upgrade -e /home/vagrant/frappe-bench/apps/dbss1 
$ bench build --app dbss1
✔ Application Assets Linked                                                                                                                                                                                                      


yarn run v1.22.21
$ node esbuild --apps dbss1 --run-build-command
File                                                        Size

 DONE  Total Build Time: 218.445ms

 WARN  Cannot connect to redis_cache to update assets_json
 WARN  Cannot connect to redis_cache to update assets_json
 WARN  Cannot connect to redis_cache to update assets_json
Done in 1.23s.
$ supervisorctl restart frappe:
frappe: ERROR (no such group)
frappe: ERROR (no such group)
ERROR: 
Traceback (most recent call last):
  File "/usr/local/bin/bench", line 8, in <module>
    sys.exit(cli())
  File "/usr/local/lib/python3.10/dist-packages/bench/cli.py", line 121, in cli
    raise e
  File "/usr/local/lib/python3.10/dist-packages/bench/cli.py", line 111, in cli
    bench_command()
  File "/usr/lib/python3/dist-packages/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python3/dist-packages/click/core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python3/dist-packages/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python3/dist-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/bench/commands/make.py", line 177, in new_app
    new_app(app_name, no_git)
  File "/usr/local/lib/python3.10/dist-packages/bench/app.py", line 524, in new_app
    install_app(app, bench_path=bench_path)
  File "/usr/local/lib/python3.10/dist-packages/bench/app.py", line 567, in install_app
    bench.reload()
  File "/usr/local/lib/python3.10/dist-packages/bench/utils/render.py", line 110, in wrapper_fn
    return fn(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/bench/bench.py", line 151, in reload
    restart_supervisor_processes(bench_path=self.name, web_workers=web)
  File "/usr/local/lib/python3.10/dist-packages/bench/utils/bench.py", line 309, in restart_supervisor_processes
    bench.run(f"{sudo}supervisorctl restart {group}")
  File "/usr/local/lib/python3.10/dist-packages/bench/bench.py", line 47, in run
    return exec_cmd(cmd, cwd=cwd or self.cwd)
  File "/usr/local/lib/python3.10/dist-packages/bench/utils/__init__.py", line 153, in exec_cmd
    raise CommandFailedError
bench.exceptions.CommandFailedError
vagrant@frappe:~/frappe-bench$ 

:smiling_face_with_tear: :smiling_face_with_tear: :smiling_face_with_tear: :smiling_face_with_tear:

@Narayan_Banik
Try It

sudo supervisorctl restart
bench update

Restart logs:

vagrant@frappe:~/frappe-bench$ sudo supervisorctl restart
Error: restart requires a process name
restart <name>          Restart a process
restart <gname>:*       Restart all processes in a group
restart <name> <name>   Restart multiple processes or groups
restart all             Restart all processes
Note: restart does not reread config files. For that, see reread and update.

Hy @Narayan_Banik

You will get this solution from @revant_one.

Thank You!

Hello @revant_one
Hope you will help to get rid of this frustrating problem.
Please help me. :smiling_face_with_tear: :smiling_face_with_tear: :smiling_face_with_tear: :smiling_face_with_tear: :smiling_face_with_tear:
Regards.

Hello @revant_one,
I’m fully stuck. Please help me. Why is it looking for frappe group?
Please… :smiling_face_with_tear: :smiling_face_with_tear: :smiling_face_with_tear: :smiling_face_with_tear: :smiling_face_with_tear: :smiling_face_with_tear: :smiling_face_with_tear: :smiling_face_with_tear: :smiling_face_with_tear:

Regards

Configure supervisor and nginx in case of production setup.

Documentation: Setup Production

Hi @revant_one,
Thanks for your help.

This is my development setup.

How can I get rid of this?

Why is it looking frappe group?
Seeking your kind attention here.

Regards.

Check Configuration

Remove restart_supervisor_on_update from common_site_config.json

1 Like

Hi @revant_one,
Thanks.

{
"background_workers": 1,
"developer_mode": true,
"file_watcher_port": 6787,
"frappe_user": "vagrant",
"gunicorn_workers": 17,
"live_reload": true,
"maintenance_mode": 1,
"pause_scheduler": 1,
"rebase_on_pull": false,
"redis_cache": "redis://localhost:13000",
"redis_queue": "redis://localhost:11000",
"redis_socketio": "redis://localhost:12000",
"restart_supervisor_on_update": false,
"restart_systemd_on_update": false,
"serve_default_site": true,
"shallow_clone": true,
"socketio_port": 9000,
"use_redis_auth": false,
"webserver_port": 8000
}

Now it is working.

Able to create module successfully:

vagrant@frappe:~/frappe-bench$ bench new-app dbss                       
App Title [Dbss]: 
App Description: DBSS
App Publisher: DBSS
App Email: nbanik@gmail.com
App License (agpl-3.0, apache-2.0, bsd-2-clause, bsd-3-clause, bsl-1.0, cc0-1.0, epl-2.0, gpl-2.0, gpl-3.0, lgpl-2.1, mit, mpl-2.0, unlicense) [mit]: 
Create GitHub Workflow action for unittests [y/N]: n
'dbss' created at /home/vagrant/frappe-bench/apps/dbss
Installing dbss
$ /home/vagrant/frappe-bench/env/bin/python -m pip install --quiet --upgrade -e /home/vagrant/frappe-bench/apps/dbss 
$ bench build --app dbss
✔ Application Assets Linked                                                                                                                           


yarn run v1.22.21
$ node esbuild --apps dbss --run-build-command
File                                                        Size

 DONE  Total Build Time: 205.473ms

Done in 1.24s.

But it was not showing created module:

vagrant@frappe:~/frappe-bench$ bench --site  ericsson-dbss.com list-apps

frappe 15.x.x-develop () develop
spms   0.0.1             main

vagrant@frappe:~/frappe-bench$ 

After migration, it is showing:

vagrant@frappe:~/frappe-bench$ bench --site  ericsson-dbss.com migrate
Migrating ericsson-dbss.com
Updating DocTypes for frappe        : [========================================] 100%
Updating DocTypes for spms          : [========================================] 100%
Updating Dashboard for frappe
Updating Dashboard for spms
Updating Dashboard for dbss
Queued rebuilding of search index for ericsson-dbss.com

vagrant@frappe:~/frappe-bench$ bench --site  ericsson-dbss.com list-apps

frappe 15.x.x-develop () develop
spms   0.0.1             main
dbss   0.0.1             develop

vagrant@frappe:~/frappe-bench$ 

Thanks.

3 Likes

in common_site_config.json change it to “restart_supervisor_on_update”: false,