I have the following error. How to fix the following certificate error (ipython)? - certificate

I'm getting the following error when I want to run ipython notebook on my macbook. Does anyone know how to fix this? Could you please help me about it?
ERROR:root:Exception in I/O handler for fd 6
Traceback (most recent call last):
File "//anaconda/lib/python2.7/site-packages/zmq/eventloop/ioloop.py", line 346, in start
self._handlers[fd](fd, events)
File "//anaconda/lib/python2.7/site-packages/tornado/netutil.py", line 167, in accept_handler
callback(connection, address)
File "//anaconda/lib/python2.7/site-packages/tornado/tcpserver.py", line 217, in _handle_connection
do_handshake_on_connect=False)
File "//anaconda/lib/python2.7/site-packages/tornado/netutil.py", line 407, in ssl_wrap_socket
return ssl.wrap_socket(socket, **dict(context, **kwargs))
File "//anaconda/python.app/Contents/lib/python2.7/ssl.py", line 387, in wrap_socket
ciphers=ciphers)
File "//anaconda/python.app/Contents/lib/python2.7/ssl.py", line 141, in __init__
ciphers)
SSLError: [Errno 336445449] _ssl.c:368: error:140DC009:SSL routines:SSL_CTX_use_certificate_chain_file:PEM lib
ERROR:root:Exception in I/O handler for fd 6
Traceback (most recent call last):
File "//anaconda/lib/python2.7/site-packages/zmq/eventloop/ioloop.py", line 346, in start
self._handlers[fd](fd, events)
File "//anaconda/lib/python2.7/site-packages/tornado/netutil.py", line 167, in accept_handler
callback(connection, address)
File "//anaconda/lib/python2.7/site-packages/tornado/tcpserver.py", line 217, in _handle_connection
do_handshake_on_connect=False)
File "//anaconda/lib/python2.7/site-packages/tornado/netutil.py", line 407, in ssl_wrap_socket
return ssl.wrap_socket(socket, **dict(context, **kwargs))
File "//anaconda/python.app/Contents/lib/python2.7/ssl.py", line 387, in wrap_socket
ciphers=ciphers)
File "//anaconda/python.app/Contents/lib/python2.7/ssl.py", line 141, in __init__
ciphers)
SSLError: [Errno 336445449] _ssl.c:368: error:140DC009:SSL routines:SSL_CTX_use_certificate_chain_file:PEM lib

It appears that your browser is attempting to access the notebook without SSL. Make sure to access the site with HTTPS. For example, when you access the notebook, type in https://127.0.0.1:9999 in your browser. (Or whatever the address of the server is.)

It doesn't recognise the files you're passing it - either:
pass a .pem file (private key) to --NotebookApp.keyfile= and the .crt file (your certificate) to --NotebookApp.certfile=
create a new file by appending your certificate to your key and pass this new file to --certfile.

Related

Connection to local postgresql database fails after upgrade to Big Sur

I use IntelliJ IDEA's bundled database client (DataGrip) to manage my database connections, both local and remote. And using docker to connect to postgres with following settings:
services:
postgresql:
image: postgres:11
ports:
- "5432:5432"
expose:
- "5432"
environment:
- POSTGRES_USER=$user
- POSTGRES_PASSWORD=$pass
- POSTGRES_DB=k$db
After upgrading from Catalina to Big Sur, connection to local db fails and it just shows a connection error message as follows:
[08001] Connection to localhost:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
java.net.ConnectException: Connection refused (Connection refused).
When I run docker-compose up, I get the following error:
Traceback (most recent call last):
File "site-packages/urllib3/connectionpool.py", line 677, in urlopen
File "site-packages/urllib3/connectionpool.py", line 392, in _make_request
File "http/client.py", line 1252, in request
File "http/client.py", line 1298, in _send_request
File "http/client.py", line 1247, in endheaders
File "http/client.py", line 1026, in _send_output
File "http/client.py", line 966, in send
File "site-packages/docker/transport/unixconn.py", line 43, in connect
ConnectionRefusedError: [Errno 61] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "site-packages/requests/adapters.py", line 449, in send
File "site-packages/urllib3/connectionpool.py", line 727, in urlopen
File "site-packages/urllib3/util/retry.py", line 403, in increment
File "site-packages/urllib3/packages/six.py", line 734, in reraise
File "site-packages/urllib3/connectionpool.py", line 677, in urlopen
File "site-packages/urllib3/connectionpool.py", line 392, in _make_request
File "http/client.py", line 1252, in request
File "http/client.py", line 1298, in _send_request
File "http/client.py", line 1247, in endheaders
File "http/client.py", line 1026, in _send_output
File "http/client.py", line 966, in send
File "site-packages/docker/transport/unixconn.py", line 43, in connect
urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionRefusedError(61, 'Connection refused'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "site-packages/docker/api/client.py", line 205, in _retrieve_server_version
File "site-packages/docker/api/daemon.py", line 181, in version
File "site-packages/docker/utils/decorators.py", line 46, in inner
File "site-packages/docker/api/client.py", line 228, in _get
File "site-packages/requests/sessions.py", line 543, in get
File "site-packages/requests/sessions.py", line 530, in request
File "site-packages/requests/sessions.py", line 643, in send
File "site-packages/requests/adapters.py", line 498, in send
requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionRefusedError(61, 'Connection refused'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "docker-compose", line 3, in <module>
File "compose/cli/main.py", line 67, in main
File "compose/cli/main.py", line 123, in perform_command
File "compose/cli/command.py", line 69, in project_from_options
File "compose/cli/command.py", line 132, in get_project
File "compose/cli/docker_client.py", line 43, in get_client
File "compose/cli/docker_client.py", line 170, in docker_client
File "site-packages/docker/api/client.py", line 188, in __init__
File "site-packages/docker/api/client.py", line 213, in _retrieve_server_version
docker.errors.DockerException: Error while fetching server API version: ('Connection aborted.', ConnectionRefusedError(61, 'Connection refused'))
[1269] Failed to execute script docker-compose
Connecting to remote db's are not broken somehow, they work. Is there anyone came across this problem?
After Big Sur upgrade, I also had a warning whenever I open a new terminal:
zsh compinit: insecure directories, run compaudit for list.
Ignore insecure directories and continue [y] or abort compinit [n]?
I did not think they are related but the solution to this problem, explained in this thread, also solved the main postgresql connection issue for me. But my computer keeps restarting occasionally and after this restart, I again get the main problem when I run docker-compose up inside IDE's terminal. I then manually restart and it works. Although not being a permanent soluiton, this solved my problem for now.

docker-compose up returns OSError: Can not read file in context: .../data/mmaps/5332641.mmtile

Followed the instructions from here: http://www.azerothcore.org/wiki/Install-with-Docker
I used the v8 data
When I run docker-compose up I get the following:
Building ac-worldserver
Traceback (most recent call last):
File "site-packages/docker/utils/build.py", line 97, in create_archive
File "tarfile.py", line 1972, in addfile
File "tarfile.py", line 250, in copyfileobj
File "tempfile.py", line 481, in func_wrapper
OSError: [Errno 28] No space left on device
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "bin/docker-compose", line 6, in <module>
File "compose/cli/main.py", line 72, in main
File "compose/cli/main.py", line 128, in perform_command
File "compose/cli/main.py", line 1077, in up
File "compose/cli/main.py", line 1073, in up
File "compose/project.py", line 548, in up
File "compose/service.py", line 367, in ensure_image_exists
File "compose/service.py", line 1106, in build
File "site-packages/docker/api/build.py", line 160, in build
File "site-packages/docker/utils/build.py", line 31, in tar
File "site-packages/docker/utils/build.py", line 100, in create_archive
OSError: Can not read file in context: /home/azerothcore/wotlk/azerothcore-wotlk/docker/worldserver/data/mmaps/5332641.mmtile
[21981] Failed to execute script docker-compose
It is likely disc space related, i had same error and there is an error above it that indicates the build ran out of disc space. Works after clearing space it uses over 10gb in my case.
I had the same error when I tried to mount a large file. The solution for me was to create a .dockerignore file containing the name of the directory where the large file was saved.

Librabbitmq 2.0.0 with Python 3 gives TypeError: can't pickle memoryview objects

I am using the latest master branch of the git repo https://github.com/celery/librabbitmq and installing librabbitmq==2.0.0 for Python 3.6 by following the instructions in the readme
Using the development version
You can clone the repository by doing the following:
$ git clone git://github.com/celery/librabbitmq.git
Then install it by doing the following:
$ cd librabbitmq
$ make install # or make develop
This works fine (after installing certain binaries for c compliation in the OS), but when I then make a small a+b add task and call it with add.delay(2,2) it fails with the following error. I looked up and saw that Celery 4 uses json as serializer, so clearly it is not because if pickle serialization
Changing from librabbitmq to pyamqp broker works normally
Same exact situation in both MacOS and Ubuntu 16
[2018-04-30 23:40:02,956: CRITICAL/MainProcess] Unrecoverable error:
SystemError(' returned a result with an error set',) Traceback (most
recent call last): File
"/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/kombu/messaging.py",
line 624, in _receive_callback
return on_m(message) if on_m else self.receive(decoded, message) File
"/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/celery/worker/consumer/consumer.py",
line 570, in on_task_received
callbacks, File "/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/celery/worker/strategy.py",
line 145, in task_message_handler
handle(req) File "/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/celery/worker/worker.py",
line 221, in _process_task_sem
return self._quick_acquire(self._process_task, req) File "/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/kombu/async/semaphore.py",
line 62, in acquire
callback(*partial_args, **partial_kwargs) File "/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/celery/worker/worker.py",
line 226, in _process_task
req.execute_using_pool(self.pool) File "/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/celery/worker/request.py",
line 531, in execute_using_pool
correlation_id=task_id, File "/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/celery/concurrency/base.py",
line 155, in apply_async
**options) File "/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/billiard/pool.py",
line 1486, in apply_async
self._quick_put((TASK, (result._job, None, func, args, kwds))) File
"/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/celery/concurrency/asynpool.py",
line 813, in send_job
body = dumps(tup, protocol=protocol) TypeError: can't pickle memoryview objects
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File
"/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/celery/worker/worker.py",
line 203, in start
self.blueprint.start(self) File "/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/celery/bootsteps.py",
line 119, in start
step.start(parent) File "/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/celery/bootsteps.py",
line 370, in start
return self.obj.start() File "/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/celery/worker/consumer/consumer.py",
line 320, in start
blueprint.start(self) File "/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/celery/bootsteps.py",
line 119, in start
step.start(parent) File "/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/celery/worker/consumer/consumer.py",
line 596, in start
c.loop(*c.loop_args()) File "/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/celery/worker/loops.py",
line 88, in asynloop
next(loop) File "/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/kombu/async/hub.py",
line 354, in create_loop
cb(*cbargs) File "/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/kombu/transport/base.py",
line 236, in on_readable
reader(loop) File "/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/kombu/transport/base.py",
line 218, in _read
drain_events(timeout=0) File "/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/librabbitmq-2.0.0-py3.6-macosx-10.6-intel.egg/librabbitmq/init.py",
line 227, in drain_events
self._basic_recv(timeout) SystemError: returned a result with an error set
This library is not recommended to use as rabbitmq broker with celery. Instead please try py-amqp. this is more maintained and less buggy.

Archlinux: obmenu won't start

I'm on openbox at Arch Linux and recently installed my system.
I want to use obmenu to configure the menu.
But for some reason, it is not working.
Error at startup:
Traceback (most recent call last):
File "/usr/bin/obmenu", line 582, in <module>
app.init()
File "/usr/bin/obmenu", line 489, in init
self.menu.loadMenu(self.menu_path)
File "/usr/lib/python2.7/site-packages/obxml.py", line 153, in loadMenu
self.dom = xml.dom.minidom.parseString(fil.read())
File "/usr/lib/python2.7/xml/dom/minidom.py", line 1928, in parseString
return expatbuilder.parseString(string)
File "/usr/lib/python2.7/xml/dom/expatbuilder.py", line 940, in parseString
return builder.parseString(string)
File "/usr/lib/python2.7/xml/dom/expatbuilder.py", line 223, in parseString
parser.Parse(string, True)
xml.parsers.expat.ExpatError: not well-formed (invalid token): line 167, column 27
What is going wrong?
I already solved it. My menu contained an Formatting Mistake!
First you have to remove
rm ~/.config/openbox/menu.xml
and then
cp /etc/xdg/openbox/menu.xml ~/.config/openbox
after that obmenu will work.
Look at the http://obmenu.sourceforge.net/doc.html.
The problem is that you have menu.xml which does't have correct syntax. Evan empty file is wrong.

socket.gaierror in Google Data Python lib code

I'm trying to execute this basic code from Getting Started with Google data:
`import gdata.docs.service
# Create a client class which will make HTTP requests with Google Docs server.
client = gdata.docs.service.DocsService()
# Authenticate using your Google Docs email address and password.
client.ClientLogin('jo#gmail.com', 'password')
# Query the server for an Atom feed containing a list of your documents.
documents_feed = client.GetDocumentListFeed()
# Loop through the feed and extract each document entry.
for document_entry in documents_feed.entry:
# Display the title of the document on the command line.
print document_entry.title.text`
The third line i.e. client.ClientLogin('myemail-id', 'my-password') is throwing an error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/gdata/service.py", line 834, in ClientLogin
self.ProgrammaticLogin(captcha_token, captcha_response)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/gdata/service.py", line 771, in ProgrammaticLogin
headers={'Content-Type':'application/x-www-form-urlencoded'})
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/atom/http.py", line 163, in request
connection.endheaders()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 951, in endheaders
self._send_output(message_body)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 811, in _send_output
self.send(msg)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 773, in send
self.connect()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1154, in connect
self.timeout, self.source_address)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 553, in create_connection
for res in getaddrinfo(host, port, 0, SOCK_STREAM):
socket.gaierror: [Errno 8] nodename nor servname provided, or not known
Could you help me understand what this error is about and also how to work around this?