Bench to support multiple repositories

Hi Everyone,

How can I setup multiple Git repositories (my local and remote) on single Bench, Actually I want to switch between the repositories.

Thanks

Can you elaborate? I’m not sure what you want to do. Do you want to use two different codebases on the same system?

In that case you can create a new bench altogether. Run bench init [bench-name] in your home directory, and that will work as a separate bench. Ref to : Multi Bench Setup · frappe/bench Wiki · GitHub

Thanks @vjFaLk … I wanted the same.

But please do confirm that the bench name can be any random name, Or it should reflect the repository name or something like that.

No, it doesn’t matter what the name is. Name it according to your needs.

Thanks again, Appreciate the quick response. :slight_smile:

How does it work on a production setup on the server with the configuration of the workers, supervisors, nginx and so far?

I have also the requirement to setup multiple benches on one server for dev, test and prod.

Thanks in advance.

Hi everyone,

Help required for using different code bases on the same system.
Using the reference : Multi Bench Setup · frappe/bench Wiki · GitHub
I have created two different bench frappe-bench1 and frappe-bench2 using
bench init frappe-bench1
bench init frappe-bench2
Is it possible to run all the sites i.e site1.local and site2.local under frappe-bench1 and (site3.local and site4.local under frappe-bench2) simultaneously?
If possible please elaborate the steps in detail.

Regards,
Koshish

Yes you can! You just need to have a DNS multitenant setup and you should be able to access all the sites. Then the nginx configs will take care of everything else.

Thanks for your prompt reply @vjFaLk :slight_smile:

Could you explain the steps in details about DNS multitanent setup and nginx configs.?

Regards
Koshish

Actually this depends on what kind of setup you have right now. Do you want to have this setup on a Production or Development environment? Do you currently use bench start to start your server and that’s what you want to do later as well?

Currently i use bench start .
I am trying to resolve issue in my localhost (Ubuntu 16.04)

After success in my local host I am planning to deploy in production as well.

dell@koshish:~/frappe$ ls
bench-repo frappe-bench frappe-bench-gbt

I want to run all the sites of frappe-bench and frappe-bench-gbt simultaneously in my local environment.

Any suggestions?

Okay, so on the development environment, you just need to run bench config dns_multitenant on on both the benches, and then running bench start in both folders consecutively should work. Only that you won’t be able to access both from the same port though, you can check the Procfile file inside both benches to see which port you can access the sites on. It will be in the line bench serve --port 800x

Along with that you will have to remove currentsite.txt if it exists in your sites folder for both the benches, and add entries for your sites in the /etc/hosts file on the PC (Google this if you don’t know what that means) you’re accessing this from, that’s how you will be accessing the sites.

You may face an issue where the second bench start would not start, in that case you might have to modify the port in the redis_queue.conf file inside the config folder inside that bench, along with the common_site_config file inside the sites and change the port for redis_queue to something else.

On a Production setup you will only need to run bench config dns_multitenant on in both benches and run bench setup nginx inside the bench folders after you add your sites in both benches. Assuming your sites have a proper domain instead of site1.local or whatever, you won’t have to do the /etc/hosts thing either.

1 Like

I performed the following tasks as per your suggestions
1)bench config gns_multitenant on (on both benches frappe-bench-gbt and frappe-bench-llc)
2)Port changed in both bench
→ Procfile for frappe-bench-gbt
web: bench serve --port 8000
2)Procfile for frappe-bench-llc
web: bench serve --port 8001

Sites inside frappe-bench-gbt   --> site6.local
Sites inside frappe-bench-llc    --> site7.local
dell@koshish:~/frappe/frappe-bench$ cat /etc/hosts
127.0.0.1    localhost
127.0.1.1    dell-Inspiron
127.0.0.1:8000  localhost:8000/site6.local
127.0.0.1:8001  localhost:8001/site7.local

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

Issues:
1) While running for the (dell@koshish:~/frappe/frappe-bench-llc$ bench start)
localhost:8001 (in browser) gives following error

Not Found

./localhost/site_config.json does not exist


this is the error output of terminal

dell@koshish:~/frappe/frappe-bench-llc$ bench start
13:40:52 system               | worker.1 started (pid=13208)
13:40:52 system               | workerbeat.1 started (pid=13207)
13:40:52 system               | redis_cache.1 started (pid=13215)
13:40:52 redis_cache.1        | 13216:M 08 Aug 13:40:52.941 * Increased maximum number of open files to 10032 (it was originally set to 1024).
13:40:52 redis_cache.1        |                 _._                                                  
13:40:52 redis_cache.1        |            _.-``__ ''-._                                             
13:40:52 redis_cache.1        |       _.-``    `.  `_.  ''-._           Redis 3.0.6 (00000000/0) 64 bit
13:40:52 redis_cache.1        |   .-`` .-```.  ```\/    _.,_ ''-._                                   
13:40:52 redis_cache.1        |  (    '      ,       .-`  | `,    )     Running in standalone mode
13:40:52 redis_cache.1        |  |`-._`-...-` __...-.``-._|'` _.-'|     Port: 11311
13:40:52 redis_cache.1        |  |    `-._   `._    /     _.-'    |     PID: 13216
13:40:52 redis_cache.1        |   `-._    `-._  `-./  _.-'    _.-'                                   
13:40:52 redis_cache.1        |  |`-._`-._    `-.__.-'    _.-'_.-'|                                  
13:40:52 redis_cache.1        |  |    `-._`-._        _.-'_.-'    |           http://redis.io        
13:40:52 redis_cache.1        |   `-._    `-._`-.__.-'_.-'    _.-'                                   
13:40:52 redis_cache.1        |  |`-._`-._    `-.__.-'    _.-'_.-'|                                  
13:40:52 redis_cache.1        |  |    `-._`-._        _.-'_.-'    |                                  
13:40:52 redis_cache.1        |   `-._    `-._`-.__.-'_.-'    _.-'                                   
13:40:52 redis_cache.1        |       `-._    `-.__.-'    _.-'                                       
13:40:52 redis_cache.1        |           `-._        _.-'                                           
13:40:52 redis_cache.1        |               `-.__.-'                                               
13:40:52 redis_cache.1        | 
13:40:52 redis_cache.1        | 13216:M 08 Aug 13:40:52.942 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
13:40:52 redis_cache.1        | 13216:M 08 Aug 13:40:52.942 # Server started, Redis version 3.0.6
13:40:52 redis_cache.1        | 13216:M 08 Aug 13:40:52.942 # 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.
13:40:52 redis_cache.1        | 13216:M 08 Aug 13:40:52.942 # 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.
13:40:52 redis_cache.1        | 13216:M 08 Aug 13:40:52.942 * The server is now ready to accept connections on port 11311
13:40:52 system               | web.1 started (pid=13209)
13:40:52 system               | socketio.1 started (pid=13219)
13:40:52 system               | redis_async_broker.1 started (pid=13222)
13:40:52 redis_async_broker.1 | 13223:M 08 Aug 13:40:52.951 * Increased maximum number of open files to 10032 (it was originally set to 1024).
13:40:52 redis_async_broker.1 |                 _._                                                  
13:40:52 redis_async_broker.1 |            _.-``__ ''-._                                             
13:40:52 redis_async_broker.1 |       _.-``    `.  `_.  ''-._           Redis 3.0.6 (00000000/0) 64 bit
13:40:52 redis_async_broker.1 |   .-`` .-```.  ```\/    _.,_ ''-._                                   
13:40:52 redis_async_broker.1 |  (    '      ,       .-`  | `,    )     Running in standalone mode
13:40:52 redis_async_broker.1 |  |`-._`-...-` __...-.``-._|'` _.-'|     Port: 12311
13:40:52 redis_async_broker.1 |  |    `-._   `._    /     _.-'    |     PID: 13223
13:40:52 redis_async_broker.1 |   `-._    `-._  `-./  _.-'    _.-'                                   
13:40:52 redis_async_broker.1 |  |`-._`-._    `-.__.-'    _.-'_.-'|                                  
13:40:52 redis_async_broker.1 |  |    `-._`-._        _.-'_.-'    |           http://redis.io        
13:40:52 redis_async_broker.1 |   `-._    `-._`-.__.-'_.-'    _.-'                                   
13:40:52 redis_async_broker.1 |  |`-._`-._    `-.__.-'    _.-'_.-'|                                  
13:40:52 redis_async_broker.1 |  |    `-._`-._        _.-'_.-'    |                                  
13:40:52 redis_async_broker.1 |   `-._    `-._`-.__.-'_.-'    _.-'                                   
13:40:52 redis_async_broker.1 |       `-._    `-.__.-'    _.-'                                       
13:40:52 redis_async_broker.1 |           `-._        _.-'                                           
13:40:52 redis_async_broker.1 |               `-.__.-'                                               
13:40:52 redis_async_broker.1 | 
13:40:52 redis_async_broker.1 | 13223:M 08 Aug 13:40:52.952 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
13:40:52 redis_async_broker.1 | 13223:M 08 Aug 13:40:52.952 # Server started, Redis version 3.0.6
13:40:52 redis_async_broker.1 | 13223:M 08 Aug 13:40:52.952 # 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.
13:40:52 redis_async_broker.1 | 13223:M 08 Aug 13:40:52.952 # 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.
13:40:52 redis_async_broker.1 | 13223:M 08 Aug 13:40:52.952 * The server is now ready to accept connections on port 12311
13:40:53 socketio.1           | listening on *: 3000
13:40:53 workerbeat.1         | celery beat v3.1.23 (Cipater) is starting.
13:40:53 workerbeat.1         | __    -    ... __   -        _
13:40:53 workerbeat.1         | Configuration ->
13:40:53 workerbeat.1         |     . broker -> redis://localhost:6379//
13:40:53 workerbeat.1         |     . loader -> celery.loaders.app.AppLoader
13:40:53 workerbeat.1         |     . scheduler -> celery.beat.PersistentScheduler
13:40:53 workerbeat.1         |     . db -> scheduler.schedule
13:40:53 workerbeat.1         |     . logfile -> [stderr]@%INFO
13:40:53 workerbeat.1         |     . maxinterval -> now (0s)
13:40:53 workerbeat.1         | [2016-08-08 13:40:53,684: INFO/MainProcess] beat: Starting...
13:40:53 worker.1             |  
13:40:53 worker.1             |  -------------- celery@hercules v3.1.23 (Cipater)
13:40:53 worker.1             | ---- **** ----- 
13:40:53 worker.1             | --- * ***  * -- Linux-4.4.0-31-generic-x86_64-with-Ubuntu-16.04-xenial
13:40:53 worker.1             | -- * - **** --- 
13:40:53 worker.1             | - ** ---------- [config]
13:40:53 worker.1             | - ** ---------- .> app:         frappe:0x7fb9e77de190
13:40:53 worker.1             | - ** ---------- .> transport:   redis://localhost:6379//
13:40:53 worker.1             | - ** ---------- .> results:     redis://localhost/
13:40:53 worker.1             | - *** --- * --- .> concurrency: 4 (prefork)
13:40:53 worker.1             | -- ******* ---- 
13:40:53 worker.1             | --- ***** ----- [queues]
13:40:53 worker.1             |  -------------- .> celery           exchange=celery(direct) key=celery
13:40:53 worker.1             |                 
13:40:53 worker.1             | 
13:40:53 workerbeat.1         | [2016-08-08 13:40:53,724: INFO/MainProcess] Scheduler: Sending due task sync_queues (frappe.tasks.sync_queues)
13:40:53 workerbeat.1         | [2016-08-08 13:40:53,739: INFO/MainProcess] Scheduler: Sending due task scheduler (frappe.tasks.enqueue_scheduler_events)
13:40:53 web.1                |  * Running on http://0.0.0.0:8001/ (Press CTRL+C to quit)
13:40:53 web.1                |  * Restarting with inotify reloader
13:40:54 web.1                |  * Debugger is active!
13:40:54 web.1                |  * Debugger pin code: 286-509-739
13:40:54 worker.1             | [2016-08-08 13:40:54,826: WARNING/MainProcess] celery@hercules ready.
13:41:11 web.1                | 
13:41:11 web.1                | 2016-08-08 13:41:11,548 Request Error 
13:41:11 web.1                |  site: localhost
13:41:11 web.1                |  form: None
13:41:11 web.1                | 
13:41:11 web.1                | Traceback (innermost last):
13:41:11 web.1                |   File "/home/dell/frappe/frappe-bench-llc/apps/frappe/frappe/app.py", line 54, in application
13:41:11 web.1                |     init_request(request)
13:41:11 web.1                |   File "/home/dell/frappe/frappe-bench-llc/apps/frappe/frappe/app.py", line 104, in init_request
13:41:11 web.1                |     frappe.init(site=site, sites_path=_sites_path)
13:41:11 web.1                |   File "/home/dell/frappe/frappe-bench-llc/apps/frappe/frappe/__init__.py", line 128, in init
13:41:11 web.1                |     local.conf = _dict(get_site_config())
13:41:11 web.1                |   File "/home/dell/frappe/frappe-bench-llc/apps/frappe/frappe/__init__.py", line 182, in get_site_config
13:41:11 web.1                |     raise IncorrectSitePath, "{0} does not exist".format(site_config)
13:41:11 web.1                |  IncorrectSitePath: 404: Not Found
13:41:11 web.1                | 
13:41:11 web.1                | --------------
13:41:11 web.1                | 127.0.0.1 - - [08/Aug/2016 13:41:11] "GET / HTTP/1.1" 404 -
^C13:42:36 system               | SIGINT received
13:42:36 system               | sending SIGTERM to workerbeat.1 (pid 13207)
13:42:36 system               | sending SIGTERM to worker.1 (pid 13208)
13:42:36 system               | sending SIGTERM to web.1 (pid 13209)
13:42:36 system               | sending SIGTERM to socketio.1 (pid 13219)
13:42:36 system               | sending SIGTERM to redis_async_broker.1 (pid 13222)
13:42:36 system               | sending SIGTERM to redis_cache.1 (pid 13215)
13:42:36 worker.1             | 

Am I missing something?

You just need to add entries like:

127.0.0.1 site1.local
127.0.0.1 site2.local
127.0.0.1 site3.local
127.0.0.1 site4.local

No need for adding ports in the /etc/hosts, and access the sites by actually putting in "sitex.local` in the browser’s URL bar.

Good Morning @vjFaLk

Still Page is not loading

contents in etc/hosts file

127.0.0.1       localhost
127.0.1.1       dell-Inspiron
127.0.0.1       site6.local
127.0.0.1       site7.local

site7.local is inside frappe-bench-llc. Procfile content (web: bench serve --port 8001)

But after bench start

When i put site7.local in browser’s URL it display

502 Bad Gateway

nginx/1.10.0 (Ubuntu)

And following is the terminal log

:~/frappe/frappe-bench-llc$ bench start
09:33:41 system               | workerbeat.1 started (pid=27803)
09:33:41 system               | worker.1 started (pid=27804)
09:33:41 system               | redis_async_broker.1 started (pid=27806)
09:33:41 redis_async_broker.1 | 27812:M 09 Aug 09:33:41.695 * Increased maximum number of open files to 10032 (it was originally set to 1024).
09:33:41 redis_async_broker.1 |                 _._                                                  
09:33:41 redis_async_broker.1 |            _.-``__ ''-._                                             
09:33:41 redis_async_broker.1 |       _.-``    `.  `_.  ''-._           Redis 3.0.6 (00000000/0) 64 bit
09:33:41 redis_async_broker.1 |   .-`` .-```.  ```\/    _.,_ ''-._                                   
09:33:41 redis_async_broker.1 |  (    '      ,       .-`  | `,    )     Running in standalone mode
09:33:41 redis_async_broker.1 |  |`-._`-...-` __...-.``-._|'` _.-'|     Port: 12311
09:33:41 redis_async_broker.1 |  |    `-._   `._    /     _.-'    |     PID: 27812
09:33:41 redis_async_broker.1 |   `-._    `-._  `-./  _.-'    _.-'                                   
09:33:41 redis_async_broker.1 |  |`-._`-._    `-.__.-'    _.-'_.-'|                                  
09:33:41 redis_async_broker.1 |  |    `-._`-._        _.-'_.-'    |           http://redis.io        
09:33:41 redis_async_broker.1 |   `-._    `-._`-.__.-'_.-'    _.-'                                   
09:33:41 redis_async_broker.1 |  |`-._`-._    `-.__.-'    _.-'_.-'|                                  
09:33:41 redis_async_broker.1 |  |    `-._`-._        _.-'_.-'    |                                  
09:33:41 redis_async_broker.1 |   `-._    `-._`-.__.-'_.-'    _.-'                                   
09:33:41 redis_async_broker.1 |       `-._    `-.__.-'    _.-'                                       
09:33:41 redis_async_broker.1 |           `-._        _.-'                                           
09:33:41 redis_async_broker.1 |               `-.__.-'                                               
09:33:41 redis_async_broker.1 | 
09:33:41 redis_async_broker.1 | 27812:M 09 Aug 09:33:41.696 # 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:33:41 redis_async_broker.1 | 27812:M 09 Aug 09:33:41.696 # Server started, Redis version 3.0.6
09:33:41 redis_async_broker.1 | 27812:M 09 Aug 09:33:41.696 # 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:33:41 redis_async_broker.1 | 27812:M 09 Aug 09:33:41.696 # 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:33:41 redis_async_broker.1 | 27812:M 09 Aug 09:33:41.696 * The server is now ready to accept connections on port 12311
09:33:41 system               | socketio.1 started (pid=27805)
09:33:41 system               | redis_cache.1 started (pid=27823)
09:33:41 redis_cache.1        | 27824:M 09 Aug 09:33:41.706 * Increased maximum number of open files to 10032 (it was originally set to 1024).
09:33:41 redis_cache.1        |                 _._                                                  
09:33:41 redis_cache.1        |            _.-``__ ''-._                                             
09:33:41 redis_cache.1        |       _.-``    `.  `_.  ''-._           Redis 3.0.6 (00000000/0) 64 bit
09:33:41 redis_cache.1        |   .-`` .-```.  ```\/    _.,_ ''-._                                   
09:33:41 redis_cache.1        |  (    '      ,       .-`  | `,    )     Running in standalone mode
09:33:41 redis_cache.1        |  |`-._`-...-` __...-.``-._|'` _.-'|     Port: 11311
09:33:41 redis_cache.1        |  |    `-._   `._    /     _.-'    |     PID: 27824
09:33:41 redis_cache.1        |   `-._    `-._  `-./  _.-'    _.-'                                   
09:33:41 redis_cache.1        |  |`-._`-._    `-.__.-'    _.-'_.-'|                                  
09:33:41 redis_cache.1        |  |    `-._`-._        _.-'_.-'    |           http://redis.io        
09:33:41 redis_cache.1        |   `-._    `-._`-.__.-'_.-'    _.-'                                   
09:33:41 redis_cache.1        |  |`-._`-._    `-.__.-'    _.-'_.-'|                                  
09:33:41 redis_cache.1        |  |    `-._`-._        _.-'_.-'    |                                  
09:33:41 redis_cache.1        |   `-._    `-._`-.__.-'_.-'    _.-'                                   
09:33:41 redis_cache.1        |       `-._    `-.__.-'    _.-'                                       
09:33:41 redis_cache.1        |           `-._        _.-'                                           
09:33:41 redis_cache.1        |               `-.__.-'                                               
09:33:41 redis_cache.1        | 
09:33:41 redis_cache.1        | 27824:M 09 Aug 09:33:41.706 # 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:33:41 redis_cache.1        | 27824:M 09 Aug 09:33:41.706 # Server started, Redis version 3.0.6
09:33:41 redis_cache.1        | 27824:M 09 Aug 09:33:41.706 # 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:33:41 redis_cache.1        | 27824:M 09 Aug 09:33:41.706 # 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:33:41 redis_cache.1        | 27824:M 09 Aug 09:33:41.706 * The server is now ready to accept connections on port 11311
09:33:41 system               | web.1 started (pid=27810)
09:33:42 socketio.1           | listening on *: 3000
09:33:42 workerbeat.1         | celery beat v3.1.23 (Cipater) is starting.
09:33:42 worker.1             |  
09:33:42 worker.1             |  -------------- celery@hercules v3.1.23 (Cipater)
09:33:42 worker.1             | ---- **** ----- 
09:33:42 worker.1             | --- * ***  * -- Linux-4.4.0-31-generic-x86_64-with-Ubuntu-16.04-xenial
09:33:42 worker.1             | -- * - **** --- 
09:33:42 worker.1             | - ** ---------- [config]
09:33:42 worker.1             | - ** ---------- .> app:         frappe:0x7fc77dd12190
09:33:42 worker.1             | - ** ---------- .> transport:   redis://localhost:6379//
09:33:42 worker.1             | - ** ---------- .> results:     redis://localhost/
09:33:42 worker.1             | - *** --- * --- .> concurrency: 4 (prefork)
09:33:42 worker.1             | -- ******* ---- 
09:33:42 worker.1             | --- ***** ----- [queues]
09:33:42 worker.1             |  -------------- .> celery           exchange=celery(direct) key=celery
09:33:42 worker.1             |                 
09:33:42 worker.1             | 
09:33:42 workerbeat.1         | __    -    ... __   -        _
09:33:42 workerbeat.1         | Configuration ->
09:33:42 workerbeat.1         |     . broker -> redis://localhost:6379//
09:33:42 workerbeat.1         |     . loader -> celery.loaders.app.AppLoader
09:33:42 workerbeat.1         |     . scheduler -> celery.beat.PersistentScheduler
09:33:42 workerbeat.1         |     . db -> scheduler.schedule
09:33:42 workerbeat.1         |     . logfile -> [stderr]@%INFO
09:33:42 workerbeat.1         |     . maxinterval -> now (0s)
09:33:42 workerbeat.1         | [2016-08-09 09:33:42,549: INFO/MainProcess] beat: Starting...
09:33:42 web.1                |  * Running on http://0.0.0.0:8001/ (Press CTRL+C to quit)
09:33:42 web.1                |  * Restarting with inotify reloader
09:33:42 web.1                |  * Debugger is active!
09:33:42 web.1                |  * Debugger pin code: 286-509-739
09:33:43 worker.1             | [2016-08-09 09:33:43,592: WARNING/MainProcess] celery@hercules ready.
09:33:46 socketio.1           | { [Error: connect ECONNREFUSED 127.0.0.1:8000]
09:33:46 socketio.1           |   code: 'ECONNREFUSED',
09:33:46 socketio.1           |   errno: 'ECONNREFUSED',
09:33:46 socketio.1           |   syscall: 'connect',
09:33:46 socketio.1           |   address: '127.0.0.1',
09:33:46 socketio.1           |   port: 8000,
09:33:46 socketio.1           |   response: undefined }
09:33:51 socketio.1           | No response for doc_subscribe
09:33:55 workerbeat.1         | [2016-08-09 09:33:55,148: INFO/MainProcess] Scheduler: Sending due task sync_queues (frappe.tasks.sync_queues)
09:33:55 workerbeat.1         | [2016-08-09 09:33:55,152: INFO/MainProcess] Scheduler: Sending due task scheduler (frappe.tasks.enqueue_scheduler_events)

What might be the issue?

Are you accessing it from the 8000 port?

frappe-bench-llc procfile has (web: bench serve --port 8001)

And nginx service failed to restart

dell@hercules:~/frappe/frappe-bench-llc$ bench setup nginx
dell@hercules:~/frappe/frappe-bench-llc$ service nginx restart
Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details.
dell@hercules:~/frappe/frappe-bench-llc$ systemctl status nginx.service
â—Ź nginx.service - A high performance web server and a reverse proxy server
   Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Tue 2016-08-09 09:42:11 GST; 18s ago
  Process: 27986 ExecStop=/sbin/start-stop-daemon --quiet --stop --retry QUIT/5 --pidfile /run/nginx.pid (code=exited, status=0/SUCCESS)
  Process: 24610 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
  Process: 27989 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)
 Main PID: 24614 (code=exited, status=0/SUCCESS)

Aug 09 09:42:11 hercules systemd[1]: Starting A high performance web server and a reverse proxy server...
Aug 09 09:42:11 hercules nginx[27989]: nginx: [emerg] "server_names_hash_bucket_size" directive is duplicate in /etc/nginx/conf.d/frappe-bench.conf:2
Aug 09 09:42:11 hercules nginx[27989]: nginx: configuration file /etc/nginx/nginx.conf test failed
Aug 09 09:42:11 hercules systemd[1]: nginx.service: Control process exited, code=exited status=1
Aug 09 09:42:11 hercules systemd[1]: Failed to start A high performance web server and a reverse proxy server.
Aug 09 09:42:11 hercules systemd[1]: nginx.service: Unit entered failed state.
Aug 09 09:42:11 hercules systemd[1]: nginx.service: Failed with result 'exit-code'.
dell@hercules:~/frappe/frappe-bench-llc$ journalctl -xe
Aug 09 09:42:11 hercules systemd[1]: Starting A high performance web server and a reverse proxy server...
-- Subject: Unit nginx.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit nginx.service has begun starting up.
Aug 09 09:42:11 hercules nginx[27989]: nginx: [emerg] "server_names_hash_bucket_size" directive is duplicate in /etc/nginx/conf.d/frappe-bench.conf:2
Aug 09 09:42:11 hercules nginx[27989]: nginx: configuration file /etc/nginx/nginx.conf test failed
Aug 09 09:42:11 hercules systemd[1]: nginx.service: Control process exited, code=exited status=1
Aug 09 09:42:11 hercules systemd[1]: Failed to start A high performance web server and a reverse proxy server.
-- Subject: Unit nginx.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit nginx.service has failed.
-- 
-- The result is failed.
Aug 09 09:42:11 hercules systemd[1]: nginx.service: Unit entered failed state.
Aug 09 09:42:11 hercules systemd[1]: nginx.service: Failed with result 'exit-code'.
Aug 09 09:42:11 hercules polkitd(authority=local)[1032]: Unregistered Authentication Agent for unix-process:27970:8824132 (system bus name :1.277, object path /or
Aug 09 09:42:11 hercules gnome-session[2098]: (vino-server:2295): GLib-CRITICAL **: the GVariant format string '(u)' has a type of '(u)' but the given value has a
Aug 09 09:42:11 hercules gnome-session[2098]: (vino-server:2295): GLib-CRITICAL **: g_variant_get: assertion 'valid_format_string (format_string, TRUE, value)' fa
Aug 09 09:42:13 hercules gnome-session[2098]: (vino-server:2295): GLib-CRITICAL **: the GVariant format string '(u)' has a type of '(u)' but the given value has a
Aug 09 09:42:13 hercules gnome-session[2098]: (vino-server:2295): GLib-CRITICAL **: g_variant_get: assertion 'valid_format_string (format_string, TRUE, value)' fa
lines 1093-1116/1116 (END)

If you’re running your server using bench start you have to access via site7.local:8001 or 8000 depending on your Procfile. It doesn’t use nginx.

Thanks for your Support. :smiley:
Now first bench is running perfectly(site7.local inside frappe-bench-gbt).However as you mentioned earlier second bench start (for site6.local inside frappe-bench-llc) didn’t start

You may face an issue where the second bench start would not start, in that case you might have to modify the port in the redis_queue.conf
file inside the config folder inside that bench, along with the
common_site_config file inside the sites and change the port for redis_queue to something else.

I donot have any file named redis_queue.conf .
dell@hercules:~/frappe/frappe-bench-llc/config$ ls
nginx.conf pids redis_async_broker.conf redis_cache.conf supervisor.conf