作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我已经运行了命令
docker run -p 6379:6379 --name some-redis -d redis
当我在浏览器中运行 localhost:6376
时,我收到错误消息 ERR_INVALID_HTTP_RESPONSE
Resdis 正在运行:
Steins-MacBook-Air:Domain steinkorsveien$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
474e7611824d redis "docker-entrypoint.s…" 17 hours ago Up 17 hours 0.0.0.0:6379->6379/tcp some-redis
如何连接到 Redis 组件?
最佳答案
您无法从浏览器连接到 Redis,您可以从命令行验证连接和 Redis 健康状况。
docker exec -it some-redis sh -c "redis-cli"
由于 Redis 在 TCP 级别接受连接,因此浏览器只能在 HTTP 级别工作。
网络层
A client connects to a Redis server creating a TCP connection to the port 6379.While RESP is technically non-TCP specific, in the context of Redis the protocol is only used with TCP connections (or equivalent stream oriented connections like Unix sockets).
关于docker - 为什么我无法连接到 Redis Docker 组件的端口?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62672325/
我正在开发一个 voip 调用应用程序。我需要做的是在接到来电时将 Activity 带到前台。我在应用程序中使用 Twilio,并在收到推送消息时开始调用。 问题是我试图在接到任何电话时显示 Act
我是一名优秀的程序员,十分优秀!