Easy install on hosted server but stucked (nooby)

Hello, I have installed on my hosted server using easy install and followed all steps until “Start Bench”
Then I get error message “Start : Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused”
What was wrong ?

Post the full trace.

Now I have created a supervisor user and I am going to setup Production. I enter the sudo bench setup production jack (jack is supervisor) and I get error message :

jack@erpaet:~$ sudo bench setup production
Usage: bench setup production [OPTIONS] USER
Error: Missing argument “user”.
jack@erpaet:~$ sudo bench setup production jack
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 11, in
load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()
File “/home/jack/.bench/bench/cli.py”, line 40, in cli
bench_command()
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 716, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 696, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 534, in invoke
return callback(*args, **kwargs)
File “/home/jack/.bench/bench/commands/setup.py”, line 56, in setup_production
setup_production(user=user)
File “/home/jack/.bench/bench/config/production_setup.py”, line 7, in setup_production
generate_supervisor_config(bench_path=bench_path, user=user)
File “/home/jack/.bench/bench/config/supervisor.py”, line 41, in generate_supervisor_config
with open(conf_path, ‘w’) as f:
IOError: [Errno 2] No such file or directory: ‘./config/supervisor.conf’

@shreyasp Can you check

@jackhk

You need to execute the command while in frappe-bench directory. Let me know If you still face the problem.

1 Like

Thanks Shreyasp
Did it and got these messages : what to do next

jack@erpaet:~/frappe-bench$ sudo bench setup production jack
Port configuration list:
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 11, in
load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()
File “/home/jack/.bench/bench/cli.py”, line 40, in cli
bench_command()
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 716, in ca ll
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 696, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 1060, in inv oke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 1060, in inv oke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 889, in invo ke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 534, in invo ke
return callback(*args, **kwargs)
File “/home/jack/.bench/bench/commands/setup.py”, line 56, in setup_production
setup_production(user=user)
File “/home/jack/.bench/bench/config/production_setup.py”, line 17, in setup_p roduction
bench_name=bench_name, extn=supervisor_conf_extn))
File “/usr/lib/python2.7/posixpath.py”, line 70, in join
elif path == ‘’ or path.endswith(’/’):
AttributeError: ‘NoneType’ object has no attribute ‘endswith’
jack@erpaet:~/frappe-bench$ bench start
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 11, in
load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()
File “/home/jack/.bench/bench/cli.py”, line 40, in cli
bench_command()
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 716, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 696, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 1057, in invoke
Command.invoke(self, ctx)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 534, in invoke
return callback(*args, **kwargs)
File “/home/jack/.bench/bench/commands/init.py”, line 21, in bench_command
setup_logging(bench_path=bench_path)
File “/home/jack/.bench/bench/utils.py”, line 265, in setup_logging
hdlr = logging.FileHandler(log_file)
File “/usr/lib/python2.7/logging/init.py”, line 913, in init
StreamHandler.init(self, self._open())
File “/usr/lib/python2.7/logging/init.py”, line 943, in _open
stream = open(self.baseFilename, self.mode)
IOError: [Errno 13] Permission denied: ‘/home/jack/frappe-bench/logs/bench.log’
jack@erpaet:~/frappe-bench$ jack@erpaet:~/frappe-bench$ sudo bench setup production jack
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 889, in invo ke
return ctx.invoke(self.callback, **ctx.params)
-su: jack@erpaet:~/frappe-bench$: No such file or directory
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 534, in invo ke
return callback(*args, **kwargs)
jack@erpaet:~/frappe-bench$ Port configuration list:
-su: Port: command not found
jack@erpaet:~/frappe-bench$ Traceback (most recent call last):
-su: syntax error near unexpected token most' jack@erpaet:~/frappe-bench$ File "/usr/local/bin/bench", line 11, in <module> -su: syntax error near unexpected tokennewline’
jack@erpaet:~/frappe-bench$ load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()
-su: syntax error near unexpected token `‘bench’,’
jack@erpaet:~/frappe-bench$ File “/home/jack/.bench/bench/cli.py”, line 40, in cli
return self.main(*args, **kwargs)
-su: File: command not found
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 696, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 1057, in invoke
jack@erpaet:~/frappe-bench$ bench_command()

File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 716, in ca ll
-su: syntax error near unexpected token File' jack@erpaet:~/frappe-bench$ return self.main(*args, **kwargs) -su: syntax error near unexpected token(’
jack@erpaet:~/frappe-bench$ File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 696, in main
-su: File: command not found
jack@erpaet:~/frappe-bench$ rv = self.invoke(ctx)
-su: syntax error near unexpected token (' jack@erpaet:~/frappe-bench$ File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1060, in inv oke -su: File: command not found jack@erpaet:~/frappe-bench$ return _process_result(sub_ctx.command.invoke(sub_ctx)) -su: syntax error near unexpected token(’
jack@erpaet:~/frappe-bench$ File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 1060, in inv oke
-su: File: command not found
jack@erpaet:~/frappe-bench$ return _process_result(sub_ctx.command.invoke(sub_ctx))
-su: syntax error near unexpected token (' jack@erpaet:~/frappe-bench$ File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 889, in invo ke -su: File: command not found jack@erpaet:~/frappe-bench$ return ctx.invoke(self.callback, **ctx.params) -su: syntax error near unexpected token(’
jack@erpaet:~/frappe-bench$ File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 534, in invo ke
-su: File: command not found
jack@erpaet:~/frappe-bench$ return callback(*args, **kwargs)
-su: syntax error near unexpected token (' jack@erpaet:~/frappe-bench$ File "/home/jack/.bench/bench/commands/setup.py", line 56, in setup_production -su: File: command not found jack@erpaet:~/frappe-bench$ setup_production(user=user) -su: syntax error near unexpected tokenuser=user’
jack@erpaet:~/frappe-bench$ File “/home/jack/.bench/bench/config/production_setup.py”, line 17, in setup_p roduction
-su: File: command not found
jack@erpaet:~/frappe-bench$ bench_name=bench_name, extn=supervisor_conf_extn))
-su: syntax error near unexpected token )' jack@erpaet:~/frappe-bench$ File "/usr/lib/python2.7/posixpath.py", line 70, in join -su: File: command not found jack@erpaet:~/frappe-bench$ elif path == '' or path.endswith('/'): -su: syntax error near unexpected tokenelif’
jack@erpaet:~/frappe-bench$ AttributeError: ‘NoneType’ object has no attribute ‘endswith’
-su: AttributeError:: command not found
jack@erpaet:~/frappe-bench$ jack@erpaet:~/frappe-bench$ bench start
-su: jack@erpaet:~/frappe-bench$: No such file or directory
jack@erpaet:~/frappe-bench$ Traceback (most recent call last):
-su: syntax error near unexpected token most' jack@erpaet:~/frappe-bench$ File "/usr/local/bin/bench", line 11, in <module> -su: syntax error near unexpected tokennewline’
jack@erpaet:~/frappe-bench$ load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()
-su: syntax error near unexpected token 'bench',' jack@erpaet:~/frappe-bench$ File "/home/jack/.bench/bench/cli.py", line 40, in cli -su: File: command not found jack@erpaet:~/frappe-bench$ bench_command() File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 716, in __call__ -su: syntax error near unexpected tokenFile’
jack@erpaet:~/frappe-bench$ return self.main(*args, **kwargs)
-su: syntax error near unexpected token (' jack@erpaet:~/frappe-bench$ File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 696, in main -su: File: command not found jack@erpaet:~/frappe-bench$ rv = self.invoke(ctx) -su: syntax error near unexpected token(’
jack@erpaet:~/frappe-bench$ File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 1057, in invoke
-su: File: command not found
jack@erpaet:~/frappe-bench$ Command.invoke(self, ctx)
-su: syntax error near unexpected token self,' jack@erpaet:~/frappe-bench$ File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 889, in invoke -su: File: command not found jack@erpaet:~/frappe-bench$ return ctx.invoke(self.callback, **ctx.params) -su: syntax error near unexpected token(’
jack@erpaet:~/frappe-bench$ File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 534, in invoke
-su: File: command not found
jack@erpaet:~/frappe-bench$ return callback(*args, **kwargs)
-su: syntax error near unexpected token (' jack@erpaet:~/frappe-bench$ File "/home/jack/.bench/bench/commands/__init__.py", line 21, in bench_command -su: File: command not found jack@erpaet:~/frappe-bench$ setup_logging(bench_path=bench_path) -su: syntax error near unexpected tokenbench_path=bench_path’
jack@erpaet:~/frappe-bench$ File “/home/jack/.bench/bench/utils.py”, line 265, in setup_logging
-su: File: command not found
jack@erpaet:~/frappe-bench$ hdlr = logging.FileHandler(log_file)
-su: syntax error near unexpected token (' jack@erpaet:~/frappe-bench$ File "/usr/lib/python2.7/logging/__init__.py", line 913, in __init__ -su: File: command not found jack@erpaet:~/frappe-bench$ StreamHandler.__init__(self, self._open()) -su: syntax error near unexpected tokenself,’
jack@erpaet:~/frappe-bench$ File “/usr/lib/python2.7/logging/init.py”, line 943, in _open
-su: File: command not found
jack@erpaet:~/frappe-bench$ stream = open(self.baseFilename, self.mode)
-su: syntax error near unexpected token `(’
jack@erpaet:~/frappe-bench$ IOError: [Errno 13] Permission denied: ‘/home/jack/frappe-bench/logs/bench.log’
-su: IOError:: command not found
jack@erpaet:~/frappe-bench$ jack@erpaet:~/frappe-bench$
-su: jack@erpaet:~/frappe-bench$: No such file or directory
jack@erpaet:~/frappe-bench$

@jackhk

I think you have dns_multitenant turned off. Please follow the guide to enable DNS multitenant for your server. Setup DNS Multi-tenant

and then execute sudo bench setup production jack

Hope this helps to solve your problem