Bug 781298 - Sending smolt profile from CentOS 6.x fails with a pycurl error
Summary: Sending smolt profile from CentOS 6.x fails with a pycurl error
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: smolt
Version: el6
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Will Woods
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-01-13 08:37 UTC by Răzvan Sandu
Modified: 2016-07-20 12:18 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-20 12:18:23 UTC
Type: ---


Attachments (Terms of Use)

Description Răzvan Sandu 2012-01-13 08:37:51 UTC
Hello,

Description of problem:

As of January 13, 2012, smolt fails to send profile from CentOS 6.x machines.

smoltSendProfile gives (on many hosts):


Error contacting Server: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 417"
Could not send - Exiting


(probably a server problem or wrong link...)


Version-Release number of selected component (if applicable):
smolt-1.4.2.2-8.el6.noarch
(on CentOS 6.0, kernel-2.6.32-131.17.1.el6.x86_64)

How reproducible:
Always.

Steps to Reproduce:
1. Install latest CentOS 6.x
2. Install official EPEL repo, via official rpm
3. Install latest smolt from EPEL
  
Actual results:
Sending smolt profile fails with the mentioned error.

Expected results:
smolt should send profile correctly.

Additional info:
It's very likely that this problem is general to smolt on CentOS 6.x, given the fact that no CentOS 6.x machine appears in the statistics on smolt's website as of January, 2012.

Comment 1 Fewt 2012-02-14 18:39:48 UTC
This problem also occurs on Fuduntu.

Error contacting Server: [Errno 14] HTTP Error 417 : http://www.smolts.org/client/add_json 
Could not send - Exiting

Comment 2 Chad Feller 2012-04-07 21:51:04 UTC
I noticed that this stopped working on my RHEL6 boxes as well, but still works on my RHEL5 boxes.  Looking at one of my boxes:

  http://smolts.org/client/show/?uuid=pub_c8aef5e1-d3a5-4af4-93fc-2ef94037a9f9

looks like it last updated on 2011-12-06.  So whatever broke, broke shortly after that it seems.

Comment 3 pasqual milvaques 2012-05-02 07:57:54 UTC
the smolt version included in my centos 6.2 is smolt-1.4.2.2. I have taken a look at the application in https://fedorahosted.org/releases/s/m/smolt/ and there is a new version (1.4.3) in which the code lines which are crashing (smolt.py: o = grabber.urlopen(urljoin(...) have been rewritten using the urllib2 python library

I have tried running the tarball in my system but it seems that the installed python version doesn't match the requirements for python 1.4.3. so to try this solution and adaptation of the code of smolt-1.4.3 or some tweaking of the python runtime must be done. I don't remember the python version of my fedora box at this moment in which smolt 1.4.3 is running perfectly

the problem could't be also related to the server as the 417 error as is defined here:
http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html

implies a problem in the dialog between client and server

I have have found a quick workaround here:
http://blackslot.com/blog/2009/12/solucion-al-error-http1-1-417-expectation-failed-connection-close-content-length-0-en-php-con-curl/

in smolt.py change this lines:
        try:
            o = grabber.urlopen(urljoin(smoonURL + "/", "/client/add_json", False), data=send_host_str,
                                http_headers=(
                            ('Content-length', '%i' % len(send_host_str)),
                            ('Content-type', 'application/x-www-form-urlencoded')))

for this:
        try:
            o = grabber.urlopen(urljoin(smoonURL + "/", "/client/add_json", False), data=send_host_str,
                                http_headers=(
                            ('Content-length', '%i' % len(send_host_str)),
                            ('Expect', ''),
                            ('Content-type', 'application/x-www-form-urlencoded')))

before testing remember to rename the smolt.pyc and smolt.pyo files so you assure to be using the interpreted version of the software in smolt.py. after that ideally you can compile smolt.py to achieve a bit more speed but I don't know how to do it at this moment

I hope this helps

Comment 4 Fabien Archambault 2012-06-26 12:49:12 UTC
Same here. Please update EPEL repo.

Comment 5 Răzvan Sandu 2012-09-21 12:01:54 UTC
Hello,

I think statistics at http://smolts.org is wildly wrong because a large class of machines are not reporting now (because of this bug). Would you please update the EPEL repo (we only use officially Fedora/RedHat/CentOS packaged software on production machines)...?

Regards, Răzvan


Note You need to log in before you can comment on or make changes to this bug.