Issue #2251
closedError on sync: sequence item 0: expected string, NoneType found
Description
Hi,
since some days, pulp is unable to sync repo with upstream. We have multiple repos across RHEL, Centos and 3rd Party repos like foreman.
Error:
[root@pulp1 ~]# pulp-admin -vvv rpm repo sync run --repo-id centos-7-1-base
+----------------------------------------------------------------------+
Synchronizing Repository [centos-7-1-base]
+----------------------------------------------------------------------+
2016-09-13 11:41:50,428 - DEBUG - sending POST request to /pulp/api/v2/tasks/search/
2016-09-13 11:41:50,547 - INFO - POST request to /pulp/api/v2/tasks/search/ with parameters {"criteria": {"filters": {"state": {"$nin": ["finished", "error", "canceled", "skipped"]}, "tags": {"$all": ["pulp:repository:centos-7-1-base", "pulp:action:sync"]}}}}
2016-09-13 11:41:50,548 - INFO - Response status : 200
2016-09-13 11:41:50,548 - INFO - Response body :
[]
2016-09-13 11:41:50,548 - DEBUG - sending POST request to /pulp/api/v2/repositories/centos-7-1-base/actions/sync/
2016-09-13 11:41:50,704 - INFO - POST request to /pulp/api/v2/repositories/centos-7-1-base/actions/sync/ with parameters {"override_config": null}
2016-09-13 11:41:50,705 - INFO - Response status : 202
2016-09-13 11:41:50,705 - INFO - Response body :
{
"spawned_tasks": [
{
"_href": "/pulp/api/v2/tasks/2c21f8a0-6a10-4837-bb83-0d98504dc498/",
"task_id": "2c21f8a0-6a10-4837-bb83-0d98504dc498"
}
],
"result": null,
"error": null
}
This command may be exited via ctrl+c without affecting the request.
2016-09-13 11:41:51,707 - DEBUG - sending GET request to /pulp/api/v2/tasks/2c21f8a0-6a10-4837-bb83-0d98504dc498/
2016-09-13 11:41:51,840 - INFO - GET request to /pulp/api/v2/tasks/2c21f8a0-6a10-4837-bb83-0d98504dc498/ with parameters None
2016-09-13 11:41:51,840 - INFO - Response status : 200
2016-09-13 11:41:51,841 - INFO - Response body :
{
"exception": null,
"task_type": "pulp.server.managers.repo.sync.sync",
"_href": "/pulp/api/v2/tasks/2c21f8a0-6a10-4837-bb83-0d98504dc498/",
"task_id": "2c21f8a0-6a10-4837-bb83-0d98504dc498",
"tags": [
"pulp:repository:centos-7-1-base",
"pulp:action:sync"
],
"finish_time": "2016-09-13T09:41:50Z",
"_ns": "task_status",
"start_time": "2016-09-13T09:41:50Z",
"traceback": "Traceback (most recent call last):\n File \"/usr/lib/python2.7/site-packages/celery/app/trace.py\", line 240, in trace_task\n R = retval = fun(*args, **kwargs)\n File \"/usr/lib/python2.7/site-packages/pulp/server/async/tasks.py\", line 484, in __call__\n return super(Task, self).__call__(*args, **kwargs)\n File \"/usr/lib/python2.7/site-packages/pulp/server/async/tasks.py\", line 103, in __call__\n return super(PulpTask, self).__call__(*args, **kwargs)\n File \"/usr/lib/python2.7/site-packages/celery/app/trace.py\", line 437, in __protected_call__\n return self.run(*args, **kwargs)\n File \"/usr/lib/python2.7/site-packages/pulp/server/controllers/repository.py\", line 760, in sync\n sync_report = sync_repo(transfer_repo, conduit, call_config)\n File \"/usr/lib/python2.7/site-packages/pulp/server/async/tasks.py\", line 669, in wrap_f\n return f(*args, **kwargs)\n File \"/usr/lib/python2.7/site-packages/pulp_rpm/plugins/importers/yum/importer.py\", line 82, in sync_repo\n report = self._current_sync.run()\n File \"/usr/lib/python2.7/site-packages/pulp_rpm/plugins/importers/yum/sync.py\", line 200, in run\n if not self.sync_feed:\n File \"/usr/lib/python2.7/site-packages/pulp_rpm/plugins/importers/yum/sync.py\", line 106, in sync_feed\n self.check_metadata(repo_url_slash)\n File \"/usr/lib/python2.7/site-packages/pulp_rpm/plugins/importers/yum/sync.py\", line 324, in check_metadata\n self._url_modify)\n File \"/usr/lib/python2.7/site-packages/pulp_rpm/plugins/importers/yum/repomd/metadata.py\", line 127, in __init__\n self.event_listener)\n File \"/usr/lib/python2.7/site-packages/pulp_rpm/plugins/importers/yum/repomd/nectar_factory.py\", line 43, in create_downloader\n return SCHEME_DOWNLOADERS[parsed.scheme](nectar_config, event_listener=event_listener)\n File \"/usr/lib/python2.7/site-packages/nectar/downloaders/threaded.py\", line 91, in __init__\n self.session = session or build_session(config)\n File \"/usr/lib/python2.7/site-packages/nectar/downloaders/threaded.py\", line 369, in build_session\n _add_proxy(session, config)\n File \"/usr/lib/python2.7/site-packages/nectar/downloaders/threaded.py\", line 400, in _add_proxy\n url = ':'.join((host, str(config.proxy_port)))\nTypeError: sequence item 0: expected string, NoneType found\n",
"spawned_tasks": [],
"progress_report": {
"yum_importer": {
"content": {
"size_total": 0,
"items_left": 0,
"items_total": 0,
"state": "NOT_STARTED",
"size_left": 0,
"details": {
"rpm_total": 0,
"rpm_done": 0,
"drpm_total": 0,
"drpm_done": 0
},
"error_details": []
},
"comps": {
"state": "NOT_STARTED"
},
"purge_duplicates": {
"state": "NOT_STARTED"
},
"distribution": {
"items_total": 0,
"state": "NOT_STARTED",
"error_details": [],
"items_left": 0
},
"errata": {
"state": "NOT_STARTED"
},
"metadata": {
"state": "NOT_STARTED"
}
}
},
"queue": "reserved_resource_worker-3@hostname.dq",
"state": "error",
"worker_name": "reserved_resource_worker-3@hostname",
"result": null,
"error": {
"code": "PLP0000",
"data": {},
"description": "sequence item 0: expected string, NoneType found",
"sub_errors": []
},
"_id": {
"$oid": "57d7c9defc054acb0b751d8c"
},
"id": "57d7c9defc054acb0b751d8c"
}
Task Failed
sequence item 0: expected string, NoneType found
Updated by amacdona@redhat.com over 7 years ago
- Status changed from NEW to CLOSED - WONTFIX
Updated by jcline@redhat.com over 7 years ago
- Project changed from Pulp to Nectar
So I think either the proxy proxy_url or proxy port is defined to something other than a null value. If you're using a proxy, you'll need to explicitly define the proxy_port and proxy_url (annoyingly the port can't be a part of the url so it's not really a url). If you're not using a proxy, you'll need to make sure the values aren't set.
This is "fixed" in a currently-unreleased version of Nectar by not even using the function that currently has this problem and I don't think it's worth modifying that function for other library users since I don't think there are any and we plan on dropping Nectar in Pulp 3.
If the work-around I mentioned doesn't work, please let me know.