docker-ssrf_proxy can't start: "Squid Cache (Version 6.6): Terminated abnormally." #5507

Closed
opened 2026-02-21 18:11:21 -05:00 by yindo · 1 comment
Owner

Originally created by @TaoAaron on GitHub (Sep 10, 2024).

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

V0.7.2

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

platform: arm64 linux ubuntu20.04

  1. deoploy the dify on the platfrom: cd docker; docker compose up -d;
    use "docker ps",every container run success
    dify1

  2. reboot the system

  3. use "docker ps" check the container status, we can find that docker-ssrf_proxy-1 always restarting .
    dify2

✔️ Expected Behavior

docker-ssrf_proxy-1 should be start success.

Actual Behavior

docker-ssrf_proxy abnorml
squid

Originally created by @TaoAaron on GitHub (Sep 10, 2024). ### Self Checks - [X] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [X] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [X] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [X] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [X] Please do not modify this template :) and fill in all the required fields. ### Dify version V0.7.2 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce ## platform: arm64 linux ubuntu20.04 1. deoploy the dify on the platfrom: cd docker; docker compose up -d; use "docker ps",every container run success <img width="1045" alt="dify1" src="https://github.com/user-attachments/assets/cdc7d880-e1df-44d0-8566-7c84a36e04aa"> 2. reboot the system 3. use "docker ps" check the container status, we can find that docker-ssrf_proxy-1 always restarting . <img width="1016" alt="dify2" src="https://github.com/user-attachments/assets/1168cfcb-c6a1-489b-84ae-bff0ddeb3455"> ### ✔️ Expected Behavior docker-ssrf_proxy-1 should be start success. ### ❌ Actual Behavior docker-ssrf_proxy abnorml <img width="635" alt="squid" src="https://github.com/user-attachments/assets/e9de3160-3b51-4f4b-844a-cbcd3ca71bba">
yindo added the 🐞 bug🤔 cant-reproduce labels 2026-02-21 18:11:21 -05:00
yindo closed this issue 2026-02-21 18:11:21 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Sep 10, 2024):

Hello, @TaoAaron! I'm here to help you with any bugs, questions, or contributions you have for the project. Let's work together to solve this issue.

The docker-ssrf_proxy container is in a restarting state with the error "Squid Cache (Version 6.6): Terminated abnormally" because the squid.conf file might not be properly configured to fit your network environment. The docker-compose.middleware.yaml file specifies:

ssrf_proxy:
  image: ubuntu/squid:latest
  restart: always
  volumes:
    - ./ssrf_proxy/squid.conf.template:/etc/squid/squid.conf.template
    - ./ssrf_proxy/docker-entrypoint.sh:/docker-entrypoint-mount.sh
  entrypoint: [ "sh", "-c", "cp /docker-entrypoint-mount.sh /docker-entrypoint.sh && sed -i 's/\r$$//' /docker-entrypoint.sh && chmod +x /docker-entrypoint.sh && /docker-entrypoint.sh" ]
  environment:
    # pls clearly modify the squid env vars to fit your network environment.
    HTTP_PORT: ${SSRF_HTTP_PORT:-3128}
    COREDUMP_DIR: ${SSRF_COREDUMP_DIR:-/var/spool/squid}
    REVERSE_PROXY_PORT: ${SSRF_REVERSE_PROXY_PORT:-8194}
    SANDBOX_HOST: ${SSRF_SANDBOX_HOST:-sandbox}
    SANDBOX_PORT: ${SANDBOX_PORT:-8194}
  ports:
    - "${EXPOSE_SSRF_PROXY_PORT:-3128}:${SSRF_HTTP_PORT:-3128}"
    - "${EXPOSE_SANDBOX_PORT:-8194}:${SANDBOX_PORT:-8194}"
  networks:
    - ssrf_proxy_network
    - default

Ensure that the squid.conf.template file located at ./ssrf_proxy/squid.conf.template is correctly configured for your network environment. Additionally, verify that the docker-entrypoint.sh script is correctly set up and that the environment variables are properly defined. Misconfigurations in these files or scripts can cause Squid to terminate abnormally.

To customize the proxy behavior, you can modify the squid.conf file located at docker/volumes/ssrf_proxy/squid.conf. For example, if you want to allow the 192.168.101.0/24 network to be accessed by the proxy but restrict access to an IP address 192.168.101.19 that contains sensitive data, you can add the following rules to squid.conf:

acl restricted_ip dst 192.168.101.19
acl localnet src 192.168.101.0/24

http_access deny restricted_ip
http_access allow localnet
http_access deny all

This is a basic example, and you can customize the rules to fit your specific needs. For more information about configuring squid, refer to the official documentation [1][2][3].

To continue talking to Dosu, mention @dosu.

@dosubot[bot] commented on GitHub (Sep 10, 2024): <!-- Greeting --> Hello, @TaoAaron! I'm here to help you with any bugs, questions, or contributions you have for the project. Let's work together to solve this issue. <!-- Answer --> The `docker-ssrf_proxy` container is in a restarting state with the error "Squid Cache (Version 6.6): Terminated abnormally" because the `squid.conf` file might not be properly configured to fit your network environment. The `docker-compose.middleware.yaml` file specifies: ```yaml ssrf_proxy: image: ubuntu/squid:latest restart: always volumes: - ./ssrf_proxy/squid.conf.template:/etc/squid/squid.conf.template - ./ssrf_proxy/docker-entrypoint.sh:/docker-entrypoint-mount.sh entrypoint: [ "sh", "-c", "cp /docker-entrypoint-mount.sh /docker-entrypoint.sh && sed -i 's/\r$$//' /docker-entrypoint.sh && chmod +x /docker-entrypoint.sh && /docker-entrypoint.sh" ] environment: # pls clearly modify the squid env vars to fit your network environment. HTTP_PORT: ${SSRF_HTTP_PORT:-3128} COREDUMP_DIR: ${SSRF_COREDUMP_DIR:-/var/spool/squid} REVERSE_PROXY_PORT: ${SSRF_REVERSE_PROXY_PORT:-8194} SANDBOX_HOST: ${SSRF_SANDBOX_HOST:-sandbox} SANDBOX_PORT: ${SANDBOX_PORT:-8194} ports: - "${EXPOSE_SSRF_PROXY_PORT:-3128}:${SSRF_HTTP_PORT:-3128}" - "${EXPOSE_SANDBOX_PORT:-8194}:${SANDBOX_PORT:-8194}" networks: - ssrf_proxy_network - default ``` Ensure that the `squid.conf.template` file located at `./ssrf_proxy/squid.conf.template` is correctly configured for your network environment. Additionally, verify that the `docker-entrypoint.sh` script is correctly set up and that the environment variables are properly defined. Misconfigurations in these files or scripts can cause Squid to terminate abnormally. To customize the proxy behavior, you can modify the `squid.conf` file located at `docker/volumes/ssrf_proxy/squid.conf`. For example, if you want to allow the `192.168.101.0/24` network to be accessed by the proxy but restrict access to an IP address `192.168.101.19` that contains sensitive data, you can add the following rules to `squid.conf`: ```plaintext acl restricted_ip dst 192.168.101.19 acl localnet src 192.168.101.0/24 http_access deny restricted_ip http_access allow localnet http_access deny all ``` This is a basic example, and you can customize the rules to fit your specific needs. For more information about configuring `squid`, refer to the [official documentation](http://www.squid-cache.org/Doc/config/) <sup>[[1]](https://github.com/langgenius/dify/blob/main/docker-legacy/docker-compose.yaml)</sup><sup>[[2]](https://github.com/langgenius/dify/blob/main/docker/docker-compose.middleware.yaml)</sup><sup>[[3]](https://github.com/langgenius/dify-docs/blob/main/en/getting-started/install-self-hosted/install-faq.md)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#5507