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] 端口修改 #4696

Closed
yuntian123456 opened this issue Nov 15, 2024 · 6 comments
Closed

[Bug] 端口修改 #4696

yuntian123456 opened this issue Nov 15, 2024 · 6 comments
Labels
🐛 Bug Something isn't working | 缺陷

Comments

@yuntian123456
Copy link

📦 部署环境

Docker

📌 软件版本

20.10.21

💻 系统环境

Ubuntu

🌐 浏览器

Chrome

🐛 问题描述

部署的时候有端口被其他容器占用了,能改的我都把其他容器端口改了。
但有个9000的端口,对其他容器修改比较麻烦。所以想改Lobe的,但看起来是lobe-network要使用9000端口?我要怎么修改为比如9010?
以下是部署时的报错:
Error response from daemon: driver failed programming external connectivity on e ndpoint lobe-network (69540957ce31480e3c72ca7565da7ae4c281b892ae26f1d6c81352e79f dfdd76): Error starting userland proxy: listen tcp4 0.0.0.0:9000: bind: address already in use

📷 复现步骤

No response

🚦 期望结果

可以修改9000端口为9010

📝 补充信息

No response

@yuntian123456 yuntian123456 added the 🐛 Bug Something isn't working | 缺陷 label Nov 15, 2024
@github-project-automation github-project-automation bot moved this to Roadmap - Chat 1.x in Lobe Chat Routine Nov 15, 2024
@lobehubbot
Copy link
Member

👀 @yuntian123456

Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible.
Please make sure you have given us as much context as possible.
非常感谢您提交 issue。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。

Copy link

dosubot bot commented Nov 15, 2024

@yuntian123456 你好!我是Dosu,我是一个可以帮助你解决 bug、回答问题并成为贡献者的机器人。我会在这里帮助你,等待人类维护者的到来。

To change the port from 9000 to 9010 for the lobe-network in your Docker deployment, you need to modify the docker-compose.yml file. Specifically, update the port mapping for the network-service and the minio service. Here is how you can do it:

  1. Update the ports section for the network-service:

    services:
      network-service:
        ...
        ports:
          - '9010:9010' # MinIO API
          - '9001:9001' # MinIO Console
          - '${CASDOOR_PORT}:${CASDOOR_PORT}' # Casdoor
          - '${LOBE_PORT}:3210' # LobeChat
        ...
  2. Update the command for the minio service to use the new port:

    minio:
      ...
      command: >
        server /etc/minio/data --address ":9010" --console-address ":9001"
  3. Ensure that the environment variable MINIO_PORT is set to 9010 in your .env file or directly in the docker-compose.yml file:

    environment:
      - 'MINIO_PORT=9010'

These changes will map the external port 9010 to the internal port 9010 for the MinIO API, resolving the port conflict [1][2].

To continue talking to Dosu, mention @dosu.

Copy link

dosubot bot commented Nov 15, 2024

To change the port from 9000 to 9010 for the lobe-network in your Docker deployment, you need to modify the docker-compose.yml file. Specifically, update the port mapping for the network-service and the minio service. Here is how you can do it:

  1. Update the ports section for the network-service:

    services:
      network-service:
        ...
        ports:
          - '9010:9010' # MinIO API
          - '9001:9001' # MinIO Console
          - '${CASDOOR_PORT}:${CASDOOR_PORT}' # Casdoor
          - '${LOBE_PORT}:3210' # LobeChat
        ...
  2. Update the command for the minio service to use the new port:

    minio:
      ...
      command: >
        server /etc/minio/data --address ":9010" --console-address ":9001"
  3. Ensure that the environment variable MINIO_PORT is set to 9010 in your .env file or directly in the docker-compose.yml file:

    environment:
      - 'MINIO_PORT=9010'

These changes will map the external port 9010 to the internal port 9010 for the MinIO API, resolving the port conflict [1][2].

To continue talking to Dosu, mention @dosu.

@yuntian123456
Copy link
Author

解决了,没上面机器人说的那么麻烦。只需要修改.env文件的这一行即可
MINIO_PORT=9010

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Solved, not as troublesome as the robot above said. Just modify this line in the .env file
MINIO_PORT=9010

@github-project-automation github-project-automation bot moved this from Roadmap - Chat 1.x to Done in Lobe Chat Routine Nov 15, 2024
@lobehubbot
Copy link
Member

@yuntian123456

This issue is closed, If you have any questions, you can comment and reply.
此问题已经关闭。如果您有任何问题,可以留言并回复。

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
Status: Done
Development

No branches or pull requests

2 participants