I am installing odoo8 on amazon EC2 web server . I installed ubuntu 14.04 on it and after that Odoo8 where executing all the steps it gives Internal Server Error for the Database Connection.
The error is,
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/werkzeug/serving.py", line 177, in run_wsgi
execute(self.server.app)
File "/usr/lib/python2.7/dist-packages/werkzeug/serving.py", line 165, in execute
application_iter = app(environ, start_response)
File "/home/ubuntu/odoo/openerp/service/server.py", line 290, in app
return self.app(e, s)
File "/home/ubuntu/odoo/openerp/service/wsgi_server.py", line 216, in application
return application_unproxied(environ, start_response)
File "/home/ubuntu/odoo/openerp/service/wsgi_server.py", line 202, in application_unproxied
result = handler(environ, start_response)
File "/home/ubuntu/odoo/openerp/http.py", line 1290, in __call__
return self.dispatch(environ, start_response)
File "/home/ubuntu/odoo/openerp/http.py", line 1264, in __call__
return self.app(environ, start_wrapped)
File "/usr/lib/python2.7/dist-packages/werkzeug/wsgi.py", line 579, in __call__
return self.app(environ, start_response)
File "/home/ubuntu/odoo/openerp/http.py", line 1406, in dispatch
self.setup_db(httprequest)
File "/home/ubuntu/odoo/openerp/http.py", line 1348, in setup_db
httprequest.session.db = db_monodb(httprequest)
File "/home/ubuntu/odoo/openerp/http.py", line 1478, in db_monodb
dbs = db_list(True, httprequest)
File "/home/ubuntu/odoo/openerp/http.py", line 1452, in db_list
dbs = dispatch_rpc("db", "list", [force])
File "/home/ubuntu/odoo/openerp/http.py", line 115, in dispatch_rpc
result = dispatch(method, params)
File "/home/ubuntu/odoo/openerp/service/db.py", line 73, in dispatch
return fn(*params)
File "/home/ubuntu/odoo/openerp/service/db.py", line 313, in exp_list
with closing(db.cursor()) as cr:
File "/home/ubuntu/odoo/openerp/sql_db.py", line 575, in cursor
return Cursor(self.__pool, self.dbname, self.dsn, serialized=serialized)
File "/home/ubuntu/odoo/openerp/sql_db.py", line 181, in __init__
self._cnx = pool.borrow(dsn)
File "/home/ubuntu/odoo/openerp/sql_db.py", line 464, in _locked
return fun(self, *args, **kwargs)
File "/home/ubuntu/odoo/openerp/sql_db.py", line 526, in borrow
result = psycopg2.connect(dsn=dsn, connection_factory=PsycoConnection)
File "/usr/lib/python2.7/dist-packages/psycopg2/__init__.py", line 179, in connect
connection_factory=connection_factory, async=async)
OperationalError: FATAL: role "ubuntu" does not exist
2015-07-01 11:41:16,580 1315 ERROR None openerp.sql_db: Connection to the database failed
I think the problem is the postgres user. Check the db_user in the /etc/openerp-server.conf file. Its looks like the user is ubuntu which is not a postgres user. You need to create the user ubuntu in postgres or change the user in the config file to an existing postgres user.
The problem is user name ubuntu is not exists in your postgres database,
Let's move to solution:
First, You need to create use that has name ubuntu in your postgres using below command
CREATE USER ubuntu WITH PASSWORD 'ubuntu';
Then you need to give privilege to ubuntu user like this
ALTER USER ubuntu CREATEUSER CREATEDB;
Related
I am trying to install packages through pip3
pip3 install keras
But, the error is as follows:
Collecting keras
Exception:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/usr/lib/python3/dist-packages/pip/commands/install.py", line 353, in run
wb.build(autobuilding=True)
File "/usr/lib/python3/dist-packages/pip/wheel.py", line 749, in build
self.requirement_set.prepare_files(self.finder)
File "/usr/lib/python3/dist-packages/pip/req/req_set.py", line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "/usr/lib/python3/dist-packages/pip/req/req_set.py", line 554, in _prepare_file
require_hashes
File "/usr/lib/python3/dist-packages/pip/req/req_install.py", line 278, in populate_link
self.link = finder.find_requirement(self, upgrade)
File "/usr/lib/python3/dist-packages/pip/index.py", line 465, in find_requirement
all_candidates = self.find_all_candidates(req.name)
File "/usr/lib/python3/dist-packages/pip/index.py", line 423, in find_all_candidates
for page in self._get_pages(url_locations, project_name):
File "/usr/lib/python3/dist-packages/pip/index.py", line 568, in _get_pages
page = self._get_page(location)
File "/usr/lib/python3/dist-packages/pip/index.py", line 683, in _get_page
return HTMLPage.get_page(link, session=self.session)
File "/usr/lib/python3/dist-packages/pip/index.py", line 792, in get_page
"Cache-Control": "max-age=600",
File "/usr/share/python-wheels/requests-2.18.4-py2.py3-none-any.whl/requests/sessions.py", line 521, in get
return self.request('GET', url, **kwargs)
File "/usr/lib/python3/dist-packages/pip/download.py", line 386, in request
return super(PipSession, self).request(method, url, *args, **kwargs)
File "/usr/share/python-wheels/requests-2.18.4-py2.py3-none-any.whl/requests/sessions.py", line 508, in request
resp = self.send(prep, **send_kwargs)
File "/usr/share/python-wheels/requests-2.18.4-py2.py3-none-any.whl/requests/sessions.py", line 618, in send
r = adapter.send(request, **kwargs)
File "/usr/share/python-wheels/CacheControl-0.11.7-py2.py3-none-any.whl/cachecontrol/adapter.py", line 47, in send
resp = super(CacheControlAdapter, self).send(request, **kw)
File "/usr/share/python-wheels/requests-2.18.4-py2.py3-none-any.whl/requests/adapters.py", line 405, in send
conn = self.get_connection(request.url, proxies)
File "/usr/share/python-wheels/requests-2.18.4-py2.py3-none-any.whl/requests/adapters.py", line 303, in get_connection
proxy_manager = self.proxy_manager_for(proxy)
File "/usr/share/python-wheels/requests-2.18.4-py2.py3-none-any.whl/requests/adapters.py", line 197, in proxy_manager_for
**proxy_kwargs)
File "/usr/share/python-wheels/urllib3-1.22-py2.py3-none-any.whl/urllib3/poolmanager.py", line 440, in proxy_from_url
return ProxyManager(proxy_url=url, **kw)
File "/usr/share/python-wheels/urllib3-1.22-py2.py3-none-any.whl/urllib3/poolmanager.py", line 391, in __init__
raise ProxySchemeUnknown(proxy.scheme)
urllib3.exceptions.ProxySchemeUnknown: Not supported proxy scheme
My institute needs a proxy and I updated proxy at all places in my system using ProxyMan.
Is it due to proxy? Because I had fresh install of Linux. If because of proxy, where do i need to update proxy?
I had a similar issue and I solved it by adding my proxy settings at the end of /etc/bash.bashrc like this:
export http_proxy="http://<user>:<pass>#<proxy>:<port>
export https_proxy="https://<user>:<pass>#<proxy>:<port>
export ftp_proxy="ftp://<user>:<pass>#<proxy>:<port>
export socks_proxy="socks://<user>:<pass>#<proxy>:<port>
You can try to use easy_install + packagename instead of pip.
I have some problem with accessing to Hue webUI. I just get
"500 server error"
to every acces to any web page on the Hue. The sample of the error:
From log file i got some information about type of this error
[12/Dec/2017 01:00:53 -0800] views ERROR JS ERROR: {"msg":"ReferenceError: checkJobBrowserStatus is not defined","url":"http://10.40.2.89:8888/hue/","line":1584,"column":12,"stack":"#http://10.40.2.89:8888/hue/:1584:13\nn.Callbacks/j#http://10.40.2.89:8888/static/desktop/ext/js/jquery/jquery-2.1.1.min.e40ec2161fe7.js:2:26852\nn.Callbacks/k.fireWith#http://10.40.2.89:8888/static/desktop/ext/js/jquery/jquery-2.1.1.min.e40ec2161fe7.js:2:27661\n.ready#http://10.40.2.89:8888/static/desktop/ext/js/jquery/jquery-2.1.1.min.e40ec2161fe7.js:2:29482\nI#http://10.40.2.89:8888/static/desktop/ext/js/jquery/jquery-2.1.1.min.e40ec2161fe7.js:2:29656\n"}
when i try to open other web pages i get the same error
[12/Dec/2017 01:04:56 -0800] views ERROR JS ERROR: {"msg":"ReferenceError: checkJobBrowserStatus is not defined","url":"http://10.40.2.89:8888/metastore/tables/","line":1584,"column":12,"stack":"#http://10.40.2.89:8888/metastore/tables/:1584:13\nn.Callbacks/j#http://10.40.2.89:8888/static/desktop/ext/js/jquery/jquery-2.1.1.min.e40ec2161fe7.js:2:26852\nn.Callbacks/k.fireWith#http://10.40.2.89:8888/static/desktop/ext/js/jquery/jquery-2.1.1.min.e40ec2161fe7.js:2:27661\n.ready#http://10.40.2.89:8888/static/desktop/ext/js/jquery/jquery-2.1.1.min.e40ec2161fe7.js:2:29482\nI#http://10.40.2.89:8888/static/desktop/ext/js/jquery/jquery-2.1.1.min.e40ec2161fe7.js:2:29656\n"}
and so on , similar errors on the any web page.
I've attached the full log file on Google Drive
I'm trying to open a web interface HUE with Iceweasel on Debian.
Cloudera version is CDH5 (CDH 5.13.0).
It seems like [indexer] app was blacklisted ([desktop] section in /hue/desktop/dump_config), so Hue won't work properly.
Also, looks like you are on the old UI, it is recommended to switch back to
Hue 4.
[12/Dec/2017 01:04:53 -0800] middleware INFO Processing exception: u'indexer' is not a registered namespace: Traceback (most recent call last):
File "/usr/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/core/handlers/base.py", line 112, in get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/transaction.py", line 371, in inner
return func(*args, **kwargs)
File "/usr/lib/hue/apps/metastore/src/metastore/views.py", line 240, in show_tables
'source_type': _get_servername(db),
File "/usr/lib/hue/desktop/core/src/desktop/lib/django_util.py", line 230, in render
**kwargs)
File "/usr/lib/hue/desktop/core/src/desktop/lib/django_util.py", line 148, in _render_to_response
return django_mako.render_to_response(template, *args, **kwargs)
File "/usr/lib/hue/desktop/core/src/desktop/lib/django_mako.py", line 125, in render_to_response
return HttpResponse(render_to_string(template_name, data_dictionary), **kwargs)
File "/usr/lib/hue/desktop/core/src/desktop/lib/django_mako.py", line 114, in render_to_string_normal
result = template.render(**data_dict)
File "/usr/lib/hue/build/env/lib/python2.7/site-packages/Mako-0.8.1-py2.7.egg/mako/template.py", line 443, in render
return runtime._render(self, self.callable_, args, data)
File "/usr/lib/hue/build/env/lib/python2.7/site-packages/Mako-0.8.1-py2.7.egg/mako/runtime.py", line 786, in _render
**_kwargs_for_callable(callable_, data))
File "/usr/lib/hue/build/env/lib/python2.7/site-packages/Mako-0.8.1-py2.7.egg/mako/runtime.py", line 818, in _render_context
_exec_template(inherit, lclcontext, args=args, kwargs=kwargs)
File "/usr/lib/hue/build/env/lib/python2.7/site-packages/Mako-0.8.1-py2.7.egg/mako/runtime.py", line 844, in _exec_template
callable_(context, *args, **kwargs)
File "/tmp/tmpMMurVL/metastore/metastore.mako.py", line 142, in render_body
__M_writer(escape(unicode( assist.assistPanel() )))
File "/tmp/tmpMMurVL/metastore/assist.mako.py", line 497, in render_assistPanel
__M_writer(escape(unicode( url('indexer:importer_prefill', source_type='all', target_type='table') )))
File "/usr/lib/hue/desktop/core/src/desktop/lib/django_mako.py", line 131, in url
return reverse(view_name, args=args, kwargs=view_args)
File "/usr/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/core/urlresolvers.py", line 532, in reverse
key)
NoReverseMatch: u'indexer' is not a registered namespace
This might be a bit late, but thought of posting the solution to help others.
I was able to get this page working by setting "share_jobs" to "true" in "/etc/hue/conf.empty/hue.ini"
So the following worked for me:
[jobbrowser]
# Share submitted jobs information with all users. If set to false,
# submitted jobs are visible only to the owner and administrators.
share_jobs=true
I'm trying to run celery worker in OS X (Mavericks). I activated virtual environment (python 3.4) and tried to start Celery with this argument:
celery worker --app=scheduling -linfo
Where scheduling is my celery app.
But I ended up with this error: dbm.error: db type is dbm.gnu, but the module is not available
Complete stacktrace:
Traceback (most recent call last):
File "/Users/other/PhoenixEnv/lib/python3.4/site-packages/kombu/utils/__init__.py", line 320, in __get__
return obj.__dict__[self.__name__]
KeyError: 'db'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/other/PhoenixEnv/bin/celery", line 9, in <module>
load_entry_point('celery==3.1.9', 'console_scripts', 'celery')()
File "/Users/other/PhoenixEnv/lib/python3.4/site-packages/celery/__main__.py", line 30, in main
main()
File "/Users/other/PhoenixEnv/lib/python3.4/site-packages/celery/bin/celery.py", line 80, in main
cmd.execute_from_commandline(argv)
File "/Users/other/PhoenixEnv/lib/python3.4/site-packages/celery/bin/celery.py", line 768, in execute_from_commandline
super(CeleryCommand, self).execute_from_commandline(argv)))
File "/Users/other/PhoenixEnv/lib/python3.4/site-packages/celery/bin/base.py", line 308, in execute_from_commandline
return self.handle_argv(self.prog_name, argv[1:])
File "/Users/other/PhoenixEnv/lib/python3.4/site-packages/celery/bin/celery.py", line 760, in handle_argv
return self.execute(command, argv)
File "/Users/other/PhoenixEnv/lib/python3.4/site-packages/celery/bin/celery.py", line 692, in execute
).run_from_argv(self.prog_name, argv[1:], command=argv[0])
File "/Users/other/PhoenixEnv/lib/python3.4/site-packages/celery/bin/worker.py", line 175, in run_from_argv
return self(*args, **options)
File "/Users/other/PhoenixEnv/lib/python3.4/site-packages/celery/bin/base.py", line 271, in __call__
ret = self.run(*args, **kwargs)
File "/Users/other/PhoenixEnv/lib/python3.4/site-packages/celery/bin/worker.py", line 209, in run
).start()
File "/Users/other/PhoenixEnv/lib/python3.4/site-packages/celery/worker/__init__.py", line 100, in __init__
self.setup_instance(**self.prepare_args(**kwargs))
File "/Users/other/PhoenixEnv/lib/python3.4/site-packages/celery/worker/__init__.py", line 141, in setup_instance
self.blueprint.apply(self, **kwargs)
File "/Users/other/PhoenixEnv/lib/python3.4/site-packages/celery/bootsteps.py", line 221, in apply
step.include(parent)
File "/Users/other/PhoenixEnv/lib/python3.4/site-packages/celery/bootsteps.py", line 347, in include
return self._should_include(parent)[0]
File "/Users/other/PhoenixEnv/lib/python3.4/site-packages/celery/bootsteps.py", line 343, in _should_include
return True, self.create(parent)
File "/Users/other/PhoenixEnv/lib/python3.4/site-packages/celery/worker/components.py", line 220, in create
w._persistence = w.state.Persistent(w.state, w.state_db, w.app.clock)
File "/Users/other/PhoenixEnv/lib/python3.4/site-packages/celery/worker/state.py", line 161, in __init__
self.merge()
File "/Users/other/PhoenixEnv/lib/python3.4/site-packages/celery/worker/state.py", line 169, in merge
self._merge_with(self.db)
File "/Users/other/PhoenixEnv/lib/python3.4/site-packages/kombu/utils/__init__.py", line 322, in __get__
value = obj.__dict__[self.__name__] = self.__get(obj)
File "/Users/other/PhoenixEnv/lib/python3.4/site-packages/celery/worker/state.py", line 238, in db
return self.open()
File "/Users/other/PhoenixEnv/lib/python3.4/site-packages/celery/worker/state.py", line 165, in open
self.filename, protocol=self.protocol, writeback=True,
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/shelve.py", line 239, in open
return DbfilenameShelf(filename, flag, protocol, writeback)
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/shelve.py", line 223, in __init__
Shelf.__init__(self, dbm.open(filename, flag), protocol, writeback)
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/dbm/__init__.py", line 91, in open
"available".format(result))
dbm.error: db type is dbm.gnu, but the module is not available
Please help.
I switched to python3.5 and got the same error. On Ubuntu I could fix it with
aptitude install python3.5-gdbm
I got the same error. On Macbook I could fix it with
brew install gdb
I want to provide my vagrant box with cuisine, I followed this tutorial but when I try to provide my box with vagrant provision command I get the next error:
[default] Running provisioner: fabric...
[127.0.0.1] Executing task 'provide'
[127.0.0.1] sudo: apt-get update
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/fabric/main.py", line 743, in main
*args, **kwargs
File "/usr/local/lib/python2.7/dist-packages/fabric/tasks.py", line 368, in execute
multiprocessing
File "/usr/local/lib/python2.7/dist-packages/fabric/tasks.py", line 264, in _execute
return task.run(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/fabric/tasks.py", line 171, in run
return self.wrapped(*args, **kwargs)
File "/home/user/projects/volaris2013/provision.py", line 10, in provide
prepare_os()
File "/home/user/projects/volaris2013/provision.py", line 32, in prepare_os
sudo('apt-get update')
File "/usr/local/lib/python2.7/dist-packages/fabric/network.py", line 578, in host_prompting_wrapper
return func(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/fabric/operations.py", line 1095, in sudo
stderr=stderr, timeout=timeout, shell_escape=shell_escape,
File "/usr/local/lib/python2.7/dist-packages/fabric/operations.py", line 909, in _run_command
channel=default_channel(), command=wrapped_command, pty=pty,
File "/usr/local/lib/python2.7/dist-packages/fabric/state.py", line 388, in default_channel
chan = _open_session()
File "/usr/local/lib/python2.7/dist-packages/fabric/state.py", line 380, in _open_session
return connections[env.host_string].get_transport().open_session()
File "/usr/local/lib/python2.7/dist-packages/fabric/network.py", line 118, in __getitem__
self.connect(key)
File "/usr/local/lib/python2.7/dist-packages/fabric/network.py", line 110, in connect
self[key] = connect(user, host, port, sock)
File "/usr/local/lib/python2.7/dist-packages/fabric/network.py", line 392, in connect
sock=sock
File "/usr/local/lib/python2.7/dist-packages/paramiko/client.py", line 342, in connect
self._auth(username, password, pkey, key_filenames, allow_agent, look_for_keys)
File "/usr/local/lib/python2.7/dist-packages/paramiko/client.py", line 462, in _auth
key = pkey_class.from_private_key_file(key_filename, password)
File "/usr/local/lib/python2.7/dist-packages/paramiko/pkey.py", line 198, in from_private_key_file
key = cls(filename=filename, password=password)
File "/usr/local/lib/python2.7/dist-packages/paramiko/rsakey.py", line 51, in __init__
self._from_private_key_file(filename, password)
File "/usr/local/lib/python2.7/dist-packages/paramiko/rsakey.py", line 163, in _from_private_key_file
data = self._read_private_key_file('RSA', filename, password)
File "/usr/local/lib/python2.7/dist-packages/paramiko/pkey.py", line 279, in _read_private_key_file
f = open(filename, 'r')
IOError: [Errno 2] No such file or directory: '[/home/user/.vagrant.d/insecure_private_key]'
I think that the error are in the brackets arround the filename, but I don't know how to solve this, I had a similar error in the past, but in fabric tasks, and I solved the problem in my env task.
The versions of packages:
Vagrant 1.4.2
Fabric==1.8.0
cuisine==0.6.5
paramiko==1.12.0
VirtualBox 4.3.9
Vagrant (as of 1.4.0) changed to returning the private_key to use from a string to an array. The vagrant-fabric plugin naively assumes it's getting a string and uses #{private_key} directly in its command, which gets written out with the wrapping square brackets.
Here's a fix for lib/vagrant-fabric/provisioner.rb:
private_key = ssh_info[:private_key_path]
# After https://github.com/mitchellh/vagrant/pull/907 (Vagrant 1.4.0+),
# private_key_path is an array.
if ! private_key.kind_of?(Array)
private_key = [private_key]
end
private_key_option = private_key.map { |k| '-i ' + k }.join(' ')
if config.remote == false
system "#{config.fabric_path} -f #{config.fabfile_path} " +
"#{private_key_option} --user=#{user} --hosts=#{host} " +
"--port=#{port} #{config.tasks.join(' ')}"
else
Update: Added pull request: https://github.com/wutali/vagrant-fabric/pull/6
I am trying to set up a pyramid app. I am using wsgi and apache2.
I keep getting Internal server error and the contents of the apache log is
mod_wsgi (pid=11200): Exception occurred processing WSGI script '/home/ubuntu/modwsgi/env/pyramid.wsgi'.
Traceback (most recent call last):
File "/home/ubuntu/modwsgi/env/lib/python2.6/site-packages/pyramid-1.3-py2.6.egg/pyramid/router.py", line 191, in __call__
request._process_response_callbacks(response)
File "/home/ubuntu/modwsgi/env/lib/python2.6/site-packages/pyramid-1.3-py2.6.egg/pyramid/request.py", line 243, in _process_response_callbacks
callback(self, response)
File "/home/ubuntu/modwsgi/env/lib/python2.6/site-packages/pyramid_beaker-0.6.1-py2.6.egg/pyramid_beaker/__init__.py", line 26, in session_callback
self.persist()
File "/home/ubuntu/modwsgi/env/lib/python2.6/site-packages/Beaker-1.6.3-py2.6.egg/beaker/session.py", line 706, in persist
self._session().save()
File "/home/ubuntu/modwsgi/env/lib/python2.6/site-packages/Beaker-1.6.3-py2.6.egg/beaker/session.py", line 400, in save
**self.namespace_args)
File "/home/ubuntu/modwsgi/env/lib/python2.6/site-packages/Beaker-1.6.3-py2.6.egg/beaker/container.py", line 622, in __init__
util.verify_directory(self.file_dir)
File "/home/ubuntu/modwsgi/env/lib/python2.6/site-packages/Beaker-1.6.3-py2.6.egg/beaker/util.py", line 85, in verify_directory
os.makedirs(dir)
File "/usr/lib/python2.6/os.py", line 150, in makedirs
makedirs(head, mode)
File "/usr/lib/python2.6/os.py", line 157, in makedirs
mkdir(name, mode)
OSError: [Errno 13] Permission denied: 'beaker_dir'
I can use simple pserve to serve the page and run wget http://localhost:6543/user/form on the terminal. It works well with form getting downloaded. But over the browser I get the 500 error.
I am using EC2 to host the app.
In the app:main stanza I am using the following code:
session.type = file
session.data_dir = beaker_dir
session.key = mvc
session.encrypt_key = mysecretencryptionkey
session.validate_key = mysecretvalidationkey
session.cookie_on_exception = true
Thanks a lot for reading
Supply an absolute path for:
session.data_dir = beaker_dir
The current working directory could be anything, usually '/', and so path will be wrong.