配置引起的redis报错:
[2017-01-03 23:51:18,449: CRITICAL/MainProcess] Unrecoverable error: ValueError('invalid literal for int() with base 10: \'"iv\'',)
Traceback (most recent call last):
File "/usrb/python2.7/site-packages/celery/worker/worker.py", line 203, in start
self.blueprint.start(self)
File "/usrb/python2.7/site-packages/celery/bootsteps.py", line 115, in start
self.on_start()
File "/usrb/python2.7/site-packages/celery/apps/worker.py", line 143, in on_start
self.emit_banner()
File "/usrb/python2.7/site-packages/celery/apps/worker.py", line 158, in emit_banner
' \n', self.startup_info(artlines=not use_image))),
File "/usrb/python2.7/site-packages/celery/apps/worker.py", line 221, in startup_info
results=self.app.backend.as_uri(),
File "/usrb/python2.7/site-packages/kombu/utils/objects.py", line 44, in __get__
value = obj.__dict__[self.__name__] = self.__get(obj)
File "/usrb/python2.7/site-packages/celery/app/base.py", line 1182, in backend
return self._get_backend()
File "/usrb/python2.7/site-packages/celery/app/base.py", line 901, in _get_backend
return backend(app=self, url=url)
File "/usrb/python2.7/site-packages/celery/backends/redis.py", line 136, in __init__
self.connparams = self._params_from_url(url, self.connparams)
File "/usrb/python2.7/site-packages/celery/backends/redis.py", line 148, in _params_from_url
scheme, host, port, _, password, path, query = _parse_url(url)
File "/usrb/python2.7/site-packages/kombu/utils/url.py", line 52, in url_to_parts
parts.port,
File "/usrb64/python2.7/urlparse.py", line 112, in port
port = int(port, 10)
ValueError: invalid literal for int() with base 10: '"iv'
配置引起的celery报错:
Traceback (most recent call last):
File "/usr/bin/celery", line 11, in
sys.exit(main())
File "/usrb/python2.7/site-packages/celery/__main__.py", line 14, in main
_main()
File "/usrb/python2.7/site-packages/celery/bin/celery.py", line 326, in main
cmd.execute_from_commandline(argv)
File "/usrb/python2.7/site-packages/celery/bin/celery.py", line 488, in execute_from_commandline
super(CeleryCommand, self).execute_from_commandline(argv)))
File "/usrb/python2.7/site-packages/celery/bin/base.py", line 281, in execute_from_commandline
return self.handle_argv(self.prog_name, argv[1:])
File "/usrb/python2.7/site-packages/celery/bin/celery.py", line 480, in handle_argv
return self.execute(command, argv)
File "/usrb/python2.7/site-packages/celery/bin/celery.py", line 412, in execute
).run_from_argv(self.prog_name, argv[1:], command=argv[0])
File "/usrb/python2.7/site-packages/celery/bin/worker.py", line 221, in run_from_argv
return self(*args, **options)
File "/usrb/python2.7/site-packages/celery/bin/base.py", line 244, in __call__
ret = self.run(*args, **kwargs)
File "/usrb/python2.7/site-packages/celery/bin/worker.py", line 255, in run
**kwargs)
File "/usrb/python2.7/site-packages/celery/worker/worker.py", line 99, in __init__
self.setup_instance(**self.prepare_args(**kwargs))
File "/usrb/python2.7/site-packages/celery/worker/worker.py", line 120, in setup_instance
self._conninfo = self.app.connection_for_read()
File "/usrb/python2.7/site-packages/celery/app/base.py", line 752, in connection_for_read
return self._connection(url or self.conf.broker_read_url, **kwargs)
File "/usrb/python2.7/site-packages/celery/app/base.py", line 828, in _connection
'broker_connection_timeout', connect_timeout
File "/usrb/python2.7/site-packages/kombu/connection.py", line 181, in __init__
url_params = parse_url(hostname)
File "/usrb/python2.7/site-packages/kombu/utils/url.py", line 34, in parse_url
scheme, host, port, user, password, path, query = _parse_url(url)
File "/usrb/python2.7/site-packages/kombu/utils/url.py", line 52, in url_to_parts
parts.port,
File "/usrb64/python2.7/urlparse.py", line 112, in port
port = int(port, 10)
ValueError: invalid literal for int() with base 10: 'iv'
原因是密码字符串中不能有“#” 号