Creating second site and running

hi,

i am trying to run erpnext in my linux for evaluvation, i installed erpnext as deveopnet instance, it runs with 8000 port.

i have configured the site too.
now i need one more site, so i created new site to run at 88 port.
but i could not browse the site at 88 port.
pls help me, i dont know whether i am doing it correctly.

pls find my commands to create the second site.

1.bench new-site site2
2.bench set-nginx-port site2 88

i even tried
3. bench setup nginx
4. sudo service nginx reload
5.supervisorctl start

as directed in the help page.

pls help

regards,
-SK

In dev mode, setting up multitenant is a bit involved process

bench use {sitename}

will select the site you want to run as default

If you want both to run at the same time, run bench --site {sitename} serve --port 8005 in another terminal.

hi,

when i run the command i get this error. pls help

[root@localhost ~]# bench --site ctrlrl serve --port 82

  • Running on http://0.0.0.0:82/ (Press CTRL+C to quit)
    Traceback (most recent call last):
    File “/usr/lib64/python2.7/runpy.py”, line 162, in _run_module_as_main
    main”, fname, loader, pkg_name)
    File “/usr/lib64/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”, lin e 77, in
    main()
    File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, lin e 14, in main
    click.Group(commands=commands)(prog_name=‘bench’)
    File “/home/frappe/frappe-bench/env/lib/python2.7/site-packages/click/core.py” , line 664, in call
    return self.main(*args, **kwargs)
    File “/home/frappe/frappe-bench/env/lib/python2.7/site-packages/click/core.py” , line 644, in main
    rv = self.invoke(ctx)
    File “/home/frappe/frappe-bench/env/lib/python2.7/site-packages/click/core.py” , line 991, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
    File “/home/frappe/frappe-bench/env/lib/python2.7/site-packages/click/core.py” , line 991, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
    File “/home/frappe/frappe-bench/env/lib/python2.7/site-packages/click/core.py” , line 837, in invoke
    return ctx.invoke(self.callback, **ctx.params)
    File “/home/frappe/frappe-bench/env/lib/python2.7/site-packages/click/core.py” , line 464, in invoke
    return callback(*args, **kwargs)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/commands.py”, line 28, in _ func
    ret = f(frappe._dict(ctx.obj), *args, **kwargs)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/commands.py”, line 654, in serve
    frappe.app.serve(port=port, profile=profile, site=site, sites_path=’.’)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/app.py”, line 158, in serve
    use_debugger=True, use_evalex=True, threaded=True)
    File “/home/frappe/frappe-bench/env/lib/python2.7/site-packages/werkzeug/servi ng.py”, line 618, in run_simple
    test_socket.bind((hostname, port))
    File “/usr/lib64/python2.7/socket.py”, line 224, in meth
    return getattr(self._sock,name)(*args)
    socket.error: [Errno 13] Permission denied

hi any update, i am stuck with it

You cannot bind to a port <82, Use 8080 for example

If you are not planning to develop

sudo bench setup production {your_username}

should setup nginx and use the respective ports.

PS: After you setup production, you need not bench serve / bench start

i could not solve this problem…
How to rectify this problem?

Traceback (innermost last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/app.py”, line 57, in application
response = frappe.handler.handle()
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 19, in handle
execute_cmd(cmd)
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 36, in execute_cmd
ret = frappe.call(method, **frappe.form_dict)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 806, in call
return fn(*args, **newargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/desk/page/setup_wizard/setup_wizard.py”, line 27, in setup_complete
update_user_name(args)
File “/home/frappe/frappe-bench/apps/frappe/frappe/desk/page/setup_wizard/setup_wizard.py”, line 80, in update_user_name
doc.insert()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 193, in insert
self.run_before_save_methods()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 617, in run_before_save_methods
self.run_method(“validate”)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 579, in run_method
return Document.hook(fn)(self, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 735, in composer
return composed(self, method, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 718, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 573, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/user/user.py”, line 48, in validate
self.remove_disabled_roles()
File “/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/user/user.py”, line 303, in remove_disabled_roles
disabled_roles = [d.name for d in frappe.get_all(“Role”, filters={“disabled”:1})]
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 960, in get_all
return get_list(doctype, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 933, in get_list
return frappe.model.db_query.DatabaseQuery(doctype).execute(None, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/db_query.py”, line 66, in execute
result = self.build_and_run()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/db_query.py”, line 83, in build_and_run
return frappe.db.sql(query, as_dict=not self.as_list, debug=self.debug)
File “/home/frappe/frappe-bench/apps/frappe/frappe/database.py”, line 147, in sql
self._cursor.execute(query)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/cursors.py”, line 205, in execute
self.errorhandler(self, exc, value)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/connections.py”, line 36, in defaulterrorhandler
raise errorclass, errorvalue
OperationalError: (1054, “Unknown column ‘tabRole.disabled’ in ‘where clause’”)

Please help me sir…