Force database creation in install script?

Sigh… now I get this:

$ bench start 16:31:08 system | watch.1 started (pid=30148) 16:31:08 system | worker_long.1 started (pid=30147) 16:31:08 system | redis_queue.1 started (pid=30149) 16:31:08 redis_queue.1 | [30149] 23 Jul 16:31:08.074 # You requested maxclients of 10000 requiring at least 10032 max file descriptors. 16:31:08 redis_queue.1 | [30149] 23 Jul 16:31:08.074 # Redis can't set maximum open files to 10032 because of OS error: Operation not permitted. 16:31:08 redis_queue.1 | [30149] 23 Jul 16:31:08.074 # Current maximum open files is 1024. maxclients has been reduced to 4064 to compensate for low ulimit. If you need higher maxclients increase 'ulimit -n'. 16:31:08 redis_queue.1 | [30149] 23 Jul 16:31:08.075 # Creating Server TCP listening socket 127.0.0.1:11000: bind: Address already in use 16:31:08 system | redis_queue.1 stopped (rc=1) 16:31:08 system | redis_socketio.1 started (pid=30150) 16:31:08 redis_socketio.1 | [30150] 23 Jul 16:31:08.067 # You requested maxclients of 10000 requiring at least 10032 max file descriptors. 16:31:08 redis_socketio.1 | [30150] 23 Jul 16:31:08.067 # Redis can't set maximum open files to 10032 because of OS error: Operation not permitted. 16:31:08 redis_socketio.1 | [30150] 23 Jul 16:31:08.067 # Current maximum open files is 1024. maxclients has been reduced to 4064 to compensate for low ulimit. If you need higher maxclients increase 'ulimit -n'. 16:31:08 redis_socketio.1 | _._ 16:31:08 redis_socketio.1 | _.-``__ ''-._ 16:31:08 redis_socketio.1 | _.-`` . _. ''-._ Redis 2.8.19 (00000000/0) 64 bit 16:31:08 redis_socketio.1 | .-`` .-```. ```\/ _.,_ ''-._ 16:31:08 redis_socketio.1 | ( ' , .- | , ) Running in stand alone mode 16:31:08 redis_socketio.1 | |-.-...- …-.-._|'` _.-'| Port: 12000 16:31:08 redis_socketio.1 | | `-._ `._ / _.-' | PID: 30150 16:31:08 redis_socketio.1 | `-._ `-._ `-./ _.-' _.-' 16:31:08 redis_socketio.1 | |`-._`-._ `-.__.-' _.-'_.-'| 16:31:08 redis_socketio.1 | | `-._`-._ _.-'_.-' | http://redis.io 16:31:08 redis_socketio.1 | `-._ `-._`-.__.-'_.-' _.-' 16:31:08 redis_socketio.1 | |`-._`-._ `-.__.-' _.-'_.-'| 16:31:08 redis_socketio.1 | | `-._`-._ _.-'_.-' | 16:31:08 redis_socketio.1 | `-._ `-._`-.__.-'_.-' _.-' 16:31:08 redis_socketio.1 | `-._ `-.__.-' _.-' 16:31:08 redis_socketio.1 | `-._ _.-' 16:31:08 redis_socketio.1 | `-.__.-' 16:31:08 redis_socketio.1 | 16:31:08 redis_socketio.1 | [30150] 23 Jul 16:31:08.069 # Server started, Redis version 2.8.19 16:31:08 redis_socketio.1 | [30150] 23 Jul 16:31:08.069 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect. 16:31:08 redis_socketio.1 | [30150] 23 Jul 16:31:08.069 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled. 16:31:08 redis_socketio.1 | [30150] 23 Jul 16:31:08.069 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128. 16:31:08 redis_socketio.1 | [30150] 23 Jul 16:31:08.069 * The server is now ready to accept connections on port 12000 16:31:08 system | worker_short.1 started (pid=30151) 16:31:08 system | socketio.1 started (pid=30155) 16:31:08 system | schedule.1 started (pid=30152) 16:31:08 system | web.1 started (pid=30154) 16:31:08 system | redis_cache.1 started (pid=30156) 16:31:08 redis_cache.1 | [30156] 23 Jul 16:31:08.132 # You requested maxclients of 10000 requiring at least 10032 max file descriptors. 16:31:08 redis_cache.1 | [30156] 23 Jul 16:31:08.132 # Redis can't set maximum open files to 10032 because of OS error: Operation not permitted. 16:31:08 redis_cache.1 | [30156] 23 Jul 16:31:08.132 # Current maximum open files is 1024. maxclients has been reduced to 4064 to compensate for low ulimit. If you need higher maxclients increase 'ulimit -n'. 16:31:08 redis_cache.1 | _._ 16:31:08 redis_cache.1 | _.- ‘’-.
16:31:08 redis_cache.1 | .- `. `_. ''-._ Redis 2.8.19 (00000000/0) 64 bit 16:31:08 redis_cache.1 | .- .-. / ., ‘’-.
16:31:08 redis_cache.1 | ( ’ , .- |, ) Running in stand alone mode
16:31:08 redis_cache.1 | |-._-…- __...-.``-._|' .-'| Port: 13000
16:31:08 redis_cache.1 | | -._ .
/ .-’ | PID: 30156
16:31:08 redis_cache.1 | -._ -.
-./ _.-' _.-' 16:31:08 redis_cache.1 | |-.-._ -.__.-’ .-'.-'|
16:31:08 redis_cache.1 | | -._-.
.-'.-’ | http://redis.io
16:31:08 redis_cache.1 | -._ -.-.__.-'_.-' _.-' 16:31:08 redis_cache.1 | |-.-._ -.__.-’ .-'.-‘|
16:31:08 redis_cache.1 | | -._-._ .-'.-’ |
16:31:08 redis_cache.1 | -._ -.-.__.-'_.-' _.-' 16:31:08 redis_cache.1 | -. -.__.-' _.-' 16:31:08 redis_cache.1 | -._ _.-’
16:31:08 redis_cache.1 | -.__.-' 16:31:08 redis_cache.1 | 16:31:08 redis_cache.1 | [30156] 23 Jul 16:31:08.132 # Server started, Redis version 2.8.19 16:31:08 redis_cache.1 | [30156] 23 Jul 16:31:08.132 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect. 16:31:08 redis_cache.1 | [30156] 23 Jul 16:31:08.132 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled. 16:31:08 redis_cache.1 | [30156] 23 Jul 16:31:08.132 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128. 16:31:08 redis_cache.1 | [30156] 23 Jul 16:31:08.132 * The server is now ready to accept connections on port 13000 16:31:08 system | worker_default.1 started (pid=30153) 16:31:08 system | sending SIGTERM to redis_socketio.1 (pid 30150) 16:31:08 system | sending SIGTERM to worker_long.1 (pid 30147) 16:31:08 system | sending SIGTERM to watch.1 (pid 30148) 16:31:08 system | sending SIGTERM to web.1 (pid 30154) 16:31:08 system | sending SIGTERM to schedule.1 (pid 30152) 16:31:08 system | sending SIGTERM to worker_default.1 (pid 30153) 16:31:08 system | sending SIGTERM to socketio.1 (pid 30155) 16:31:08 system | sending SIGTERM to redis_cache.1 (pid 30156) 16:31:08 system | sending SIGTERM to worker_short.1 (pid 30151) 16:31:08 redis_socketio.1 | [30150 | signal handler] (1469305868) Received SIGTERM scheduling shutdown... 16:31:08 system | worker_short.1 stopped (rc=-15) 16:31:08 system | worker_default.1 stopped (rc=-15) 16:31:08 redis_cache.1 | [30156 | signal handler] (1469305868) Received SIGTERM scheduling shutdown... 16:31:08 system | web.1 stopped (rc=-15) 16:31:08 system | watch.1 stopped (rc=-15) 16:31:08 system | worker_long.1 stopped (rc=-15) 16:31:08 system | socketio.1 stopped (rc=143) 16:31:08 system | schedule.1 stopped (rc=-15) 16:31:08 redis_cache.1 | [30156] 23 Jul 16:31:08.263 # User requested shutdown... 16:31:08 redis_cache.1 | [30156] 23 Jul 16:31:08.263 # Redis is now ready to exit, bye bye... 16:31:08 system | redis_cache.1 stopped (rc=0) 16:31:08 redis_socketio.1 | [30150] 23 Jul 16:31:08.274 # User requested shutdown... 16:31:08 redis_socketio.1 | [30150] 23 Jul 16:31:08.274 # Redis is now ready to exit, bye bye... 16:31:08 system | redis_socketio.1 stopped (rc=0)

How many database systems are required to run a single web application? Really. I start to wonder if it is worth it when I already have odoo running on this VM.

Now I guess I need to figure out how to make redis happy on this VM.

can you try

bench setup socketio

Introduction to Redis

Thanks again for the reply revant_one. I tried

bench setup socketio

then bench start and I got essentially the same thing. I’m wondering if the redis v2.8.19-2.el7 I have installed is too old? I may try removing the package and building it from the latest source and see what I get.

Can you share tailing lines of error logs from frappe-bench/logs

There are three files present in frappe-bench/logs:
auto_update_log.log backup.log bench.log

There appears to be no error log file. The only two lines present in bench.log are:

2016-07-22 15:00:38,885 INFO getting app erpnext 2016-07-22 15:01:11,066 INFO installing erpnext

What I am noticing in the output of bench start is:

08:36:55 redis_queue.1 | [5678] 25 Jul 08:36:55.724 # Creating Server TCP listening socket 127.0. 0.1:11000: bind: Address already in use

Which is followed by:

08:36:55 system | redis_queue.1 stopped (rc=1) 08:36:55 system | socketio.1 started (pid=5679) 08:36:55 system | schedule.1 started (pid=5676) 08:36:55 system | worker_short.1 started (pid=5681) 08:36:55 system | web.1 started (pid=5682) 08:36:55 system | sending SIGTERM to redis_socketio.1 (pid 5663) 08:36:55 system | sending SIGTERM to worker_long.1 (pid 5661) 08:36:55 system | sending SIGTERM to watch.1 (pid 5662) 08:36:55 system | sending SIGTERM to web.1 (pid 5682) 08:36:55 system | sending SIGTERM to schedule.1 (pid 5676) 08:36:55 system | sending SIGTERM to worker_default.1 (pid 5677) 08:36:55 system | sending SIGTERM to socketio.1 (pid 5679) 08:36:55 system | sending SIGTERM to redis_cache.1 (pid 5680) 08:36:55 system | sending SIGTERM to worker_short.1 (pid 5681) 08:36:55 redis_socketio.1 | [5663 | signal handler] (1469450215) Received SIGTERM scheduling shutdow n...

So I’m in the process of working out what might be already listening on port 11000.

I suppose I could edit config/redis_queue.conf to use a different port? Would that work?

a netstat -anp | grep 11000 gives me:
tcp 0 0 127.0.0.1:11000 0.0.0.0:* LISTEN 3796/lookup-domain- tcp 1 0 127.0.0.1:11000 127.0.0.1:38374 CLOSE_WAIT 3796/lookup-domain-

Which is a webmin process: /usr/libexec/webmin/virtual-server/lookup-domain-daemon.pl

I’m going to try editing config/redis_queue.conf to use a different port and see what I get.

I think redis server is already running.
can you try

sudo update-rc.d redis-server disable
sudo service redis-server stop
frappe-bench$ bench start

Thanks so much for the help revant_one. I’ll look at that in a minute.

I edited config/redis_queue.conf to use port 11001 and bench start got farther this time:

$ bench start
09:29:01 system           | redis_queue.1 started (pid=7697)
09:29:00 redis_queue.1    | [7697] 25 Jul 09:29:00.959 # You requested maxclients of 10000 requiring at least 10032 max file descriptors.
09:29:00 redis_queue.1    | [7697] 25 Jul 09:29:00.959 # Redis can't set maximum open files to 10032 because of OS error: Operation not permitted.
09:29:00 redis_queue.1    | [7697] 25 Jul 09:29:00.959 # Current maximum open files is 1024. maxclients has been reduced to 4064 to compensate for low ulimit. If you need higher maxclients increase 'ulimit -n'.
09:29:00 redis_queue.1    |                 _._
09:29:00 redis_queue.1    |            _.-``__ ''-._
09:29:00 redis_queue.1    |       _.-``    `.  `_.  ''-._           Redis 2.8.19 (00000000/0) 64 bit
09:29:00 redis_queue.1    |   .-`` .-```.  ```\/    _.,_ ''-._
09:29:00 redis_queue.1    |  (    '      ,       .-`  | `,    )     Running in stand alone mode
09:29:00 redis_queue.1    |  |`-._`-...-` __...-.``-._|'` _.-'|     Port: 11001
09:29:00 redis_queue.1    |  |    `-._   `._    /     _.-'    |     PID: 7697
09:29:00 redis_queue.1    |   `-._    `-._  `-./  _.-'    _.-'
09:29:00 redis_queue.1    |  |`-._`-._    `-.__.-'    _.-'_.-'|
09:29:00 redis_queue.1    |  |    `-._`-._        _.-'_.-'    |           http://redis.io
09:29:00 redis_queue.1    |   `-._    `-._`-.__.-'_.-'    _.-'
09:29:00 redis_queue.1    |  |`-._`-._    `-.__.-'    _.-'_.-'|
09:29:00 redis_queue.1    |  |    `-._`-._        _.-'_.-'    |
09:29:00 redis_queue.1    |   `-._    `-._`-.__.-'_.-'    _.-'
09:29:00 redis_queue.1    |       `-._    `-.__.-'    _.-'
09:29:00 redis_queue.1    |           `-._        _.-'
09:29:00 redis_queue.1    |               `-.__.-'
09:29:00 redis_queue.1    |
09:29:00 redis_queue.1    | [7697] 25 Jul 09:29:00.961 # Server started, Redis version 2.8.19
09:29:00 redis_queue.1    | [7697] 25 Jul 09:29:00.961 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
09:29:00 redis_queue.1    | [7697] 25 Jul 09:29:00.961 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
09:29:00 redis_queue.1    | [7697] 25 Jul 09:29:00.962 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
09:29:00 redis_queue.1    | [7697] 25 Jul 09:29:00.962 * The server is now ready to accept connections on port 11001
09:29:01 system           | watch.1 started (pid=7696)
09:29:01 system           | worker_long.1 started (pid=7695)
09:29:01 system           | web.1 started (pid=7694)
09:29:01 system           | redis_socketio.1 started (pid=7698)
09:29:01 redis_socketio.1 | [7698] 25 Jul 09:29:00.981 # You requested maxclients of 10000 requiring at least 10032 max file descriptors.
09:29:01 redis_socketio.1 | [7698] 25 Jul 09:29:00.981 # Redis can't set maximum open files to 10032 because of OS error: Operation not permitted.
09:29:01 redis_socketio.1 | [7698] 25 Jul 09:29:00.981 # Current maximum open files is 1024. maxclients has been reduced to 4064 to compensate for low ulimit. If you need higher maxclients increase 'ulimit -n'.
09:29:01 redis_socketio.1 |                 _._
09:29:01 redis_socketio.1 |            _.-``__ ''-._
09:29:01 redis_socketio.1 |       _.-``    `.  `_.  ''-._           Redis 2.8.19 (00000000/0) 64 bit
09:29:01 redis_socketio.1 |   .-`` .-```.  ```\/    _.,_ ''-._
09:29:01 redis_socketio.1 |  (    '      ,       .-`  | `,    )     Running in stand alone mode
09:29:01 redis_socketio.1 |  |`-._`-...-` __...-.``-._|'` _.-'|     Port: 12000
09:29:01 redis_socketio.1 |  |    `-._   `._    /     _.-'    |     PID: 7698
09:29:01 redis_socketio.1 |   `-._    `-._  `-./  _.-'    _.-'
09:29:01 redis_socketio.1 |  |`-._`-._    `-.__.-'    _.-'_.-'|
09:29:01 redis_socketio.1 |  |    `-._`-._        _.-'_.-'    |           http://redis.io
09:29:01 redis_socketio.1 |   `-._    `-._`-.__.-'_.-'    _.-'
09:29:01 redis_socketio.1 |  |`-._`-._    `-.__.-'    _.-'_.-'|
09:29:01 redis_socketio.1 |  |    `-._`-._        _.-'_.-'    |
09:29:01 redis_socketio.1 |   `-._    `-._`-.__.-'_.-'    _.-'
09:29:01 redis_socketio.1 |       `-._    `-.__.-'    _.-'
09:29:01 redis_socketio.1 |           `-._        _.-'
09:29:01 redis_socketio.1 |               `-.__.-'
09:29:01 redis_socketio.1 |
09:29:01 redis_socketio.1 | [7698] 25 Jul 09:29:00.981 # Server started, Redis version 2.8.19
09:29:01 redis_socketio.1 | [7698] 25 Jul 09:29:00.981 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
09:29:01 redis_socketio.1 | [7698] 25 Jul 09:29:00.981 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
09:29:01 redis_socketio.1 | [7698] 25 Jul 09:29:00.981 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
09:29:01 redis_socketio.1 | [7698] 25 Jul 09:29:00.981 * The server is now ready to accept connections on port 12000
09:29:01 system           | socketio.1 started (pid=7715)
09:29:01 system           | worker_short.1 started (pid=7713)
09:29:01 system           | redis_cache.1 started (pid=7716)
09:29:01 redis_cache.1    | [7716] 25 Jul 09:29:01.082 # You requested maxclients of 10000 requiring at least 10032 max file descriptors.
09:29:01 redis_cache.1    | [7716] 25 Jul 09:29:01.082 # Redis can't set maximum open files to 10032 because of OS error: Operation not permitted.
09:29:01 redis_cache.1    | [7716] 25 Jul 09:29:01.082 # Current maximum open files is 1024. maxclients has been reduced to 4064 to compensate for low ulimit. If you need higher maxclients increase 'ulimit -n'.
09:29:01 redis_cache.1    |                 _._
09:29:01 redis_cache.1    |            _.-``__ ''-._
09:29:01 redis_cache.1    |       _.-``    `.  `_.  ''-._           Redis 2.8.19 (00000000/0) 64 bit
09:29:01 redis_cache.1    |   .-`` .-```.  ```\/    _.,_ ''-._
09:29:01 redis_cache.1    |  (    '      ,       .-`  | `,    )     Running in stand alone mode
09:29:01 redis_cache.1    |  |`-._`-...-` __...-.``-._|'` _.-'|     Port: 13000
09:29:01 redis_cache.1    |  |    `-._   `._    /     _.-'    |     PID: 7716
09:29:01 redis_cache.1    |   `-._    `-._  `-./  _.-'    _.-'
09:29:01 redis_cache.1    |  |`-._`-._    `-.__.-'    _.-'_.-'|
09:29:01 redis_cache.1    |  |    `-._`-._        _.-'_.-'    |           http://redis.io
09:29:01 redis_cache.1    |   `-._    `-._`-.__.-'_.-'    _.-'
09:29:01 redis_cache.1    |  |`-._`-._    `-.__.-'    _.-'_.-'|
09:29:01 redis_cache.1    |  |    `-._`-._        _.-'_.-'    |
09:29:01 redis_cache.1    |   `-._    `-._`-.__.-'_.-'    _.-'
09:29:01 redis_cache.1    |       `-._    `-.__.-'    _.-'
09:29:01 redis_cache.1    |           `-._        _.-'
09:29:01 redis_cache.1    |               `-.__.-'
09:29:01 redis_cache.1    |
09:29:01 redis_cache.1    | [7716] 25 Jul 09:29:01.082 # Server started, Redis version 2.8.19
09:29:01 redis_cache.1    | [7716] 25 Jul 09:29:01.083 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
09:29:01 redis_cache.1    | [7716] 25 Jul 09:29:01.083 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
09:29:01 redis_cache.1    | [7716] 25 Jul 09:29:01.083 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
09:29:01 redis_cache.1    | [7716] 25 Jul 09:29:01.083 * The server is now ready to accept connections on port 13000
09:29:01 system           | worker_default.1 started (pid=7714)
09:29:01 system           | schedule.1 started (pid=7717)
09:29:05 socketio.1       | listening on *: 9000
09:29:13 watch.1          | compiling /home/frappe/frappe-bench/apps/frappe/frappe/public/less/avatar.less
09:29:13 web.1            |  * Running on http://0.0.0.0:8000/ (Press CTRL+C to quit)
09:29:14 web.1            |  * Restarting with inotify reloader
09:29:14 watch.1          | compiling /home/frappe/frappe-bench/apps/frappe/frappe/public/less/calendar.less
09:29:15 watch.1          | compiling /home/frappe/frappe-bench/apps/frappe/frappe/public/less/common.less
09:29:15 worker_default.1 | Traceback (most recent call last):
09:29:15 worker_default.1 |   File "/usr/lib64/python2.7/runpy.py", line 162, in _run_module_as_main
09:29:15 worker_default.1 |     "__main__", fname, loader, pkg_name)
09:29:15 worker_default.1 |   File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code
09:29:15 worker_default.1 |     exec code in run_globals
09:29:15 worker_default.1 |   File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 79, in <module>
09:29:15 worker_default.1 |     main()
09:29:15 worker_default.1 |   File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 16, in main
09:29:15 worker_default.1 |     click.Group(commands=commands)(prog_name='bench')
09:29:15 worker_default.1 |   File "/home/frappe/frappe-bench/env/lib/python2.7/site-packages/click/core.py", line 716, in __call__
09:29:15 worker_default.1 |     return self.main(*args, **kwargs)
09:29:15 worker_default.1 |   File "/home/frappe/frappe-bench/env/lib/python2.7/site-packages/click/core.py", line 696, in main
09:29:15 worker_default.1 |     rv = self.invoke(ctx)
09:29:15 worker_default.1 |   File "/home/frappe/frappe-bench/env/lib/python2.7/site-packages/click/core.py", line 1060, in invoke
09:29:15 worker_default.1 |     return _process_result(sub_ctx.command.invoke(sub_ctx))
09:29:15 worker_default.1 |   File "/home/frappe/frappe-bench/env/lib/python2.7/site-packages/click/core.py", line 1060, in invoke
09:29:15 worker_default.1 |     return _process_result(sub_ctx.command.invoke(sub_ctx))
09:29:15 worker_default.1 |   File "/home/frappe/frappe-bench/env/lib/python2.7/site-packages/click/core.py", line 889, in invoke
09:29:15 worker_default.1 |     return ctx.invoke(self.callback, **ctx.params)
09:29:15 worker_default.1 |   File "/home/frappe/frappe-bench/env/lib/python2.7/site-packages/click/core.py", line 534, in invoke
09:29:15 worker_default.1 |     return callback(*args, **kwargs)
09:29:15 worker_default.1 |   File "/home/frappe/frappe-bench/apps/frappe/frappe/commands/scheduler.py", line 163, in start_worker
09:29:15 worker_default.1 |     start_worker(queue)
09:29:15 worker_default.1 |   File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/background_jobs.py", line 102, in start_worker
09:29:15 worker_default.1 |     Worker(queues, name=get_worker_name(queue)).work()
09:29:15 worker_default.1 |   File "/home/frappe/frappe-bench/env/lib/python2.7/site-packages/rq/worker.py", line 423, in work
09:29:15 worker_default.1 |     self.register_birth()
09:29:15 worker_default.1 |   File "/home/frappe/frappe-bench/env/lib/python2.7/site-packages/rq/worker.py", line 242, in register_birth
09:29:15 worker_default.1 |     if self.connection.exists(self.key) and \
09:29:15 worker_default.1 |   File "/home/frappe/frappe-bench/env/lib/python2.7/site-packages/redis/client.py", line 855, in exists
09:29:15 worker_default.1 |     return self.execute_command('EXISTS', name)
09:29:15 worker_default.1 |   File "/home/frappe/frappe-bench/env/lib/python2.7/site-packages/redis/client.py", line 579, in execute_command
09:29:15 worker_default.1 |     return self.parse_response(connection, command_name, **options)
09:29:15 worker_default.1 |   File "/home/frappe/frappe-bench/env/lib/python2.7/site-packages/redis/client.py", line 585, in parse_response
09:29:15 worker_default.1 |     response = connection.read_response()
09:29:15 worker_default.1 |   File "/home/frappe/frappe-bench/env/lib/python2.7/site-packages/redis/connection.py", line 577, in read_response
09:29:15 worker_default.1 |     response = self._parser.read_response()
09:29:15 worker_default.1 |   File "/home/frappe/frappe-bench/env/lib/python2.7/site-packages/redis/connection.py", line 238, in read_response
09:29:15 worker_default.1 |     response = self._buffer.readline()
09:29:15 worker_default.1 |   File "/home/frappe/frappe-bench/env/lib/python2.7/site-packages/redis/connection.py", line 168, in readline
09:29:15 worker_default.1 |     self._read_from_socket()
09:29:15 worker_default.1 |   File "/home/frappe/frappe-bench/env/lib/python2.7/site-packages/redis/connection.py", line 143, in _read_from_socket
09:29:15 worker_default.1 |     (e.args,))
09:29:15 worker_default.1 | redis.exceptions.ConnectionError: Error while reading from socket: ('Connection closed by server.',)
09:29:15 system           | worker_default.1 stopped (rc=1)
09:29:15 system           | sending SIGTERM to redis_socketio.1 (pid 7698)
09:29:15 system           | sending SIGTERM to worker_long.1 (pid 7695)
09:29:15 system           | sending SIGTERM to watch.1 (pid 7696)
09:29:15 system           | sending SIGTERM to redis_queue.1 (pid 7697)
09:29:15 system           | sending SIGTERM to web.1 (pid 7694)
09:29:15 system           | sending SIGTERM to schedule.1 (pid 7717)
09:29:15 system           | sending SIGTERM to socketio.1 (pid 7715)
09:29:15 system           | sending SIGTERM to redis_cache.1 (pid 7716)
09:29:15 system           | sending SIGTERM to worker_short.1 (pid 7713)
09:29:15 redis_socketio.1 | [7698 | signal handler] (1469453355) Received SIGTERM scheduling shutdown...
09:29:15 worker_long.1    | 09:29:15 Warm shut down requested
09:29:15 worker_long.1    | Traceback (most recent call last):
09:29:15 worker_long.1    |   File "/usr/lib64/python2.7/runpy.py", line 162, in _run_module_as_main
09:29:15 worker_long.1    |     "__main__", fname, loader, pkg_name)
09:29:15 worker_long.1    |   File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code
09:29:15 worker_long.1    |     exec code in run_globals
09:29:15 worker_long.1    |   File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 79, in <module>
09:29:15 worker_long.1    |     main()
09:29:15 worker_long.1    |   File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 16, in main
09:29:15 worker_long.1    |     click.Group(commands=commands)(prog_name='bench')
09:29:15 worker_long.1    |   File "/home/frappe/frappe-bench/env/lib/python2.7/site-packages/click/core.py", line 716, in __call__
09:29:15 worker_long.1    |     return self.main(*args, **kwargs)
09:29:15 worker_long.1    |   File "/home/frappe/frappe-bench/env/lib/python2.7/site-packages/click/core.py", line 696, in main
09:29:15 worker_long.1    |     rv = self.invoke(ctx)
09:29:15 worker_long.1    |   File "/home/frappe/frappe-bench/env/lib/python2.7/site-packages/click/core.py", line 1060, in invoke
09:29:15 worker_long.1    |     return _process_result(sub_ctx.command.invoke(sub_ctx))
09:29:15 worker_long.1    |   File "/home/frappe/frappe-bench/env/lib/python2.7/site-packages/click/core.py", line 1060, in invoke
09:29:15 worker_long.1    |     return _process_result(sub_ctx.command.invoke(sub_ctx))
09:29:15 worker_long.1    |   File "/home/frappe/frappe-bench/env/lib/python2.7/site-packages/click/core.py", line 889, in invoke
09:29:15 worker_long.1    |     return ctx.invoke(self.callback, **ctx.params)
09:29:15 worker_long.1    |   File "/home/frappe/frappe-bench/env/lib/python2.7/site-packages/click/core.py", line 534, in invoke
09:29:15 worker_long.1    |     return callback(*args, **kwargs)
09:29:15 worker_long.1    |   File "/home/frappe/frappe-bench/apps/frappe/frappe/commands/scheduler.py", line 163, in start_worker
09:29:15 worker_long.1    |     start_worker(queue)
09:29:15 worker_long.1    |   File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/background_jobs.py", line 102, in start_worker
09:29:15 worker_long.1    |     Worker(queues, name=get_worker_name(queue)).work()
09:29:15 worker_long.1    |   File "/home/frappe/frappe-bench/env/lib/python2.7/site-packages/rq/worker.py", line 423, in work
09:29:15 worker_long.1    |     self.register_birth()
09:29:15 worker_long.1    |   File "/home/frappe/frappe-bench/env/lib/python2.7/site-packages/rq/worker.py", line 242, in register_birth
09:29:15 worker_long.1    |     if self.connection.exists(self.key) and \
09:29:15 worker_long.1    |   File "/home/frappe/frappe-bench/env/lib/python2.7/site-packages/redis/client.py", line 855, in exists
09:29:15 worker_long.1    |     return self.execute_command('EXISTS', name)
09:29:15 worker_long.1    |   File "/home/frappe/frappe-bench/env/lib/python2.7/site-packages/redis/client.py", line 579, in execute_command
09:29:15 worker_long.1    |     return self.parse_response(connection, command_name, **options)
09:29:15 worker_long.1    |   File "/home/frappe/frappe-bench/env/lib/python2.7/site-packages/redis/client.py", line 585, in parse_response
09:29:15 worker_long.1    |     response = connection.read_response()
09:29:15 worker_long.1    |   File "/home/frappe/frappe-bench/env/lib/python2.7/site-packages/redis/connection.py", line 577, in read_response
09:29:15 worker_long.1    |     response = self._parser.read_response()
09:29:15 worker_long.1    |   File "/home/frappe/frappe-bench/env/lib/python2.7/site-packages/redis/connection.py", line 238, in read_response
09:29:15 worker_long.1    |     response = self._buffer.readline()
09:29:15 worker_long.1    |   File "/home/frappe/frappe-bench/env/lib/python2.7/site-packages/redis/connection.py", line 168, in readline
09:29:15 worker_long.1    |     self._read_from_socket()
09:29:15 worker_long.1    |   File "/home/frappe/frappe-bench/env/lib/python2.7/site-packages/redis/connection.py", line 126, in _read_from_socket
09:29:15 worker_long.1    |     data = self._sock.recv(socket_read_size)
09:29:15 worker_long.1    |   File "/home/frappe/frappe-bench/env/lib/python2.7/site-packages/rq/worker.py", line 385, in request_stop
09:29:15 worker_long.1    |     raise StopRequested()
09:29:15 worker_long.1    | rq.worker.StopRequested
09:29:15 system           | schedule.1 stopped (rc=-15)
09:29:15 redis_cache.1    | [7716 | signal handler] (1469453355) Received SIGTERM scheduling shutdown...
09:29:15 redis_cache.1    | [7716] 25 Jul 09:29:15.682 # User requested shutdown...
09:29:15 redis_cache.1    | [7716] 25 Jul 09:29:15.682 # Redis is now ready to exit, bye bye...
09:29:15 worker_short.1   | 09:29:15 Warm shut down requested
09:29:15 worker_short.1   | Traceback (most recent call last):
09:29:15 worker_short.1   |   File "/usr/lib64/python2.7/runpy.py", line 162, in _run_module_as_main
09:29:15 worker_short.1   |     "__main__", fname, loader, pkg_name)
09:29:15 worker_short.1   |   File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code
09:29:15 worker_short.1   |     exec code in run_globals
09:29:15 worker_short.1   |   File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 79, in <module>
09:29:15 worker_short.1   |     main()
09:29:15 worker_short.1   |   File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 16, in main
09:29:15 worker_short.1   |     click.Group(commands=commands)(prog_name='bench')
09:29:15 worker_short.1   |   File "/home/frappe/frappe-bench/env/lib/python2.7/site-packages/click/core.py", line 716, in __call__
09:29:15 worker_short.1   |     return self.main(*args, **kwargs)
09:29:15 worker_short.1   |   File "/home/frappe/frappe-bench/env/lib/python2.7/site-packages/click/core.py", line 696, in main
09:29:15 worker_short.1   |     rv = self.invoke(ctx)
09:29:15 worker_short.1   |   File "/home/frappe/frappe-bench/env/lib/python2.7/site-packages/click/core.py", line 1060, in invoke
09:29:15 worker_short.1   |     return _process_result(sub_ctx.command.invoke(sub_ctx))
09:29:15 worker_short.1   |   File "/home/frappe/frappe-bench/env/lib/python2.7/site-packages/click/core.py", line 1060, in invoke
09:29:15 worker_short.1   |     return _process_result(sub_ctx.command.invoke(sub_ctx))
09:29:15 worker_short.1   |   File "/home/frappe/frappe-bench/env/lib/python2.7/site-packages/click/core.py", line 889, in invoke
09:29:15 worker_short.1   |     return ctx.invoke(self.callback, **ctx.params)
09:29:15 worker_short.1   |   File "/home/frappe/frappe-bench/env/lib/python2.7/site-packages/click/core.py", line 534, in invoke
09:29:15 worker_short.1   |     return callback(*args, **kwargs)
09:29:15 worker_short.1   |   File "/home/frappe/frappe-bench/apps/frappe/frappe/commands/scheduler.py", line 163, in start_worker
09:29:15 worker_short.1   |     start_worker(queue)
09:29:15 worker_short.1   |   File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/background_jobs.py", line 102, in start_worker
09:29:15 worker_short.1   |     Worker(queues, name=get_worker_name(queue)).work()
09:29:15 worker_short.1   |   File "/home/frappe/frappe-bench/env/lib/python2.7/site-packages/rq/worker.py", line 423, in work
09:29:15 worker_short.1   |     self.register_birth()
09:29:15 worker_short.1   |   File "/home/frappe/frappe-bench/env/lib/python2.7/site-packages/rq/worker.py", line 242, in register_birth
09:29:15 worker_short.1   |     if self.connection.exists(self.key) and \
09:29:15 worker_short.1   |   File "/home/frappe/frappe-bench/env/lib/python2.7/site-packages/redis/client.py", line 855, in exists
09:29:15 worker_short.1   |     return self.execute_command('EXISTS', name)
09:29:15 worker_short.1   |   File "/home/frappe/frappe-bench/env/lib/python2.7/site-packages/redis/client.py", line 579, in execute_command
09:29:15 worker_short.1   |     return self.parse_response(connection, command_name, **options)
09:29:15 worker_short.1   |   File "/home/frappe/frappe-bench/env/lib/python2.7/site-packages/redis/client.py", line 585, in parse_response
09:29:15 worker_short.1   |     response = connection.read_response()
09:29:15 worker_short.1   |   File "/home/frappe/frappe-bench/env/lib/python2.7/site-packages/redis/connection.py", line 577, in read_response
09:29:15 worker_short.1   |     response = self._parser.read_response()
09:29:15 worker_short.1   |   File "/home/frappe/frappe-bench/env/lib/python2.7/site-packages/redis/connection.py", line 238, in read_response
09:29:15 worker_short.1   |     response = self._buffer.readline()
09:29:15 worker_short.1   |   File "/home/frappe/frappe-bench/env/lib/python2.7/site-packages/redis/connection.py", line 168, in readline
09:29:15 worker_short.1   |     self._read_from_socket()
09:29:15 worker_short.1   |   File "/home/frappe/frappe-bench/env/lib/python2.7/site-packages/redis/connection.py", line 126, in _read_from_socket
09:29:15 worker_short.1   |     data = self._sock.recv(socket_read_size)
09:29:15 worker_short.1   |   File "/home/frappe/frappe-bench/env/lib/python2.7/site-packages/rq/worker.py", line 385, in request_stop
09:29:15 worker_short.1   |     raise StopRequested()
09:29:15 worker_short.1   | rq.worker.StopRequested
09:29:15 system           | socketio.1 stopped (rc=143)
09:29:15 redis_queue.1    | [7697 | signal handler] (1469453355) Received SIGTERM scheduling shutdown...
09:29:15 system           | redis_cache.1 stopped (rc=0)
09:29:15 redis_socketio.1 | [7698] 25 Jul 09:29:15.701 # User requested shutdown...
09:29:15 redis_socketio.1 | [7698] 25 Jul 09:29:15.701 # Redis is now ready to exit, bye bye...
09:29:15 system           | redis_socketio.1 stopped (rc=0)
09:29:15 redis_queue.1    | [7697] 25 Jul 09:29:15.756 # User requested shutdown...
09:29:15 redis_queue.1    | [7697] 25 Jul 09:29:15.756 # Redis is now ready to exit, bye bye...
09:29:15 system           | redis_queue.1 stopped (rc=0)
09:29:15 system           | watch.1 stopped (rc=-15)
09:29:15 system           | worker_short.1 stopped (rc=1)
09:29:15 system           | web.1 stopped (rc=0)
09:29:15 system           | worker_long.1 stopped (rc=1)

I’ll try disabling any existing redis server instances, regenerate the configs and try again.

Nope, that’s not it. As I discovered above, a webmin process is listening on port 11000.

$ sudo service redis-server status Redirecting to /bin/systemctl status redis-server.service ● redis-server.service Loaded: not-found (Reason: No such file or directory) Active: inactive (dead)

$ sudo netstat -anp | grep 11000 tcp 0 0 127.0.0.1:11000 0.0.0.0:* LISTEN 3796/lookup-domain- tcp 1 0 127.0.0.1:11000 127.0.0.1:38374 CLOSE_WAIT 3796/lookup-domain-

Which is a webmin process: /usr/libexec/webmin/virtual-server/lookup-domain-daemon.pl

And as posted above:

So now to look at that output and figure out why bench is choking. Maybe it got far enough to create an error log this time.

edit: nope, no error log. just what I got on stdout.

Is there a way to not use redis? MySQL does have its own query cache…

I guess I will try building the latest redis from source.

Not using redis. Not recommended.
try
bench serve

Thanks for the suggestion. Good to know. (I’ve also been reviewing the available commands via bench --help) It occurred to me that changing the port of the redis queue would require telling bench about that change, so…

in addition to editing config/redis_queue.conf to set:

port 11001

I edited sites/common_site_config.json to set:

"redis_queue": "redis://localhost:11001",

And voila! It started! With only one (non critical) error:

10:20:19 watch.1 | ParseError: Unrecognised input in /home/frappe/frappe-bench/apps/erpnext/erpnext/public/less/erpnext.less on line 135, column 14: 10:20:19 watch.1 | 134 .erpnext-icon { 10:20:19 watch.1 | 135 width: 24px;ack 10:20:19 watch.1 | 136 margin-right: 0px; 10:20:19 watch.1 |

Thanks again for your input revant_one, it encouraged me to persist to identify these issues.

So my recommendation is that Frappe/Bench/ERPNext should check for a Webmin/Virtualmin installation and if found, configure the redis queue to use a port other than 11000.

So now to figure out how to stop it, run it detached from the console for further testing, then setup for production with apache instead of nginx.

Progress! :slight_smile:

1 Like

I have it working in production behind Apache. For the sake of completeness of this record…

Summary:

  • removed the initial bench site
  • created a new one with a site name corresponding to the domain of the virtual host I intended to use
  • stopped apache
  • enabled and started nginx
  • ran sudo bench setup production frappe
  • stopped and disabled nginx
  • added configuration to apache vhost (see below)
  • added vhost user to frappe group
  • started apache

Added configuration to apache vhost (using LetsEncrypt SSL):

Alias "/assets" "/home/frappe/frappe-bench/sites/assets"
<Directory /home/frappe/frappe-bench/sites/assets>
    Options FollowSymLinks
    Require all granted
</Directory>
ProxyPreserveHost On
ProxyPass "/.well-known/" "!"
ProxyPass "/mail/" "!"
ProxyPass "/cgi-bin/" "!"
ProxyPass "/assets/" "!"
ProxyPass "/socket.io"  "http://127.0.0.1:9000/"
ProxyPass "/"  "http://127.0.0.1:8000/"
ProxyPassReverse "/socket.io"  "http://127.0.0.1:9000/"
ProxyPassReverse "/"  "http://127.0.0.1:8000/"

VM Operating system: CentOS Linux 7.2.1511
Webmin version: 1.801
Virtualmin version: 5.03
Apache version: 2.4.6

Though I have not actually logged in on it yet… :slight_smile:

3 Likes

@reidtech please create a page on Home · frappe/erpnext Wiki · GitHub

I have yet to add the protected and error directives from the nginx config to my apache config.

If I get a chance I will look at making a wiki page on this subject (ERPNext with Apache and Virtualmin/Webmin on a CentOS 7 VM). No promises though.

Is this forum pruned? Will this thread persist as long as this forum exists?

Just in case:
http://archive.is/tlxbu

But it appears archive.org is blocked:
http://web.archive.org/web/20160726153310/https://discuss.frappe.io/t/force-database-creation-in-install-script/14361

Actually it appears I do not actually have ERPNext installed, just Frappe/Bench?

I have no Setup > Settings > Show or Hide Modules…
https://frappe.github.io/erpnext/user/manual/en/setting-up/settings/module-settings.html

But frappe-bench/sites/apps.txt shows:
frappe erpnext

I must be missing something simple?

You need to install it to your site

bench --site sitename install-app erpnext

Thanks rmheta!

Thought for sure I had that step taken care of. When I run that command now I get:

Installing erpnext...
ERPNext can only be installed on a fresh site where the setup wizard is not completed
You can reinstall this site (after saving your data) using: bench --site [sitename] reinstall

So I guess I have to remove the site, recreate it and run this command?

Yup, a:

bench drop-site sitename
bench new-site sitename
bench --site sitename install-app erpnext
bench use sitename

And I’m in business. Thanks again for the help guys! :slight_smile:

Hmmm… now I have a giant “E” icon that obscures many of the icons on the desktop. I seem to recall a less/css error during my setup process, perhaps this is it?

edit:
Yup, that would be it. As noted above:

10:20:19 watch.1 | ParseError: Unrecognised input in /home/frappe/frappe-bench/apps/erpnext/erpnext/public/less/erpnext.less on line 135, column 14: 10:20:19 watch.1 | 134 .erpnext-icon { 10:20:19 watch.1 | 135 width: 24px;ack 10:20:19 watch.1 | 136 margin-right: 0px; 10:20:19 watch.1 |

frappe-bench/sites/assets/erpnext/css/erpnext.css is zero bytes.

I guess I’ll have to figure out how to translate that less file into a css file myself.

bench [--site sitename] reinstall
bench [--site sitename] install-app erpnext

can you try building it again? bench update should build it.
Or
bench build