Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Redis密码如果含有#号会导致报错 #1765

Open
3 tasks done
2nfree opened this issue Aug 25, 2023 · 5 comments
Open
3 tasks done

[Bug]: Redis密码如果含有#号会导致报错 #1765

2nfree opened this issue Aug 25, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@2nfree
Copy link

2nfree commented Aug 25, 2023

Preflight Checklist

  • I agree to follow the Code of Conduct that this project adheres to.
  • I have searched the issue tracker for an issue that matches the one I want to file, without success.
  • I am not looking for support or already pursued the available support channels without success.

Version

1.14.1

Installation Type

Official Kubernetes

Service Name

Deploy(DongTai-deploy)

Describe the details of the bug and the steps to reproduce it

如我设置redis密码为EeZC9YE649s5P#12,会报错:
skipRedis: true
redis:
host: host
port: 6379
password: "EeZC9YE649s5P#12"
db: 2
ValueError: Port could not be cast to integer value as 'EeZC9YE649s5P'

Additional Information

No response

Logs

ValueError: Port could not be cast to integer value as 'EeZC9YE649s5P'
@2nfree 2nfree added the bug Something isn't working label Aug 25, 2023
@2nfree 2nfree changed the title [Bug]: Redis密码用如果含有#号会导致报错 [Bug]: Redis密码如果含有#号会导致报错 Aug 25, 2023
@tscuite
Copy link
Member

tscuite commented Aug 25, 2023

helm currently does not support special characters

@2nfree
Copy link
Author

2nfree commented Aug 25, 2023

helm currently does not support special characters

应该不是helm不支持特殊字符,helm已经正确的生成了对应的configMap:config-tutorial.ini,并且在这个configMap中redis的password设置也是“EeZC9YE649s5P#12”但是启动服务会报错

@tscuite
Copy link
Member

tscuite commented Aug 25, 2023

Where is this error generated
image

@2nfree
Copy link
Author

2nfree commented Aug 26, 2023

Where is this error generated image

Traceback (most recent call last):
  File "/usr/local/bin/celery", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.10/site-packages/celery/__main__.py", line 15, in main
    sys.exit(_main())
  File "/usr/local/lib/python3.10/site-packages/celery/bin/celery.py", line 235, in main
    return celery(auto_envvar_prefix="CELERY")
  File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.10/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/click/decorators.py", line 33, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/celery/bin/base.py", line 134, in caller
    return f(ctx, *args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/celery/bin/worker.py", line 348, in worker
    worker = app.Worker(
  File "/usr/local/lib/python3.10/site-packages/celery/worker/worker.py", line 98, in __init__
    self.setup_instance(**self.prepare_args(**kwargs))
  File "/usr/local/lib/python3.10/site-packages/celery/worker/worker.py", line 119, in setup_instance
    self._conninfo = self.app.connection_for_read()
  File "/usr/local/lib/python3.10/site-packages/celery/app/base.py", line 818, in connection_for_read
    return self._connection(url or self.conf.broker_read_url, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/celery/app/base.py", line 877, in _connection
    return self.amqp.Connection(
  File "/usr/local/lib/python3.10/site-packages/kombu/connection.py", line 203, in __init__
    url_params = parse_url(hostname)
  File "/usr/local/lib/python3.10/site-packages/kombu/utils/url.py", line 38, in parse_url
    scheme, host, port, user, password, path, query = _parse_url(url)
  File "/usr/local/lib/python3.10/site-packages/kombu/utils/url.py", line 70, in url_to_parts
    parts.port,
  File "/usr/local/lib/python3.10/urllib/parse.py", line 185, in port
    raise ValueError(f"Port could not be cast to integer value as {port!r}")
ValueError: Port could not be cast to integer value as 'EeZC9YE649s5P'

@2nfree
Copy link
Author

2nfree commented Aug 26, 2023

Where is this error generated image

Traceback (most recent call last):
  File "/usr/local/bin/celery", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.10/site-packages/celery/__main__.py", line 15, in main
    sys.exit(_main())
  File "/usr/local/lib/python3.10/site-packages/celery/bin/celery.py", line 235, in main
    return celery(auto_envvar_prefix="CELERY")
  File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.10/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/click/decorators.py", line 33, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/celery/bin/base.py", line 134, in caller
    return f(ctx, *args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/celery/bin/worker.py", line 348, in worker
    worker = app.Worker(
  File "/usr/local/lib/python3.10/site-packages/celery/worker/worker.py", line 98, in __init__
    self.setup_instance(**self.prepare_args(**kwargs))
  File "/usr/local/lib/python3.10/site-packages/celery/worker/worker.py", line 119, in setup_instance
    self._conninfo = self.app.connection_for_read()
  File "/usr/local/lib/python3.10/site-packages/celery/app/base.py", line 818, in connection_for_read
    return self._connection(url or self.conf.broker_read_url, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/celery/app/base.py", line 877, in _connection
    return self.amqp.Connection(
  File "/usr/local/lib/python3.10/site-packages/kombu/connection.py", line 203, in __init__
    url_params = parse_url(hostname)
  File "/usr/local/lib/python3.10/site-packages/kombu/utils/url.py", line 38, in parse_url
    scheme, host, port, user, password, path, query = _parse_url(url)
  File "/usr/local/lib/python3.10/site-packages/kombu/utils/url.py", line 70, in url_to_parts
    parts.port,
  File "/usr/local/lib/python3.10/urllib/parse.py", line 185, in port
    raise ValueError(f"Port could not be cast to integer value as {port!r}")
ValueError: Port could not be cast to integer value as 'EeZC9YE649s5P'

helm 配置是这样的

images: registry.cn-beijing.aliyuncs.com/huoxian_pub
tag: "1.14.1"
imagePullPolicy: Always
replicaCount: 1
accessType: NodePort
logging_level: INFO
healthcheck: true
logstash: "true"

skipMysql: true
mysql:
  host: 192.168.56.108
  port: 3306
  name: dongtai_webapi
  user: root
  password: "root"

skipRedis: true
redis:
  host: 192.168.56.108
  port: 6379
  password: "EeZC9YE649s5P#12"
  db: 2

storage:
  persistentVolumeClaim: iast-agent-pvc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants