Project

Profile

Help

Issue #2809

Logging fails in case of non-ascii characters in the url

Added by ehalcik over 4 years ago. Updated 8 months ago.

Status:
CLOSED - WONTFIX
Priority:
Low
Assignee:
-
Start date:
Due date:
Estimated time:
Severity:
1. Low
Version - Nectar:
Platform Release:
Target Release - Nectar:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

i have a repo defined as :

pulp-admin rpm repo create --repo-id=oel-addons-x86_64-6 --feed=http://yum.oracle.com/​repo/​OracleLinux/​OL6/​addons/​x86_64/  --relative-url=addons/oel/x86_64/6 --description "oel-addons-x86_64-6" --serve-http=true

Issuing the command pulp-admin rpm repo sync run --repo-id=oel-addons-x86_64-6 results in this error.

Task Failed

'ascii' codec can't decode byte 0xc3 in position 48: ordinal not in range(128)

/var/log/messages says this:

pulp: celery.worker.job:ERROR: (14295-74720) Task pulp.server.managers.repo.sync.sync[7f04fd3b-d2d8-4b8b-ad1a-f30816a6e095] raised unexpected: UnicodeDecodeError('ascii', 'Downloading metadata from http://yum.oracle.com/\xc3\xa2\xc2\x80\xc2\x8brepo/\xc3\xa2\xc2\x80\xc2\x8bOracleLinux/\xc3\xa2\xc2\x80\xc2\x8bOL6/\xc3\xa2\xc2\x80\xc2\x8baddons/\xc3\xa2\xc2\x80\xc2\x8bx86_64/.', 48, 49, 'ordinal not in range(128)')

My other repos sync just fine.

History

#1 Updated by bmbouter over 4 years ago

  • Description updated (diff)

Add some escaping to the description.

#2 Updated by bmbouter over 4 years ago

I was able to reproduce this from the commands in the ticket. Here is the traceback I received.

nectar.downloaders.threaded:ERROR: (14604-28416) 'ascii' codec can't encode characters in position 22-24: ordinal not in range(128) 
nectar.downloaders.threaded:ERROR: (14604-28416) Traceback (most recent call last):
nectar.downloaders.threaded:ERROR: (14604-28416)   File "/usr/lib/python2.7/site-packages/nectar/downloaders/threaded.py", line 267, in _fetch
nectar.downloaders.threaded:ERROR: (14604-28416)     _logger.debug("Attempting to connect to {url}.".format(url=request.url)) 
nectar.downloaders.threaded:ERROR: (14604-28416) UnicodeEncodeError: 'ascii' codec can't encode characters in position 22-24: ordinal not in range(128) 
nectar.downloaders.threaded:ERROR: [246f51cc] (14604-42720) 'ascii' codec can't encode characters in position 22-24: ordinal not in range(128) 
nectar.downloaders.threaded:ERROR: [246f51cc] (14604-42720) Traceback (most recent call last):
nectar.downloaders.threaded:ERROR: [246f51cc] (14604-42720)   File "/usr/lib/python2.7/site-packages/nectar/downloaders/threaded.py", line 267, in _fetch
nectar.downloaders.threaded:ERROR: [246f51cc] (14604-42720)     _logger.debug("Attempting to connect to {url}.".format(url=request.url))
nectar.downloaders.threaded:ERROR: [246f51cc] (14604-42720) UnicodeEncodeError: 'ascii' codec can't encode characters in position 22-24: ordinal not in range(128)
nectar.downloaders.threaded:ERROR: (14604-28416) 'ascii' codec can't encode characters in position 22-24: ordinal not in range(128)
nectar.downloaders.threaded:ERROR: (14604-28416) Traceback (most recent call last):
nectar.downloaders.threaded:ERROR: (14604-28416)   File "/usr/lib/python2.7/site-packages/nectar/downloaders/threaded.py", line 267, in _fetch
nectar.downloaders.threaded:ERROR: (14604-28416)     _logger.debug("Attempting to connect to {url}.".format(url=request.url))
nectar.downloaders.threaded:ERROR: (14604-28416) UnicodeEncodeError: 'ascii' codec can't encode characters in position 22-24: ordinal not in range(128)
nectar.downloaders.threaded:ERROR: [246f51cc] (14604-42720) 'ascii' codec can't encode characters in position 22-24: ordinal not in range(128)
nectar.downloaders.threaded:ERROR: [246f51cc] (14604-42720) Traceback (most recent call last):
nectar.downloaders.threaded:ERROR: [246f51cc] (14604-42720)   File "/usr/lib/python2.7/site-packages/nectar/downloaders/threaded.py", line 267, in _fetch
nectar.downloaders.threaded:ERROR: [246f51cc] (14604-42720)     _logger.debug("Attempting to connect to {url}.".format(url=request.url))
nectar.downloaders.threaded:ERROR: [246f51cc] (14604-42720) UnicodeEncodeError: 'ascii' codec can't encode characters in position 22-24: ordinal not in range(128)
nectar.downloaders.threaded:ERROR: (14604-35712) 'ascii' codec can't encode characters in position 22-24: ordinal not in range(128)
nectar.downloaders.threaded:ERROR: (14604-35712) Traceback (most recent call last):
nectar.downloaders.threaded:ERROR: (14604-35712)   File "/usr/lib/python2.7/site-packages/nectar/downloaders/threaded.py", line 267, in _fetch
nectar.downloaders.threaded:ERROR: (14604-35712)     _logger.debug("Attempting to connect to {url}.".format(url=request.url))
nectar.downloaders.threaded:ERROR: (14604-35712) UnicodeEncodeError: 'ascii' codec can't encode characters in position 22-24: ordinal not in range(128)
nectar.downloaders.threaded:ERROR: [246f51cc] (14604-42720) 'ascii' codec can't encode characters in position 22-24: ordinal not in range(128)
nectar.downloaders.threaded:ERROR: [246f51cc] (14604-42720) Traceback (most recent call last):
nectar.downloaders.threaded:ERROR: [246f51cc] (14604-42720)   File "/usr/lib/python2.7/site-packages/nectar/downloaders/threaded.py", line 267, in _fetch
nectar.downloaders.threaded:ERROR: [246f51cc] (14604-42720)     _logger.debug("Attempting to connect to {url}.".format(url=request.url))
nectar.downloaders.threaded:ERROR: [246f51cc] (14604-42720) UnicodeEncodeError: 'ascii' codec can't encode characters in position 22-24: ordinal not in range(128)
nectar.downloaders.threaded:ERROR: (14604-28416) 'ascii' codec can't encode characters in position 22-24: ordinal not in range(128)
nectar.downloaders.threaded:ERROR: (14604-28416) Traceback (most recent call last):
nectar.downloaders.threaded:ERROR: (14604-28416)   File "/usr/lib/python2.7/site-packages/nectar/downloaders/threaded.py", line 267, in _fetch
nectar.downloaders.threaded:ERROR: (14604-28416)     _logger.debug("Attempting to connect to {url}.".format(url=request.url)) 
nectar.downloaders.threaded:ERROR: (14604-28416) UnicodeEncodeError: 'ascii' codec can't encode characters in position 22-24: ordinal not in range(128)
pulp_rpm.plugins.importers.yum.sync:INFO: [246f51cc] Downloading additional units.
nectar.downloaders.threaded:ERROR: (14604-35712) 'ascii' codec can't encode characters in position 22-24: ordinal not in range(128) 
nectar.downloaders.threaded:ERROR: (14604-35712) Traceback (most recent call last):
nectar.downloaders.threaded:ERROR: (14604-35712)   File "/usr/lib/python2.7/site-packages/nectar/downloaders/threaded.py", line 267, in _fetch
nectar.downloaders.threaded:ERROR: (14604-35712)     _logger.debug("Attempting to connect to {url}.".format(url=request.url)) 
nectar.downloaders.threaded:ERROR: (14604-35712) UnicodeEncodeError: 'ascii' codec can't encode characters in position 22-24: ordinal not in range(128) 
nectar.downloaders.threaded:ERROR: (14604-28416) 'ascii' codec can't encode characters in position 22-24: ordinal not in range(128)
nectar.downloaders.threaded:ERROR: (14604-28416) Traceback (most recent call last):
nectar.downloaders.threaded:ERROR: (14604-28416)   File "/usr/lib/python2.7/site-packages/nectar/downloaders/threaded.py", line 267, in _fetch
nectar.downloaders.threaded:ERROR: (14604-28416)     _logger.debug("Attempting to connect to {url}.".format(url=request.url))
nectar.downloaders.threaded:ERROR: (14604-28416) UnicodeEncodeError: 'ascii' codec can't encode characters in position 22-24: ordinal not in range(128)

#3 Updated by bizhang over 4 years ago

  • Tags deleted (Pulp 3)

#4 Updated by ttereshc over 4 years ago

@ehalcik, the issue is in the encoding of the url which was provided to pulp I guess.
You can see that there are some additional characters in url:

$ od -a 
http://yum.oracle.com/​repo/​OracleLinux/​OL6/​addons/​x86_64/
0000000   h   t   t   p   :   /   /   y   u   m   .   o   r   a   c   l
0000020   e   .   c   o   m   /   b nul  vt   r   e   p   o   /   b nul
0000040  vt   O   r   a   c   l   e   L   i   n   u   x   /   b nul  vt
0000060   O   L   6   /   b nul  vt   a   d   d   o   n   s   /   b nul

You can update your repo with a proper feed (without any additional characters), just copy-paste this:

pulp-admin rpm repo update --feed http://yum.oracle.com/repo/OracleLinux/OL6/addons/x86_64/ --repo-id oel-addons-x86_64-6

To double-check this ^ url:

$ od -a 
http://yum.oracle.com/repo/OracleLinux/OL6/addons/x86_64/
0000000   h   t   t   p   :   /   /   y   u   m   .   o   r   a   c   l
0000020   e   .   c   o   m   /   r   e   p   o   /   O   r   a   c   l
0000040   e   L   i   n   u   x   /   O   L   6   /   a   d   d   o   n

Then re-sync, it works for me.

#5 Updated by ehalcik over 4 years ago

Thank you ! I'll watch for the additional characters next time .. This is now working for me

#6 Updated by ttereshc over 4 years ago

  • Project changed from Pulp to Nectar
  • Subject changed from getting an error "'ascii' codec can't decode byte 0xc3 in position 48: ordinal not in range(128)" when syncing a repository to Logging fails in case of non-ascii characters in the url
  • Category deleted (15)
  • Priority changed from Normal to Low
  • Severity changed from 2. Medium to 1. Low
  • Triaged changed from No to Yes

#8 Updated by ericbanaa19 over 2 years ago

  • File screenshot_1_1554358461.png added
  • File screenshot_2_1554358543.png added
  • File screenshot_3_1554358636.png added

#9 Updated by mandyangelica over 2 years ago

  • File screenshot_1_1554378245.png added
  • File screenshot_2_1554378265.png added

#10 Updated by tahminakhan over 2 years ago

  • File screenshot_5_1554841989.png added

#11 Updated by bmbouter over 2 years ago

  • Status changed from NEW to CLOSED - WONTFIX

#12 Updated by bmbouter over 2 years ago

Pulp 2 is approaching maintenance mode, and this Pulp 2 ticket is not being actively worked on. As such, it is being closed as WONTFIX. Pulp 2 is still accepting contributions though, so if you want to contribute a fix for this ticket, please reopen or comment on it. If you don't have permissions to reopen this ticket, or you want to discuss an issue, please reach out via the developer mailing list.

#13 Updated by bmbouter over 2 years ago

  • Tags Pulp 2 added

#14 Updated by carpetcleaningmelbourne over 2 years ago

  • File clipboard-201905141432-3w6vb.png added
  • File clipboard-201905141433-ddzho.png added

#15 Updated by melbournecentralcleaning over 2 years ago

  • File clipboard-201905201408-6nexq.png added

#16 Updated by carpetcleaningau over 2 years ago

  • File clipboard-201905291558-tqtbq.png added

#17 Updated by casparlee about 2 years ago

  • File clipboard-201906261617-5fuqe.png added
  • File clipboard-201906261618-qfsmc.png added

#18 Updated by finestediting about 2 years ago

  • File clipboard-201909041050-d0pft.png added

#19 Updated by sellyourcar almost 2 years ago

  • File clipboard-201909281152-uvmts.png added

#20 Updated by denzelpaul05 almost 2 years ago

  • File clipboard-201910031538-pqp4r.png added

#21 Updated by riyanshaikh almost 2 years ago

  • File clipboard-201910231549-wpaxs.png added
  • File clipboard-201910231549-opngk.png added

#22 Updated by smithdaisy443 almost 2 years ago

  • File clipboard-201911021809-hgohx.png added
  • File clipboard-201911021809-mwkgb.png added
  • File clipboard-201911021810-mgzce.png added

#23 Updated by romandavis almost 2 years ago

  • File clipboard-201912021239-jwosx.png added
  • File line-editor-in-her-office.jpg added

#24 Updated by bmbouter almost 2 years ago

  • File deleted (screenshot_1_1554358461.png)

#25 Updated by bmbouter almost 2 years ago

  • File deleted (screenshot_2_1554358543.png)

#26 Updated by bmbouter almost 2 years ago

  • File deleted (screenshot_3_1554358636.png)

#27 Updated by Anonymous over 1 year ago

  • File best1cleaning logo.jpg added

#28 Updated by ggainey 7 months ago

  • File deleted (best1cleaning logo.jpg)

#29 Updated by ggainey 7 months ago

  • File deleted (screenshot_1_1554378245.png)

#30 Updated by ggainey 7 months ago

  • File deleted (screenshot_2_1554378265.png)

#31 Updated by ggainey 7 months ago

  • File deleted (screenshot_5_1554841989.png)

#32 Updated by ggainey 7 months ago

  • File deleted (clipboard-201905141432-3w6vb.png)

#33 Updated by ggainey 7 months ago

  • File deleted (clipboard-201905141433-ddzho.png)

#34 Updated by ggainey 7 months ago

  • File deleted (clipboard-201905201408-6nexq.png)

#35 Updated by ggainey 7 months ago

  • File deleted (clipboard-201905291558-tqtbq.png)

#36 Updated by ggainey 7 months ago

  • File deleted (clipboard-201906261617-5fuqe.png)

#37 Updated by ggainey 7 months ago

  • File deleted (clipboard-201906261618-qfsmc.png)

#38 Updated by ggainey 7 months ago

  • File deleted (clipboard-201909041050-d0pft.png)

#39 Updated by ggainey 7 months ago

  • File deleted (clipboard-201909281152-uvmts.png)

#40 Updated by ggainey 7 months ago

  • File deleted (clipboard-201910031538-pqp4r.png)

#41 Updated by ggainey 7 months ago

  • File deleted (clipboard-201910231549-wpaxs.png)

#42 Updated by ggainey 7 months ago

  • File deleted (clipboard-201910231549-opngk.png)

#43 Updated by ggainey 7 months ago

  • File deleted (clipboard-201911021809-hgohx.png)

#44 Updated by ggainey 7 months ago

  • File deleted (clipboard-201911021809-mwkgb.png)

#45 Updated by ggainey 7 months ago

  • File deleted (clipboard-201911021810-mgzce.png)

#46 Updated by ggainey 7 months ago

  • File deleted (clipboard-201912021239-jwosx.png)

#47 Updated by ggainey 7 months ago

  • File deleted (line-editor-in-her-office.jpg)

Please register to edit this issue

Also available in: Atom PDF