[Important] Bench version 2 - see this before you run bench update

Guys, I am getting this after the latest update. Am seriously out of ideas, have tried all the steps above but the supervisorctl status yields the following:

/frappe-bench$ sudo supervisorctl status
frappe-bench-redis:frappe-bench-redis-cache RUNNING    pid 28011, uptime 0:00:10
frappe-bench-redis:frappe-bench-redis-queue RUNNING    pid 28002, uptime 0:00:11
frappe-bench-redis:frappe-bench-redis-socketio RUNNING    pid 28037, uptime 0:00:10
frappe-bench-web:frappe-bench-frappe-web RUNNING    pid 27958, uptime 0:00:12
frappe-bench-web:frappe-bench-node-socketio RUNNING    pid 28040, uptime 0:00:10
frappe-bench-workers:frappe-bench-frappe-default-worker-0 BACKOFF    Exited too quickly (process log may have details)
frappe-bench-workers:frappe-bench-frappe-long-worker-0 BACKOFF    Exited too quickly (process log may have details)
frappe-bench-workers:frappe-bench-frappe-schedule RUNNING    pid 27903, uptime 0:00:15
frappe-bench-workers:frappe-bench-frappe-short-worker-0 BACKOFF    Exited too quickly (process log may have details)

Check logs folder

worker.log and workbeat.log doesnt show anything abnormal, any other logs to look at?

No. Did you change frappe and erpnext branch to master? If yes you need to regenerate supervisor config.

I am using the develop branch, for completeness sake i regenerated the supervisor config but its still the same

When i run the following manually:
bench worker --queue default

I get this output

17:00:22 RQ worker u'rq:worker:STRERP03.26968.default' started, version 0.5.6
17:00:22
17:00:22 *** Listening on default...

which i suppose seems ok…

my supervisorctl config for the default queue is:

[program:frappe-bench-frappe-default-worker]
command=bench worker --queue default
priority=4
autostart=true
autorestart=true
stdout_logfile=/home/test/frappe-bench/logs/worker.log
stderr_logfile=/home/test/frappe-bench/logs/worker.error.log
user=test
stopwaitsecs=1560
directory=/home/test/frappe-bench
killasgroup=true
numprocs=1
process_name=%(program_name)s-%(process_num)d

Anything else i can check?

Check if common site config had redis urls

looks ok

{
 "auto_update": false,
 "background_workers": 1,
 "db_host": "db.test.local",
 "dns_multitenant": false,
 "frappe_user": "test",
 "gunicorn_workers": 4,
 "rebase_on_pull": false,
 "redis_cache": "redis://localhost:11311",
 "redis_queue": "redis://localhost:6379",
 "redis_socketio": "redis://localhost:12311",
 "restart_supervisor_on_update": true,
 "serve_default_site": true,
 "shallow_clone": true,
 "socketio_port": 9000,
 "update_bench_on_update": true,
 "webserver_port": 8000
}

@anand after some tinkering around i get the following error in worker.error.log

"worker.error.log" [readonly] 270 lines --0%--                                                                                                                                                  1,1           Top
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/test/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 936, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/test/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 782, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/test/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 782, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/test/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 416, in invoke
    return callback(*args, **kwargs)
  File "/home/test/frappe-bench/apps/frappe/frappe/commands.py", line 1040, in start_worker
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/test/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 416, in invoke
    return callback(*args, **kwargs)
  File "/home/test/frappe-bench/apps/frappe/frappe/commands.py", line 1040, in start_worker
    start_worker(queue)
  File "/home/test/frappe-bench/apps/frappe/frappe/utils/background_jobs.py", line 72, in start_worker
    Worker(queues, name=get_worker_name(queue)).work()
  File "/home/test/frappe-bench/env/local/lib/python2.7/site-packages/rq/worker.py", line 135, in __init__
    self.validate_queues()
  File "/home/test/frappe-bench/env/local/lib/python2.7/site-packages/rq/worker.py", line 179, in validate_queues
    raise TypeError('{0} is not of type {1} or text type'.format(queue, self.queue_class))
TypeError: long is not of type <class 'rq.queue.Queue'> or text type
    start_worker(queue)
  File "/home/test/frappe-bench/apps/frappe/frappe/utils/background_jobs.py", line 72, in start_worker
    Worker(queues, name=get_worker_name(queue)).work()
  File "/home/test/frappe-bench/env/local/lib/python2.7/site-packages/rq/worker.py", line 135, in __init__
    self.validate_queues()
  File "/home/test/frappe-bench/env/local/lib/python2.7/site-packages/rq/worker.py", line 179, in validate_queues
    raise TypeError('{0} is not of type {1} or text type'.format(queue, self.queue_class))
TypeError: default is not of type <class 'rq.queue.Queue'> or text type
Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 162, 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/test/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 79, in <module>
    main()
  File "/home/test/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 16, in main
    click.Group(commands=commands)(prog_name='bench')
  File "/home/test/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 610, in __call__
    return self.main(*args, **kwargs)
  File "/home/test/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 590, in main
    rv = self.invoke(ctx)
  File "/home/test/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 936, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/test/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 936, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/test/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 782, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/test/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 416, in invoke
    return callback(*args, **kwargs)
  File "/home/test/frappe-bench/apps/frappe/frappe/commands.py", line 1040, in start_worker
    start_worker(queue)
  File "/home/test/frappe-bench/apps/frappe/frappe/utils/background_jobs.py", line 72, in start_worker
    Worker(queues, name=get_worker_name(queue)).work()
  File "/home/test/frappe-bench/env/local/lib/python2.7/site-packages/rq/worker.py", line 135, in __init__
    self.validate_queues()
  File "/home/test/frappe-bench/env/local/lib/python2.7/site-packages/rq/worker.py", line 179, in validate_queues
    raise TypeError('{0} is not of type {1} or text type'.format(queue, self.queue_class))
TypeError: short is not of type <class 'rq.queue.Queue'> or text type 

Any idea what is causing this? Thanks.

./env/bin/pip install --upgrade -r apps/frappe/requirements.txt

Your python rq seems old

3 Likes

I am using bench develop how do I update to bench v2

@anand awesome! that did it! thank you!

1 Like

./env/bin/pip install --upgrade -r apps/frappe/requirements.txt

i ran the above command
i even did
git pull
git fetch

but still iam stuck with attribute error …tuple…object has no attribute … name

Thanks
Hemanth

@krishnanhemanth

Can you please post the complete error snapshot here, so that everyone who looks at the thread knows what issue you are facing?

this is the error i get

Even I am getting this error lately.
I cant execute any command of bench on my virtual system.

Kindly advice.
Thanks

@fkardame if you don’t share details on what issue(s) you are facing, nobody will able to help you! If possible open new thread with all details, such as steps, you have taken, screenshots etc. Thanks

@yashodhan
Thanks alot for the reply yashodhan.
I have posted my error codes here

Thanks Again. Will appreciate your help

@anand

just stumbled on this discussion

Would you mind sharing the config of the server with 4,000 sites?

Regards

Hi Anand,

Do you mind to share the server specification & application configuration for that 4000 sites server ?

Regards,
Subhajit