Bench Update Error on newly installed Frappe/Erpnext on production server

Hello All. I have done bench update on my newly installed production server and received this error. Please advise. Thanks.

bench update
INFO:bench.utils:updating bench
INFO:bench.utils:git pull
Already up-to-date.
INFO:bench.utils:./env/bin/pip install Pillow
Requirement already satisfied: Pillow in ./env/lib/python2.7/site-packages
Requirement already satisfied: olefile in ./env/lib/python2.7/site-packages (from Pillow)
INFO:bench.app:pulling frappe
INFO:bench.utils:git pull upstream master
From GitHub - frappe/frappe: Low code web framework for real world applications, in Python and Javascript

  • branch master → FETCH_HEAD
    Already up-to-date.
    INFO:bench.utils:find . -name “*.pyc” -delete
    INFO:bench.app:pulling erpnext
    INFO:bench.utils:git pull upstream master
    From GitHub - frappe/erpnext: Free and Open Source Enterprise Resource Planning (ERP)
  • branch master → FETCH_HEAD
    Already up-to-date.
    INFO:bench.utils:find . -name “*.pyc” -delete
    Updating Python libraries…
    INFO:bench.utils:./env/bin/pip install --upgrade pip
    Requirement already up-to-date: pip in ./env/lib/python2.7/site-packages
    INFO:bench.utils:./env/bin/pip install -q -r /home/frappe/.bench/requirements.txt
    INFO:bench.utils:./env/bin/pip install -q -r ./apps/frappe/requirements.txt
    INFO:bench.utils:./env/bin/pip install -q -r ./apps/erpnext/requirements.txt
    Updating node libraries…
    INFO:bench.utils:npm install
    npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents):
    npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.1: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“x64”})
    npm WARN frappe@ No description
    Backing up sites…
    Traceback (most recent call last):
    File “/usr/lib/python2.7/runpy.py”, line 174, in _run_module_as_main
    main”, fname, loader, pkg_name)
    File “/usr/lib/python2.7/runpy.py”, line 72, in _run_code
    exec code in run_globals
    File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 79, in
    main()
    File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 16, in main
    click.Group(commands=commands)(prog_name=‘bench’)
    File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 722, in call
    return self.main(*args, **kwargs)
    File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 697, in main
    rv = self.invoke(ctx)
    File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
    File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
    File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
    File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 535, in invoke
    return callback(*args, **kwargs)
    File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/decorators.py”, line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/commands/init.py”, line 24, in _func
    ret = f(frappe._dict(ctx.obj), *args, **kwargs)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/commands/site.py”, line 282, in backup
    frappe.init(site=site)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 134, in init
    local.conf = _dict(get_site_config())
    File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 186, in get_site_config
    config.update(get_file_json(site_config))
    File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 864, in get_file_json
    return json.load(f)
    File “/usr/lib/python2.7/json/init.py”, line 291, in load
    **kw)
    File “/usr/lib/python2.7/json/init.py”, line 339, in loads
    return _default_decoder.decode(s)
    File “/usr/lib/python2.7/json/decoder.py”, line 364, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
    File “/usr/lib/python2.7/json/decoder.py”, line 380, in raw_decode
    obj, end = self.scan_once(s, idx)
    ValueError: Expecting property name: line 5 column 1 (char 124)

looks like the site_config.json json is invalid please check the files contain on https://jsonlint.com/

Hello @makarand_b . Thank you for your response. I have fixed my json file as you mentioned and error was gone away. But when I bench update again, I have this error:

Backing up sites…
Traceback (most recent call last):
File “/usr/lib/python2.7/runpy.py”, line 174, in _run_module_as_main
main”, fname, loader, pkg_name)
File “/usr/lib/python2.7/runpy.py”, line 72, in _run_code
exec code in run_globals
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 79, in
main()
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 16, in main
click.Group(commands=commands)(prog_name=‘bench’)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 722, in call
return self.main(*args, **kwargs)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 697, in main
rv = self.invoke(ctx)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 535, in invoke
return callback(*args, **kwargs)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/decorators.py”, line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/commands/init.py”, line 24, in _func
ret = f(frappe.dict(ctx.obj), *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/commands/site.py”, line 284, in backup
odb = scheduled_backup(ignore_files=not with_files, backup_path_db=backup_path_db, backup_path_files=backup_path_files, backup_path_private_files=backup_path_private_files, force=True)
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/backups.py”, line 165, in scheduled_backup
odb = new_backup(older_than, ignore_files, backup_path_db=backup_path_db, backup_path_files=backup_path_files, force=force)
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/backups.py”, line 175, in new_backup
odb.get_backup(older_than, ignore_files, force=force)
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/backups.py”, line 48, in get_backup
self.set_backup_file_name()
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/backups.py”, line 63, in set_backup_file_name
todays_date = now_datetime().strftime('%Y%m%d
%H%M%S’)
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/data.py”, line 116, in now_datetime
dt = convert_utc_to_user_timezone(datetime.datetime.utcnow())
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/data.py”, line 139, in convert_utc_to_user_timezone
return utcnow.astimezone(timezone(get_time_zone()))
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/data.py”, line 133, in get_time_zone
return frappe.cache().get_value(“time_zone”, _get_time_zone)
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/redis_wrapper.py”, line 70, in get_value
val = generator()
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/data.py”, line 127, in _get_time_zone
return frappe.db.get_system_setting(‘time_zone’) or ‘Asia/Kolkata’
File “/home/frappe/frappe-bench/apps/frappe/frappe/database.py”, line 844, in get_system_setting
return frappe.cache().get_value(“system_settings”, _load_system_settings).get(key)
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/redis_wrapper.py”, line 70, in get_value
val = generator()
File “/home/frappe/frappe-bench/apps/frappe/frappe/database.py”, line 843, in _load_system_settings
return self.get_singles_dict(“System Settings”)
File “/home/frappe/frappe-bench/apps/frappe/frappe/database.py”, line 529, in get_singles_dict
tabSingles where doctype=%s"“”, doctype))
File “/home/frappe/frappe-bench/apps/frappe/frappe/database.py”, line 107, in sql
self.connect()
File “/home/frappe/frappe-bench/apps/frappe/frappe/database.py”, line 53, in connect
use_unicode=True, charset=‘utf8mb4’)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/init.py”, line 86, in Connect
return Connection(*args, **kwargs)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/connections.py”, line 191, in init
super(Connection, self).init(*args, **kwargs2)
_mysql_exceptions.OperationalError: (2002, ‘Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 “No such file or directory”)’)

This is a fresh install of frappe and ERPNext. I have a separate thread as I experienced error during installation here:

restart the mysql server and try again

we are getting the same error though the update completes successfully site_config.json lloks correct

ERPNext: v8.0.40 (master)

Frappe Framework: v8.0.60 (master):

NFO:bench.utils:npm install
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.1: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“x64”})
npm WARN frappe@ No description
Backing up sites…

Hello @imllc

Same issue.

I got info it is not harmful.

Hope this helps.

Hello @makarand_b ! Thanks for the advise but it didn’t solve the issue. So I decided to reformat again my server selecting these instead to avoid dependency issues :

After formatting, I have installed frappe and ERPNext and it went perfectly smooth. Thanks!

@imllc @krnkris I believe my problem was during server installation. Please refer to my linked thread in my first reply. Thanks!