plugin_daemon only binding to IPv6 #165

Closed
opened 2026-02-16 00:20:14 -05:00 by yindo · 1 comment
Owner

Originally created by @JosefAschauer on GitHub (Jul 16, 2025).

Originally assigned to: @fatelei on GitHub.

Self Checks

To make sure we get to you in time, please check the following :)

  • [ x] I have searched for existing issues search for existing issues, including closed ones.
  • [ x] 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."

Versions

  1. dify-plugin-daemon Version: current
  2. dify-api Version: current

Describe the bug
regardless what I do, the plugin_daemon only binds to ipv6 inside the plugin_daemon container.
I am using a complany proxy in my environment and configured it accordingly in the comose but since everything else works, I assume thats not the root cause.
I even disabled IPv6 on the docker daemon and in the compose (using the regular one which comes with the current version 1.16.,0), recreated the container - but had no luck yet.
This causes the api not being able to connect to http://plugin_daemon:5002

inside the container:

root@d990a3c1e2ae:/app# sysctl net.ipv6.conf.all.disable_ipv6
net.ipv6.conf.all.disable_ipv6 = 1
root@d990a3c1e2ae:/app# sysctl net.ipv6.conf.default.disable_ipv6
net.ipv6.conf.default.disable_ipv6 = 1
root@d990a3c1e2ae:/app# sysctl net.ipv6.conf.lo.disable_ipv6
net.ipv6.conf.lo.disable_ipv6 = 1

but still:
root@d990a3c1e2ae:/app# netstat -tuln|grep 500
tcp 0 0 0.0.0.0:5003 0.0.0.0:* LISTEN
tcp6 0 0 :::5002 :::* LISTEN

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
plugin_daemon to bind to IPv4 (tcp)

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

Originally created by @JosefAschauer on GitHub (Jul 16, 2025). Originally assigned to: @fatelei on GitHub. **Self Checks** To make sure we get to you in time, please check the following :) - [ x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify-plugin-daemon/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)). - [ ] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [ ] "Please do not modify this template :) and fill in all the required fields." **Versions** 1. dify-plugin-daemon Version: current 2. dify-api Version: current **Describe the bug** regardless what I do, the plugin_daemon only binds to ipv6 inside the plugin_daemon container. I am using a complany proxy in my environment and configured it accordingly in the comose but since everything else works, I assume thats not the root cause. I even disabled IPv6 on the docker daemon and in the compose (using the regular one which comes with the current version 1.16.,0), recreated the container - but had no luck yet. This causes the api not being able to connect to http://plugin_daemon:5002 inside the container: root@d990a3c1e2ae:/app# sysctl net.ipv6.conf.all.disable_ipv6 net.ipv6.conf.all.disable_ipv6 = 1 root@d990a3c1e2ae:/app# sysctl net.ipv6.conf.default.disable_ipv6 net.ipv6.conf.default.disable_ipv6 = 1 root@d990a3c1e2ae:/app# sysctl net.ipv6.conf.lo.disable_ipv6 net.ipv6.conf.lo.disable_ipv6 = 1 but still: root@d990a3c1e2ae:/app# netstat -tuln|grep 500 tcp 0 0 0.0.0.0:5003 0.0.0.0:* LISTEN tcp6 0 0 :::5002 :::* LISTEN **To Reproduce** Steps to reproduce the behavior: 1. Go to '...' 2. Click on '....' 3. Scroll down to '....' 4. See error **Expected behavior** plugin_daemon to bind to IPv4 (tcp) **Screenshots** If applicable, add screenshots to help explain your problem. **Additional context** Add any other context about the problem here.
yindo closed this issue 2026-02-16 00:20:14 -05:00
Author
Owner

@fatelei commented on GitHub (Jan 11, 2026):

because this

srv := &http.Server{
Addr: fmt.Sprintf(":%d", config.ServerPort),
Handler: engine,
}

When using :5002 as the address (specifying only the port, not the host), Go’s HTTP server decides whether to use IPv4 or IPv6 based on the system configuration. On many systems it defaults to IPv6, causing it to bind to :::5002 instead of 0.0.0.0:5002.

@fatelei commented on GitHub (Jan 11, 2026): because this srv := &http.Server{ Addr: fmt.Sprintf(":%d", config.ServerPort), Handler: engine, } When using :5002 as the address (specifying only the port, not the host), Go’s HTTP server decides whether to use IPv4 or IPv6 based on the system configuration. On many systems it defaults to IPv6, causing it to bind to :::5002 instead of 0.0.0.0:5002.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-plugin-daemon#165