Issue setting up Odoo server on Windows - windows

I have installed using both Odoo 10 and Odoo 11 and it gives me the same error 500 when connecting to the following address:
http://localhost:8069/
Internal Server Error
The server encountered an internal error and
was unable to complete your request. Either the server is overloaded
or there is an error in the application
This is the error in the log file:
2018-06-12 09:15:41,424 13968 INFO ? odoo: Odoo version 10.0-20180612
2018-06-12 09:15:41,424 13968 INFO ? odoo: Using configuration file at C:\Program Files (x86)\Odoo 10.0\server\odoo.conf
2018-06-12 09:15:41,426 13968 INFO ? odoo: addons paths: [u'C:\\Users\\Admin\\AppData\\Local\\OpenERP S.A.\\Odoo\\addons\\10.0', u'C:\\Program Files (x86)\\Odoo 10.0\\server\\odoo\\addons']
2018-06-12 09:15:41,426 13968 INFO ? odoo: database: thomas#localhost:5432
2018-06-12 09:15:41,456 13968 INFO ? odoo.service.server: Initiating shutdown
2018-06-12 09:15:41,456 13968 INFO ? odoo.service.server: Hit CTRL-C again or send a second signal to force the shutdown.
2018-06-12 09:15:45,668 748 INFO ? odoo: Odoo version 10.0-20180612
2018-06-12 09:15:45,670 748 INFO ? odoo: Using configuration file at C:\Program Files (x86)\Odoo 10.0\server\odoo.conf
2018-06-12 09:15:45,671 748 INFO ? odoo: addons paths: ['C:\\Users\\Admin\\AppData\\Local\\OpenERP S.A.\\Odoo\\addons\\10.0', u'C:\\Program Files (x86)\\Odoo 10.0\\server\\odoo\\addons']
2018-06-12 09:15:45,671 748 INFO ? odoo: database: thomas#localhost:5432
2018-06-12 09:15:45,691 748 INFO ? odoo.service.server: HTTP service (werkzeug) running on ACER-THOMAS:8069
2018-06-12 09:20:54,644 748 INFO ? odoo.addons.report.models.report: Will use the Wkhtmltopdf binary at C:\Program Files (x86)\Odoo 10.0\thirdparty\wkhtmltopdf.exe
2018-06-12 09:20:55,512 748 INFO ? odoo.http: HTTP Configuring static files
2018-06-12 09:20:57,529 748 INFO ? odoo.sql_db: Connection to the database failed
2018-06-12 09:20:57,729 748 INFO ? werkzeug: 127.0.0.1 - - [12/Jun/2018 09:20:57] "GET / HTTP/1.1" 500 -
2018-06-12 09:20:57,740 748 ERROR ? werkzeug: Error on request:
Traceback (most recent call last):
File "werkzeug\serving.py", line 177, in run_wsgi
File "werkzeug\serving.py", line 165, in execute
File "C:\Program Files (x86)\Odoo 10.0\server\odoo\service\server.py", line 244, in app
return self.app(e, s)
File "C:\Program Files (x86)\Odoo 10.0\server\odoo\service\wsgi_server.py", line 186, in application
return application_unproxied(environ, start_response)
File "C:\Program Files (x86)\Odoo 10.0\server\odoo\service\wsgi_server.py", line 172, in application_unproxied
result = handler(environ, start_response)
File "C:\Program Files (x86)\Odoo 10.0\server\odoo\http.py", line 1324, in __call__
return self.dispatch(environ, start_response)
File "C:\Program Files (x86)\Odoo 10.0\server\odoo\http.py", line 1298, in __call__
return self.app(environ, start_wrapped)
File "werkzeug\wsgi.py", line 579, in __call__
File "C:\Program Files (x86)\Odoo 10.0\server\odoo\http.py", line 1462, in dispatch
self.setup_db(httprequest)
File "C:\Program Files (x86)\Odoo 10.0\server\odoo\http.py", line 1384, in setup_db
httprequest.session.db = db_monodb(httprequest)
File "C:\Program Files (x86)\Odoo 10.0\server\odoo\http.py", line 1546, in db_monodb
dbs = db_list(True, httprequest)
File "C:\Program Files (x86)\Odoo 10.0\server\odoo\http.py", line 1514, in db_list
dbs = odoo.service.db.list_dbs(force)
File "C:\Program Files (x86)\Odoo 10.0\server\odoo\service\db.py", line 337, in list_dbs
with closing(db.cursor()) as cr:
File "C:\Program Files (x86)\Odoo 10.0\server\odoo\sql_db.py", line 635, in cursor
return Cursor(self.__pool, self.dbname, self.dsn, serialized=serialized)
File "C:\Program Files (x86)\Odoo 10.0\server\odoo\sql_db.py", line 177, in __init__
self._cnx = pool.borrow(dsn)
File "C:\Program Files (x86)\Odoo 10.0\server\odoo\sql_db.py", line 518, in _locked
return fun(self, *args, **kwargs)
File "C:\Program Files (x86)\Odoo 10.0\server\odoo\sql_db.py", line 586, in borrow
**connection_info)
File "psycopg2\__init__.py", line 164, in connect
OperationalError: could not connect to server: Connection refused (0x0000274D/10061)
Is the server running on host "localhost" (::1) and accepting
TCP/IP connections on port 5432?
could not connect to server: Connection refused (0x0000274D/10061)
Is the server running on host "localhost" (127.0.0.1) and accepting
TCP/IP connections on port 5432?
Port 5432 is for PostgreSQL, that is fine.
I wonder why it cannot connect to localhost:8069.
Anyone has any idea what is wrong?

Please find the file given below
C:\Program Files\PostgreSQL\9.5\data\postgresql.conf
The Version depends upon the PostgreSQL version you have installed
then find the line contains
listen_address = '*'
Please uncomment it.

Related

Magento 1.9 on PHP 7.2 - phpseclib failed to open stream

I have installed the latest Magento version 1.9.4.5 on PHP 7.2.33. At the file /var/log/system.log, I frequently see the below lines:
DEBUG (7): include(Phpseclib\Crypt\Base.php): failed to open stream: No such file or directory /lib/Varien/Autoload.php
DEBUG (7): include(Phpseclib\Crypt\Base.php): failed to open stream: No such file or directory /lib/Varien/Autoload.php
DEBUG (7): include(): Failed opening 'Phpseclib\Crypt\Base.php' for inclusion (include_path='/app/code/local:/app/code/community:/app/code/core:/lib:.:/opt/cpanel/ea-php72/root/usr/share/pear')/lib/Varien/Autoload.php
DEBUG (7): include(Phpseclib\Crypt\Blowfish.php): failed to open stream: No such file or directory /lib/Varien/Autoload.php
DEBUG (7): include(Phpseclib\Crypt\Blowfish.php): failed to open stream: No such file or directory /lib/Varien/Autoload.php
DEBUG (7): include(): Failed opening 'Phpseclib\Crypt\Blowfish.php' for inclusion (include_path='/app/code/local:/app/code/community:/app/code/core:/lib:.:/opt/cpanel/ea-php72/root/usr/share/pear')/lib/Varien/Autoload.php
DEBUG (7): include(Phpseclib\Crypt\Random.php): failed to open stream: No such file or directory /lib/Varien/Autoload.php
DEBUG (7): include(Phpseclib\Crypt\Random.php): failed to open stream: No such file or directory /lib/Varien/Autoload.php
DEBUG (7): include(): Failed opening 'Phpseclib\Crypt\Random.php' for inclusion (include_path='/app/code/local:/app/code/community:/app/code/core:/lib:.:/opt/cpanel/ea-php72/root/usr/share/pear')/lib/Varien/Autoload.php
I have checked the below files under the Magento root directory and they are all exist:
/lib/phpseclib/Crypt/Base.php
/lib/phpseclib/Crypt/Blowfish.php
/lib/phpseclib/Crypt/Random.php
Is this problem related with PHP 7.2?

Ambari fails restarting : The package hive-metastore is not supported by this version of the stack-select tool

I build a hadoop cluster with Ambari 2.7.3.0. Ambari notifies we need to restart some components, but I get the following error message when I restart them.
I guess there are some version issues as the message mentions.
Fail: The package hive-metastore is not supported by this version of the stack-select tool.
Is it due to the limited connection to the internet? Because of security issues, we use a local repository.
Unfortunately, I'm very new to Ambari and hadoop, so I cannot find any clue in this message.
2019-03-14 13:20:46,629 - Reporting component version failed
Traceback (most recent call last):
File "/usr/lib/ambari-agent/lib/resource_management/libraries/script/script.py", line 363, in execute
self.save_component_version_to_structured_out(self.command_name)
File "/usr/lib/ambari-agent/lib/resource_management/libraries/script/script.py", line 223, in save_component_version_to_structured_out
stack_select_package_name = stack_select.get_package_name()
File "/usr/lib/ambari-agent/lib/resource_management/libraries/functions/stack_select.py", line 109, in get_package_name
package = get_packages(PACKAGE_SCOPE_STACK_SELECT, service_name, component_name)
File "/usr/lib/ambari-agent/lib/resource_management/libraries/functions/stack_select.py", line 234, in get_packages
raise Fail("The package {0} is not supported by this version of the stack-select tool.".format(package))
Fail: The package hive-metastore is not supported by this version of the stack-select tool.
2019-03-14 13:20:46,676 - Reporting component version failed
Traceback (most recent call last):
File "/usr/lib/ambari-agent/lib/resource_management/libraries/script/script.py", line 363, in execute
self.save_component_version_to_structured_out(self.command_name)
File "/usr/lib/ambari-agent/lib/resource_management/libraries/script/script.py", line 223, in save_component_version_to_structured_out
stack_select_package_name = stack_select.get_package_name()
File "/usr/lib/ambari-agent/lib/resource_management/libraries/functions/stack_select.py", line 109, in get_package_name
package = get_packages(PACKAGE_SCOPE_STACK_SELECT, service_name, component_name)
File "/usr/lib/ambari-agent/lib/resource_management/libraries/functions/stack_select.py", line 234, in get_packages
raise Fail("The package {0} is not supported by this version of the stack-select tool.".format(package))
Fail: The package hive-metastore is not supported by this version of the stack-select tool.

Installing CDH using Cloudera Manager: No such file or directory

Installing using CM and successfully download and distribute all parcels.
However, all agents do not decompress parcels when distribution is 100% finished. Checking the log, it says:
[21/Nov/2018 09:53:04 +0000] 30292 MainThread parcel INFO Executing command ['chown', 'root:yarn', u'/opt/cloudera/parcels/CDH-6.0.1-1.cdh6.0.1.p0.590678/lib/hadoop-yarn/bin/container-executor']
[21/Nov/2018 09:53:04 +0000] 30292 MainThread parcel INFO chmod: /opt/cloudera/parcels/CDH-6.0.1-1.cdh6.0.1.p0.590678/lib/hadoop-yarn/bin/container-executor 6050
[21/Nov/2018 09:53:04 +0000] 30292 MainThread parcel INFO Executing command ['chmod', '6050', u'/opt/cloudera/parcels/CDH-6.0.1-1.cdh6.0.1.p0.590678/lib/hadoop-yarn/bin/container-executor']
[21/Nov/2018 09:53:04 +0000] 30292 MainThread parcel ERROR Error while attempting to modify permissions of file '/opt/cloudera/parcels/CDH-6.0.1-1.cdh6.0.1.p0.590678/lib/hadoop-0.20-mapreduce/sbin/Linux/task-controller'.
Traceback (most recent call last):
File "/opt/cloudera/cm-agent/lib/python2.7/site-packages/cmf/parcel.py", line 520, in ensure_permissions
file = cmf.util.validate_and_open_fd(path, self.get_parcel_home(parcel))
File "/opt/cloudera/cm-agent/lib/python2.7/site-packages/cmf/util/__init__.py", line 358, in validate_and_open_fd
fd = os.open(path, flags)
OSError: [Errno 2] No such file or directory: '/opt/cloudera/parcels/CDH-6.0.1-1.cdh6.0.1.p0.590678/lib/hadoop-0.20-mapreduce/sbin/Linux/task-controller'
[21/Nov/2018 09:54:04 +0000] 30292 MainThread heartbeat_tracker INFO HB stats (seconds): num:40 LIFE_MIN:0.01 min:0.01 mean:0.01 max:0.01 LIFE_MAX:0.05
[21/Nov/2018 10:04:04 +0000] 30292 MainThread heartbeat_tracker INFO HB stats (seconds): num:40 LIFE_MIN:0.01 min:0.01 mean:0.01 max:0.01 LIFE_MAX:0.05
Why the path '/opt/cloudera/parcels/CDH-6.0.1-1.cdh6.0.1.p0.590678/lib/hadoop-0.20-mapreduce/sbin/Linux/task-controller' is missing and how to address this issue?
Any help is appreciated.
I had the exactly same trouble and could not solve it after a lot of waste of time. I finally ended up with installing via "package" method instead of "parcel" method.

Bizarre Exception from PySpark of Local Mode in Docker Container

I have a Spark application inside a test.py that I want to execute. Briefly speaking, I had Spark 2.3.0 installed, then would like to execute test.py. When I did it on my developing machine, Mac Book, everything is fine. BUT when attempting to do the same thing in a Docker container on my Mac Book, I would encounter the following exception which I've searched for possible hints from Google without triumph.
Clues Collected So Far
Running test.py without Docker on my laptop would be absolutely fine.
It seems to have something to do with record numbers when saving.
I. There are three actions where all have similar logic. In the Docker container, the first action is executed very well. But the next two would fail EVERY TIME when Spark tried to save results to AWS S3.
II. If I limit the dataframes as output in the last 2 actions like 5000, the program would be executed very well.
Logic of Spark Application
Retrieve data from MySQL or S3, do some computation, then store result onto AWS S3.
Exception Message
Exception happened during processing of request from ('127.0.0.1', 52218)
2018-04-24 06:17:19,572 678 py4j.java_gateway INFO:Error while receiving.
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/py4j/java_gateway.py", line 1062, in send_command
raise Py4JNetworkError("Answer from Java side is empty")
py4j.protocol.Py4JNetworkError: Answer from Java side is empty
2018-04-24 06:17:19,626 678 root ERROR:Exception while sending command.
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/py4j/java_gateway.py", line 1062, in send_command
raise Py4JNetworkError("Answer from Java side is empty")
py4j.protocol.Py4JNetworkError: Answer from Java side is empty
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/py4j/java_gateway.py", line 908, in send_command
response = connection.send_command(command)
File "/usr/lib/python3.6/site-packages/py4j/java_gateway.py", line 1067, in send_command
"Error while receiving", e, proto.ERROR_ON_RECEIVE)
py4j.protocol.Py4JNetworkError: Error while receiving
Traceback (most recent call last):
Traceback (most recent call last):
File "py/apmain.py", line 36, in <module>
File "/usr/lib64/python3.6/socketserver.py", line 317, in _handle_request_noblock
self.process_request(request, client_address)
File "/usr/lib64/python3.6/socketserver.py", line 348, in process_request
self.finish_request(request, client_address)
File "/usr/lib64/python3.6/socketserver.py", line 361, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/usr/lib64/python3.6/socketserver.py", line 696, in __init__
self.handle()
File "/opt/spark/python/pyspark/accumulators.py", line 235, in handle
num_updates = read_int(self.rfile)
File "/opt/spark/python/pyspark/serializers.py", line 685, in read_int
raise EOFError
EOFError
----------------------------------------
main()
File "py/apmain.py", line 30, in main
engine_main.main(sys.argv)
File "/opt/ap2126/py/dtt/ml/framework/engine_main.py", line 46, in main
raise e
File "/opt/ap2126/py/dtt/ml/framework/engine_main.py", line 36, in main
engine.execute(tags)
File "/opt/ap2126/py/dtt/ml/framework/engine.py", line 152, in execute
passing_datas = layer_handler.execute(passing_datas, tags, is_load_cache=True)
File "/opt/ap2126/py/dtt/ml/framework/layer_handler.py", line 319, in execute
is_load_cache)
File "/opt/ap2126/py/dtt/ml/framework/layer_handler.py", line 87, in _execute_workers_as_sequence
output_data = worker_handler.worker.do_job(input_datas, results)
File "/opt/ap2126/py/ap2126/label_extraction.py", line 498, in do_job
self._get_lbls_from_structured_job('mysql')
File "/opt/ap2126/py/ap2126/label_extraction.py", line 583, in _get_lbls_from_structured_job
.json(job_save_temp_path)
File "/opt/spark/python/pyspark/sql/readwriter.py", line 775, in json
self._jwrite.json(path)
File "/usr/lib/python3.6/site-packages/py4j/java_gateway.py", line 1160, in __call__
answer, self.gateway_client, self.target_id, self.name)
File "/opt/spark/python/pyspark/sql/utils.py", line 63, in deco
return f(*a, **kw)
File "/usr/lib/python3.6/site-packages/py4j/protocol.py", line 328, in get_return_value
format(target_id, ".", name))
py4j.protocol.Py4JError: An error occurred while calling o818.json
2018-04-24 06:17:23,151 678 py4j.java_gateway ERROR:An error occurred while trying to connect to the Java server (127.0.0.1:38899)
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/py4j/java_gateway.py", line 852, in _get_connection
connection = self.deque.pop()
IndexError: pop from an empty deque
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/py4j/java_gateway.py", line 990, in start
self.socket.connect((self.address, self.port))
ConnectionRefusedError: [Errno 111] Connection refused
2018-04-24 06:17:23,152 678 py4j.java_gateway ERROR:An error occurred while trying to connect to the Java server (127.0.0.1:38899)
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/py4j/java_gateway.py", line 852, in _get_connection
connection = self.deque.pop()
IndexError: pop from an empty deque
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/py4j/java_gateway.py", line 990, in start
self.socket.connect((self.address, self.port))
ConnectionRefusedError: [Errno 111] Connection refused
2018-04-24 06:17:23,153 678 py4j.java_gateway ERROR:An error occurred while trying to connect to the Java server (127.0.0.1:38899)
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/py4j/java_gateway.py", line 852, in _get_connection
connection = self.deque.pop()
IndexError: pop from an empty deque
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/py4j/java_gateway.py", line 990, in start
self.socket.connect((self.address, self.port))
ConnectionRefusedError: [Errno 111] Connection refused
2018-04-24 06:17:23,154 678 py4j.java_gateway ERROR:An error occurred while trying to connect to the Java server (127.0.0.1:38899)
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/py4j/java_gateway.py", line 852, in _get_connection
connection = self.deque.pop()
IndexError: pop from an empty deque
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/py4j/java_gateway.py", line 990, in start
self.socket.connect((self.address, self.port))
ConnectionRefusedError: [Errno 111] Connection refused
2018-04-24 06:17:23,155 678 py4j.java_gateway ERROR:An error occurred while trying to connect to the Java server (127.0.0.1:38899)
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/py4j/java_gateway.py", line 852, in _get_connection
connection = self.deque.pop()
IndexError: pop from an empty deque
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/py4j/java_gateway.py", line 990, in start
self.socket.connect((self.address, self.port))
ConnectionRefusedError: [Errno 111] Connection refused
2018-04-24 06:17:23,156 678 py4j.java_gateway ERROR:An error occurred while trying to connect to the Java server (127.0.0.1:38899)
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/py4j/java_gateway.py", line 852, in _get_connection
connection = self.deque.pop()
IndexError: pop from an empty deque
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/py4j/java_gateway.py", line 990, in start
self.socket.connect((self.address, self.port))
ConnectionRefusedError: [Errno 111] Connection refused
2018-04-24 06:17:23,156 678 py4j.java_gateway ERROR:An error occurred while trying to connect to the Java server (127.0.0.1:38899)
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/py4j/java_gateway.py", line 852, in _get_connection
connection = self.deque.pop()
IndexError: pop from an empty deque
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/py4j/java_gateway.py", line 990, in start
self.socket.connect((self.address, self.port))
ConnectionRefusedError: [Errno 111] Connection refused
2018-04-24 06:17:23,158 678 py4j.java_gateway ERROR:An error occurred while trying to connect to the Java server (127.0.0.1:38899)
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/py4j/java_gateway.py", line 852, in _get_connection
connection = self.deque.pop()
IndexError: pop from an empty deque
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/py4j/java_gateway.py", line 990, in start
self.socket.connect((self.address, self.port))
ConnectionRefusedError: [Errno 111] Connection refused
2018-04-24 06:17:23,159 678 py4j.java_gateway ERROR:An error occurred while trying to connect to the Java server (127.0.0.1:38899)
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/py4j/java_gateway.py", line 852, in _get_connection
connection = self.deque.pop()
IndexError: pop from an empty deque
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/py4j/java_gateway.py", line 990, in start
self.socket.connect((self.address, self.port))
ConnectionRefusedError: [Errno 111] Connection refused
2018-04-24 06:17:23,159 678 py4j.java_gateway ERROR:An error occurred while trying to connect to the Java server (127.0.0.1:38899)
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/py4j/java_gateway.py", line 852, in _get_connection
connection = self.deque.pop()
IndexError: pop from an empty deque
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/py4j/java_gateway.py", line 990, in start
self.socket.connect((self.address, self.port))
ConnectionRefusedError: [Errno 111] Connection refused
2018-04-24 06:17:23,216 678 py4j.java_gateway ERROR:An error occurred while trying to connect to the Java server (127.0.0.1:38899)
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/py4j/java_gateway.py", line 852, in _get_connection
connection = self.deque.pop()
IndexError: pop from an empty deque
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/py4j/java_gateway.py", line 990, in start
self.socket.connect((self.address, self.port))
ConnectionRefusedError: [Errno 111] Connection refused
2018-04-24 06:17:23,217 678 py4j.java_gateway ERROR:An error occurred while trying to connect to the Java server (127.0.0.1:38899)
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/py4j/java_gateway.py", line 852, in _get_connection
connection = self.deque.pop()
IndexError: pop from an empty deque
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/py4j/java_gateway.py", line 990, in start
self.socket.connect((self.address, self.port))
ConnectionRefusedError: [Errno 111] Connection refused
2018-04-24 06:17:23,218 678 py4j.java_gateway ERROR:An error occurred while trying to connect to the Java server (127.0.0.1:38899)
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/py4j/java_gateway.py", line 852, in _get_connection
connection = self.deque.pop()
IndexError: pop from an empty deque
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/py4j/java_gateway.py", line 990, in start
self.socket.connect((self.address, self.port))
ConnectionRefusedError: [Errno 111] Connection refused
2018-04-24 06:17:23,219 678 py4j.java_gateway ERROR:An error occurred while trying to connect to the Java server (127.0.0.1:38899)
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/py4j/java_gateway.py", line 852, in _get_connection
connection = self.deque.pop()
IndexError: pop from an empty deque
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/py4j/java_gateway.py", line 990, in start
self.socket.connect((self.address, self.port))
ConnectionRefusedError: [Errno 111] Connection refused
2018-04-24 06:17:23,220 678 py4j.java_gateway ERROR:An error occurred while trying to connect to the Java server (127.0.0.1:38899)
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/py4j/java_gateway.py", line 852, in _get_connection
connection = self.deque.pop()
IndexError: pop from an empty deque
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/py4j/java_gateway.py", line 990, in start
self.socket.connect((self.address, self.port))
ConnectionRefusedError: [Errno 111] Connection refused
2018-04-24 06:17:23,222 678 py4j.java_gateway ERROR:An error occurred while trying to connect to the Java server (127.0.0.1:38899)
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/py4j/java_gateway.py", line 852, in _get_connection
connection = self.deque.pop()
IndexError: pop from an empty deque
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/py4j/java_gateway.py", line 990, in start
self.socket.connect((self.address, self.port))
ConnectionRefusedError: [Errno 111] Connection refused
2018-04-24 06:17:23,223 678 py4j.java_gateway ERROR:An error occurred while trying to connect to the Java server (127.0.0.1:38899)
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/py4j/java_gateway.py", line 852, in _get_connection
connection = self.deque.pop()
IndexError: pop from an empty deque
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/py4j/java_gateway.py", line 990, in start
self.socket.connect((self.address, self.port))
ConnectionRefusedError: [Errno 111] Connection refused
Part of Dockerfile
.
.
FROM centos:centos7
.
.
RUN yum -y install https://centos7.iuscommunity.org/ius-release.rpm && \
yum -y install python36u python36u-pip python36u-devel && \
python3.6 -m pip install --upgrade pip && \
echo "export PYTHONIOENCODING=utf-8" >> ~/.bashrc && \
echo "alias python='python3'" >> ~/.bashrc && \
# Installation of the Java Runtime Environment
su -c "yum -y install java-1.8.0-openjdk" && \
yum -y install mlocate; updatedb && \
echo "export JAVA_HOME=\"$(locate bin/java | grep jvm | sed 's+/bin/java++g')\"" >> ~/.bashrc && \
# Installation of Spark for running `pyspark` with success
curl -s http://ftp.twaren.net/Unix/Web/apache/spark/spark-2.3.0/spark-2.3.0-bin-hadoop2.7.tgz | tar -zx -C /opt/ && \
ln -s /opt/spark-2.3.0-bin-hadoop2.7 /opt/spark && \
echo "export SPARK_HOME=/opt/spark >> ~/.bashrc"; source ~/.bashrc && \
echo "export PYTHONPATH="$SPARK_HOME"/python/" >> ~/.bashrc; source ~/.bashrc && \
echo "export PYTHONPATH="$PYTHONPATH":./py/" >> ~/.bashrc && \
echo "export PYSPARK_PYTHON=/usr/bin/python3" >> ~/.bashrc; source ~/.bashrc && \
# For the interaction with AWS S3 on Spark
curl -s http://central.maven.org/maven2/org/apache/hadoop/hadoop-aws/2.7.3/hadoop-aws-2.7.3.jar -o ${SPARK_HOME}/jars/hadoop-aws-2.7.3.jar && \
curl -s http://central.maven.org/maven2/com/amazonaws/aws-java-sdk/1.7.4/aws-java-sdk-1.7.4.jar -o ${SPARK_HOME}/jars/aws-java-sdk-1.7.4.jar
.
.
.
How I Run Docker
docker run -it --rm ${image id}
This is due to docker daemon killing the companion java process of the pyspark process because of memory limitations of the running container. The python counterpart detects the socket close and throws the EOF. The other exceptions are launched when trying to reconnect to the dead process.
You should check your process memory consumption (specially the java process which actually performs most of the spark operations) and adjust memory settings (--memory , --memory-swap) for your requirements when running the container (https://docs.docker.com/config/containers/resource_constraints/).

ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:747) on OS X

I am trying this bit of code.
import pandas as pd
fiddy_states=pd.read_html('https://simple.wikipedia.org/wiki/List_of_U.S._states')
print(fiddy_states[0])
I am getting following error:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 1318, in do_open
encode_chunked=req.has_header('Transfer-encoding'))
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 1239, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 1285, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 1234, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 1026, in _send_output
self.send(msg)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 964, in send
self.connect()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 1400, in connect
server_hostname=server_hostname)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py", line 401, in wrap_socket
_context=self, _session=session)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py", line 808, in __init__
self.do_handshake()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py", line 1061, in do_handshake
self._sslobj.do_handshake()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py", line 683, in do_handshake
self._sslobj.do_handshake()
ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:747)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/avinashmore/Desktop/Desktop pe Desktop/Programming/Python/Pandas/panda4BuidlingDataset.py", line 10, in <module>
fiddy_states= pd.read_html('https://simple.wikipedia.org/wiki/List_of_U.S._states')
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pandas/io/html.py", line 896, in read_html
keep_default_na=keep_default_na)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pandas/io/html.py", line 733, in _parse
raise_with_traceback(retained)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pandas/compat/__init__.py", line 339, in raise_with_traceback
raise exc.with_traceback(traceback)
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:747)>
I have tried following things:
Uninstall and install certifi
and all the other steps mentioned in related answers on stack overflow.
Still unable to fix it.
Please help.
I was having the same problem, and after some searching, i came across this
https://bugs.python.org/issue28150
There is a command-line-runnable script ("/Applications/Python 3.6/Install Certificates.command") that uses pip to install certifi and creates a symlink in the OpenSSL directory to certifi's installed bundle location.
This worked for me, maybe you can take a look.

Resources