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
Related
I am having a service error as I am trying to run geocoders from geopy to get a location coordinates in python.I have set my proxy config, given it an api_key.
Im not sure why I am getting this error. From the search that I have done on this, it seems that this might be a proxy issue but I have that set up already.
What could be the problem here?
This is my code :
from geopy import geocoders
proxies={'http': 'http://location:port', 'https': 'http://localhost:port'}
api_key = '.......'
g = geocoders.GoogleV3(api_key=api_key,proxies=proxies, timeout=10)
location = 'Mountain View, CA'
try:
place, (lat, lng) = g.geocode(location)
except ValueError as error_message:
print("Error: geocode failed on input %s with message %s" % (location, error_message))
this is my error output:
Traceback (most recent call last):
File "/Users/aqm1152/anaconda/lib/python3.5/urllib/request.py", line 1254, in do_open
h.request(req.get_method(), req.selector, req.data, headers)
File "/Users/aqm1152/anaconda/lib/python3.5/http/client.py", line 1106, in request
self._send_request(method, url, body, headers)
File "/Users/aqm1152/anaconda/lib/python3.5/http/client.py", line 1151, in _send_request
self.endheaders(body)
File "/Users/aqm1152/anaconda/lib/python3.5/http/client.py", line 1102, in endheaders
self._send_output(message_body)
File "/Users/aqm1152/anaconda/lib/python3.5/http/client.py", line 934, in _send_output
self.send(msg)
File "/Users/aqm1152/anaconda/lib/python3.5/http/client.py", line 877, in send
self.connect()
File "/Users/aqm1152/anaconda/lib/python3.5/http/client.py", line 1260, in connect
server_hostname=server_hostname)
File "/Users/aqm1152/anaconda/lib/python3.5/ssl.py", line 377, in wrap_socket
_context=self)
File "/Users/aqm1152/anaconda/lib/python3.5/ssl.py", line 752, in __init__
self.do_handshake()
File "/Users/aqm1152/anaconda/lib/python3.5/ssl.py", line 988, in do_handshake
self._sslobj.do_handshake()
File "/Users/aqm1152/anaconda/lib/python3.5/ssl.py", line 633, in do_handshake
self._sslobj.do_handshake()
ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:645)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/aqm1152/anaconda/lib/python3.5/site-packages/geopy/geocoders/base.py", line 143, in _call_geocoder
page = requester(req, timeout=(timeout or self.timeout), **kwargs)
File "/Users/aqm1152/anaconda/lib/python3.5/urllib/request.py", line 163, in urlopen
return opener.open(url, data, timeout)
File "/Users/aqm1152/anaconda/lib/python3.5/urllib/request.py", line 466, in open
response = self._open(req, data)
File "/Users/aqm1152/anaconda/lib/python3.5/urllib/request.py", line 484, in _open
'_open', req)
File "/Users/aqm1152/anaconda/lib/python3.5/urllib/request.py", line 444, in _call_chain
result = func(*args)
File "/Users/aqm1152/anaconda/lib/python3.5/urllib/request.py", line 1297, in https_open
context=self._context, check_hostname=self._check_hostname)
File "/Users/aqm1152/anaconda/lib/python3.5/urllib/request.py", line 1256, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error EOF occurred in violation of protocol (_ssl.c:645)>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/aqm1152/Documents/TestingCode/ACERT/test_1.py", line 12, in <module>
place, (lat, lng) = g.geocode(location)
File "/Users/aqm1152/anaconda/lib/python3.5/site-packages/geopy/geocoders/googlev3.py", line 217, in geocode
self._call_geocoder(url, timeout=timeout), exactly_one
File "/Users/aqm1152/anaconda/lib/python3.5/site-packages/geopy/geocoders/base.py", line 171, in _call_geocoder
raise GeocoderServiceError(message)
geopy.exc.GeocoderServiceError: EOF occurred in violation of protocol (_ssl.c:645)
I modified your code as below, as I don't use proxy and apply an API, and it works in my machine.
from geopy import geocoders
#proxies={'http': 'http://location:port', 'https': 'http://localhost:port'}
#api_key = '.......'
g = geocoders.GoogleV3()
location = 'Mountain View, CA'
try:
place, (lat, lng) = g.geocode(location)
except ValueError as error_message:
print("Error: geocode failed on input %s with message %s" % (location, error_message))
print (place, lat, lng)
Here is the result.
Mountain View, CA, USA 37.3860517 -122.0838511
From the trackback, it looks all the errors are related to SSL. You may try to add below code at the beginning to disable SSL Certification verification as an alternative.
import ssl
# Disable SSL certificate verification
try:
_create_unverified_https_context = ssl._create_unverified_context
except AttributeError:
# Legacy Python that doesn't verify HTTPS certificates by default
pass
else:
# Handle target environment that doesn't support HTTPS verification
ssl._create_default_https_context = _create_unverified_https_context
I have encountered similar problem in Anaconda running Python 2.7 in a env with the root running Python 3.6. The problem wasn't encountered in Anaconda with both root and env running Python 2.7 in another machine.
In addition, this SO post about proxy server set up for geopy using os module may be good reference.
Hope this help.
Unble to create EC2 Instance due to socket.getaddrinfo info
Traceback (most recent call last):
File "C:\workspace\test1\main.py", line 131, in <module>
main()
File "C:\workspace\test1\main.py", line 101, in main client =create_client()
File "C:\workspace\test1\main.py", line 19, in create_client regions= client.get_all_regions()
File "C:\Python34\lib\site-packages\boto\ec2\connection.py", line 3477, in get_all_regions[('item', RegionInfo)], verb='POST')
File "C:\Python34\lib\site-packages\boto\connection.py", line 1170, in get_list response = self.make_request(action, params, path, verb)
File "C:\Python34\lib\site-packages\boto\connection.py", line 1116, in make_request return self._mexe(http_request)
File "C:\Python34\lib\site-packages\boto\connection.py", line 1030, in _mexe raise ex
File "C:\Python34\lib\site-packages\boto\connection.py", line 943, in _mexe request.body, request.headers)
File "C:\Python34\lib\http\client.py", line 1088, in request self._send_request(method, url, body, headers)
File "C:\Python34\lib\http\client.py", line 1126, in _send_request self.endheaders(body)
File "C:\Python34\lib\http\client.py", line 1084, in endheaders self._send_output(message_body)
File "C:\Python34\lib\http\client.py", line 922, in _send_output self.send(msg)
File "C:\Python34\lib\http\client.py", line 857, in send self.connect()
File "C:\Python34\lib\site-packages\boto\https_connection.py", line 119, in connect sock = socket.create_connection((self.host, self.port), self.timeout)
File "C:\Python34\lib\socket.py", line 494, in create_connection for res in getaddrinfo(host, port, 22, SOCK_STREAM):
File "C:\Python34\lib\socket.py", line 533, in getaddrinfo for res in_socket.getaddrinfo(host, port, family, type, proto, flags):socket.gaierror: [Errno 10047] getaddrinfo failed
gaierror is related to getaddrinfo and your problem is probably due to the hostname. If not yet, you may try to change for the IP address, which doesn't need to be resolved.
If you can post details about your code, may be helpful. (I know this may be not a full answer, but I can't comment yet)
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;
Traceback (most recent call last):
File "/opt/openerp/server/openerp/addons/connector/queue/worker.py", line 123, in run_job
job.perform(session)
File "/opt/openerp/server/openerp/addons/connector/queue/job.py", line 492, in perform
self.result = self.func(session, *self.args, **self.kwargs)
File "/opt/openerp/server/openerp/addons/magentoerpconnect/unit/import_synchronizer.py", line 378, in import_record
importer.run(magento_id, force=force)
File "/opt/openerp/server/openerp/addons/magentoerpconnect/unit/import_synchroni zer.py", line 221, in run
self._import_dependencies()
File "/opt/openerp/server/openerp/addons/magentoerpconnect/sale.py", line 849, in _import_dependencies
'magento.product.product')
File "/opt/openerp/server/openerp/addons/magentoerpconnect/unit/import_synchronizer.py", line 124, in _import_dependency
importer.run(magento_id)
File "/opt/openerp/server/openerp/addons/magentoerpconnect/unit/import_synchronizer.py", line 206, in run
self.magento_record = self._get_magento_data()
File "/opt/openerp/server/openerp/addons/magentoerpconnect/unit/import_synchronizer.py", line 63, in _get_magento_data
return self.backend_adapter.read(self.magento_id)
File "/opt/openerp/server/openerp/addons/magentoerpconnect/product.py", line 278, in read
[int(id), storeview_id, attributes, 'id'])
File "/opt/openerp/server/openerp/addons/magentoerpconnect/product.py", line 243, in _call
return super(ProductProductAdapter, self)._call(method, arguments)
File "/opt/openerp/server/openerp/addons/magentoerpconnect/unit/backend_adapter.py", line 168, in _call
result = api.call(method, arguments)
File "/usr/local/lib/python2.7/dist-packages/magento-0.4-py2.7.egg/magento/api.py", line 161, in call
return self.client.call(self.session, resource_path, arguments)
File "/usr/lib/python2.7/xmlrpclib.py", line 1224, in __call__
return self.__send(self.__name, args)
File "/usr/lib/python2.7/xmlrpclib.py", line 1578, in __request
verbose=self.__verbose
File "/usr/lib/python2.7/xmlrpclib.py", line 1264, in request
return self.single_request(host, handler, request_body, verbose)
File "/usr/lib/python2.7/xmlrpclib.py", line 1297, in single_request
return self.parse_response(response)
File "/usr/lib/python2.7/xmlrpclib.py", line 1473, in parse_response
return u.close()
File "/usr/lib/python2.7/xmlrpclib.py", line 793, in close
raise Fault(**self._stack[0])
Fault: <Fault 3: 'Invalid api path.'>
I Am Unable To Integrated & Sync My Products From Magento To Openerp,I Have Used The CampToCamp's Add-on In The Openerp & Have Added The Module On Magento. I Have Used My Magento Server Link & Have Added Enough Test Products Yet The Products Aren't Syncing Due To The Above error As In The Jobs Tab In Openerp. Please Help Me Get Through Or Understand What Am I Doing Wrongly.
Thank You In Advance.
The problem was the integration module which was installed on my magento site didn't match the integration module on Openerp so all i needed to do was install both from the same vender and it worked like a charm.
Just remove both the integration modules from openerp & magento,& follow a single vender for me i used the following guide to get the Integration working.
https://openerp-magento-connector.readthedocs.org/en/develop/index.html
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.