ERROR - HTTP connection error Traceback (most recent call last): #893
Labels
No Label
bug
build
dependencies
developers
documentation
duplicate
enhancement
formatting
invalid
legal
mobile
obsolete
packaging
performance
protocol
question
refactoring
regression
security
test
translation
usability
wontfix
No Milestone
No project
No Assignees
1 Participants
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Bitmessage/PyBitmessage-2024-12-07#893
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
here's the whole error & warning stack trace
` bitmsg
Loading existing config files from /home/roberto/.config/PyBitmessage/
Failed to load debug config from /home/roberto/.config/PyBitmessage/logging.dat, using default logging config
(<class 'ConfigParser.NoSectionError'>, No section: 'formatters', <traceback object at 0x7ff0d35f0560>)
/home/roberto/bin/PyBitmessage/src/bitmessageqt/init.py:4: PyGIWarning: MessagingMenu was imported without specifying a version first. Use gi.require_version('MessagingMenu', '1.0') before import to ensure that the right version gets loaded.
from gi.repository import MessagingMenu
/home/roberto/bin/PyBitmessage/src/bitmessageqt/init.py:5: PyGIWarning: Notify was imported without specifying a version first. Use gi.require_version('Notify', '0.7') before import to ensure that the right version gets loaded.
from gi.repository import Notify
Info: we could not tell whether your OS is limited to having very few half open connections because we couldn't interpret the platform version. Don't worry; we'll assume that it is not limited. This tends to occur on Raspberry Pis. : invalid version number '#53-Ubuntu SMP Wed Jul 27 16:06:39 UTC 2016'
2016-08-26 10:03:01,055 - ERROR - HTTP connection error
Traceback (most recent call last):
File "/home/roberto/bin/PyBitmessage/src/namecoin.py", line 203, in queryHTTP
self.con.endheaders()
File "/usr/lib/python2.7/httplib.py", line 1053, in endheaders
self._send_output(message_body)
File "/usr/lib/python2.7/httplib.py", line 897, in _send_output
self.send(msg)
File "/usr/lib/python2.7/httplib.py", line 859, in send
self.connect()
File "/usr/lib/python2.7/httplib.py", line 836, in connect
self.timeout, self.source_address)
File "/usr/lib/python2.7/socket.py", line 575, in create_connection
raise err
error: [Errno 111] Connection refused
2016-08-26 10:03:01,056 - ERROR - Namecoin connection test failure
Traceback (most recent call last):
File "/home/roberto/bin/PyBitmessage/src/namecoin.py", line 134, in test
res = self.callRPC ("getinfo", [])
File "/home/roberto/bin/PyBitmessage/src/namecoin.py", line 173, in callRPC
val = json.loads (resp)
File "/usr/lib/python2.7/json/init.py", line 339, in loads
return _default_decoder.decode(s)
File "/usr/lib/python2.7/json/decoder.py", line 364, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
TypeError: expected string or buffer
** (python2.7:6998): WARNING **: could not find the desktop file for 'pybitmessage.desktop'
2016-08-26 10:03:22,809 - ERROR - Timeout occurred waiting for data from Peer(host='138.68.6.15', port=8444). Closing receiveData thread. (ID: 140672010506064)
2016-08-26 10:03:26,643 - ERROR - Timeout occurred waiting for data from Peer(host='217.157.137.157', port=8444). Closing receiveData thread. (ID: 140671252176720)
2016-08-26 10:03:34,171 - ERROR - sock.recv error. Closing receiveData thread (Peer(host='91.20.251.200', port=8444), Thread ID: 140672010503952).2/The operation did not complete (read) (_ssl.c:1754)
2016-08-26 10:03:48,127 - ERROR - Timeout occurred waiting for data from Peer(host='50.116.53.12', port=8444). Closing receiveData thread. (ID: 140669104931856)
^C2016-08-26 10:03:54,588 - ERROR - Got signal 2
Unfortunately you cannot use Ctrl+C when running the UI because the UI captures the signal.
Cleaning up lockfile
`
I didn't find the first 2 warnings in FAQ (importing without verision) however the error seems to be some network issue. I terminated the client
I think the exception handlers should be removed from queryHTTP; they don't do anything other than log and eat the exceptions. Seeing as how queryHTTP is only called by callRPC and callRPC is always called within try...except that actually does more than log exceptions, it is safe to let any exceptions from queryHTTP propagate (as was the behavior before the recent fixes).
Thanks @bmng-dev, I'll do a review of the error message severity during the 0.6.2 cycle.
@roberto68, most of these "errors" are informative and mean that certain functionality is disabled.
Purely informative.
Informative, it means that you do not have a custom logger setup so it will use the default settings.
I personally haven't seen this one, it is probably something specific to your window manager. It complains about the notifications (the bubbles that appear when you receive a new message). It looks like you're using Ubuntu, which version, server/desktop, architecture?
This is also informative, it tells you that it doesn't think you're running Windows XP and even though it isn't sure, it will assume you're not.
This means that it cannot connect to your namecoind, so it will not enable namecoin functionality.
This means it can't find the file for your window manager or something like that, I actually need to investigate why it's doing this because I sometimes see it too.
These are network connectivity issues in the P2P network which are normal during operation. The SSL errors worry me a bit, I also sometimes see them, so I'll investigate this. In the worst case it would mean your network connectivity is suboptimal, it still works in general.
In The Python GTK+ 3 Tutorial, 2.1 A Simple Example there is the suggestion that gi (GObject Introspection?) recognises multiple versions of the same components may be on a system so it seems like a good idea to specify the version. The warning seems to be trying to educate developers on the correct way to use the gi library so doing what it says should remove the warning. The only question is what the minimum versions are that PyBitmessage expects however the suggested versions should do until there are complaints about the notifications no longer working.
The SSLSocket.do_handshake() loop isn't implemented properly which can cause a variety of errors from _ssl.c. The loop appears based on pre-2.7.9 documentation for SSLSocket.do_handshake() but differs in that SSL_ERROR_WANT_WRITE doesn't continue the loop. I also suspect that if the handshake fails for any other reason then the socket should be unwrapped (which performs the SSL shutdown handshake) so the connection can continue in the clear as the intent of the code appears to be.
I think it is about time this be fixed. Many users reporting errors have been concerned over this message. A simple rearrangement of the offending function
isOurOperatingSystemLimitedToHavingVeryFewHalfOpenConnections()
to check whethersys.platform
is windows before trying to parseplatform.version()
would eliminate this message. It should be quite obvious by now that for many if not all linux distrosplatform.version()
returns something similar to#1 SMP Debian 3.16.7-ckt25-2+deb8u3 (2016-07-02)
. Here's my suggestion for improving this silly function which will affectconnectToStream()
:Thank you @bmng-dev.
Re gi: According to my tests, the require_version specifies the only, not minimal, version required. That being said, a cursory search makes me believe that versions lower than 1.0 / 0.7 wouldn't work anyway, so I'll specify those.
Re ssl: thanks, that would explain it, I'll fix it.
Re connection limit: thanks as well, I'll review that.
This is caused by MessagingMenu not finding Bitmessage in the list of apps. Copy the
desktop/pybitmessage.desktop
into~/.local/share/applications/pybitmessage.desktop
to get rid of the warning. It should then also appear in your messaging menu next to Thunderbird/Evolution/Jabber/whatever you have. I'll keep this open so that the installation can be fixed in the future.Apart from the location of the desktop file, all other things were fixed: the error reporting is improved and the SSL handshake was also fixed. I'm not unwrapping it, but I'm closing it instead if the handshake fails. The reason the handshake failed wasn't the handling of WANT_WRITE, but an error in thread sychronisation: two threads were trying to write to the socket at the same time, resulting in garbage and the connection failed or timed out. The desktop file I'll look at later.
This looks outdated.