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

What is the output when you run:

node apps/frappe/socketio.js
The program 'node' can be found in the following packages:
 * node
 * nodejs-legacy
Try: sudo apt-get install <selected package>

try:

nodejs apps/frappe/socketio.js
    nodejs apps/frappe/socketio.js

module.js:340
    throw err;
          ^
Error: Cannot find module '/home/ubuntu/apps/frappe/socketio.js'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:902:3

You need to run it from within the frappe-bench folder

Ooops, sorry.

~/frappe-bench$ nodejs apps/frappe/socketio.js
listening on *: 9000

events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: Redis connection to redis://localhost:12311 failed - connect ENOENT
    at RedisClient.on_error (/home/ubuntu/frappe-bench/node_modules/redis/index.js:196:24)
    at Socket.<anonymous> (/home/ubuntu/frappe-bench/node_modules/redis/index.js:106:14)
    at Socket.EventEmitter.emit (events.js:95:17)
    at net.js:441:14
    at process._tickCallback (node.js:415:13)

Did you run bench setup config as mentioned in point 4? Can you paste the output of cat sites/common_site_config.json?

Followed every part of pt.4.
Output:

~/frappe-bench$  cat sites/common_site_config.json
{
 "auto_update": false,
 "frappe_user": "ubuntu",
 "gunicorn_workers": 1,
 "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

What about: cat config/redis_socketio.conf

~/frappe-bench$ cat config/redis_socketio.conf
dbfilename redis_socketio.rdb
dir /home/ubuntu/frappe-bench/config/pids
pidfile /home/ubuntu/frappe-bench/config/pids/redis_socketio.pid

How come port is missing from this file :frowning:

Try running bench setup redis again.

and then check the output of cat config/redis_socketio.conf

1 Like

No output msgs after running bench setup redis from frappe-bench folder.

new output:

~/frappe-bench$ cat config/redis_socketio.conf
dbfilename redis_socketio.rdb
dir /home/ubuntu/frappe-bench/config/pids
pidfile /home/ubuntu/frappe-bench/config/pids/redis_socketio.pid

I think you didn’t paste the port. It should show:

dbfilename redis_socketio.rdb
dir /home/ubuntu/frappe-bench/config/pids
pidfile /home/ubuntu/frappe-bench/config/pids/redis_socketio.pid
port 12311

What about the other redis configs? cat redis_cache.conf and cat redis_queue.conf?

Also, what’s the current output of sudo supervisorctl status

Gah, port was hidden on the next line (missing CR) for some reason. :grimacing:

Here’s the output.
dbfilename redis_socketio.rdb
dir /home/ubuntu/frappe-bench/config/pids
pidfile /home/ubuntu/frappe-bench/config/pids/redis_socketio.pid
port 12311

What’s the output of sudo supervisorctl status. Try:

sudo supervisorctl reread
sudo supervisorctl update
sudo supervisorctl restart all
sudo supervisorctl status
~/frappe-bench$ cat redis_cache.conf
cat: redis_cache.conf: No such file or directory
~/frappe-bench$ cat redis_queue.conf
cat: redis_queue.conf: No such file or directory

cat config/redis_cache.conf and cat config/redis_queue.conf

ubuntu@ip-xxx-xxx-xxx-xxx:~/frappe-bench$ sudo supervisorctl reread
No config updates to processes
ubuntu@ip-xxx-xxx-xxx-xxx:~/frappe-bench$ sudo supervisorctl update
ubuntu@ip-xxx-xxx-xxx-xxx:~/frappe-bench$ sudo supervisorctl restart all
frappe-bench-frappe-async-worker: stopped
frappe-bench-frappe-longjob-worker: stopped
frappe-bench-frappe-workerbeat: stopped
frappe-bench-frappe-web: stopped
frappe-bench-frappe-worker: stopped
frappe-bench-frappe-async-worker: started
frappe-bench-frappe-longjob-worker: started
frappe-bench-frappe-workerbeat: started
frappe-bench-frappe-web: started
frappe-bench-frappe-worker: started
frappe-bench-node-socketio: ERROR (abnormal termination)
frappe-bench-redis-queue: started
frappe-bench-redis-cache: started
frappe-bench-redis-socketio: started
ubuntu@ip-xxx-xxx-xxx-xxx:~/frappe-bench$ sudo supervisorctl status
ubuntu@ip-xxx-xxx-xxx-xxx:~/frappe-bench$ cat config/redis_cache.conf
dbfilename redis_cache.rdb
dir /home/ubuntu/frappe-bench/config/pids
pidfile /home/ubuntu/frappe-bench/config/pids/redis_cache.pid
port 11311
maxmemory 50mb
maxmemory-policy allkeys-lru
appendonly no
save ""
ubuntu@ip-xxx-xxx-xxx-xxx:~/frappe-bench$ cat config/redis_queue.conf
dbfilename redis_queue.rdb
dir /home/ubuntu/frappe-bench/config/pids
pidfile /home/ubuntu/frappe-bench/config/pids/redis_queue.pid

This doesn’t make any sense. Can you check again the output of sudo supervisorctl status?

~/frappe-bench$ sudo supervisorctl status
frappe-bench-processes:frappe-bench-frappe-async-worker RUNNING    pid 2183, uptime 0:07:08
frappe-bench-processes:frappe-bench-frappe-longjob-worker RUNNING    pid 2184, uptime 0:07:08
frappe-bench-processes:frappe-bench-frappe-web RUNNING    pid 2200, uptime 0:07:07
frappe-bench-processes:frappe-bench-frappe-worker RUNNING    pid 2208, uptime 0:07:07
frappe-bench-processes:frappe-bench-frappe-workerbeat RUNNING    pid 2195, uptime 0:07:08
frappe-bench-processes:frappe-bench-node-socketio FATAL      Exited too quickly (process log may have details)
frappe-bench-redis:frappe-bench-redis-cache RUNNING    pid 2219, uptime 0:07:04
frappe-bench-redis:frappe-bench-redis-queue RUNNING    pid 2216, uptime 0:07:05
frappe-bench-redis:frappe-bench-redis-socketio RUNNING    pid 2223, uptime 0:07:03
ubuntu@ip-172-31-42-52:~/frappe-bench$