【问题标题】:Why is this erlang tftpd server seemingly not accepting client requests?为什么这个 erlang tftpd 服务器似乎不接受客户端请求?
【发布时间】:2012-07-31 01:44:45
【问题描述】:

我正在尝试使用 inet 的 tftp,但我做错了什么。 This simple example application,虽然它确实绑定到正确的端口,但从不 将数据返回给客户端。

要重现,请在项目根目录中打开一个终端,然后:

make && ./bin/console

这应该会启动 tftp_hellp 应用程序,并让您进入 erlang 壳。确认 inets 正在运行:

1> application:which_applications().
[{inets,"INETS  CXC 138 49","5.9"},
 {sasl,"SASL  CXC 138 11","2.2.1"},
 {stdlib,"ERTS  CXC 138 10","1.18.1"},
 {kernel,"ERTS  CXC 138 10","2.15.1"}]

并且 tftp 守护进程正在运行:

2> inets:services().
[{tftpd,<0.56.0>},{httpc,<0.50.0>}]

太好了。现在,如果您查看etc/inets.config,您会注意到我们正在绑定 tftpd 到 6969。打开另一个终端并:

> tftp localhost 6969
tftp> get hello.txt
Transfer timed out.

打扰了。如果我对 tftpd 的理解是正确的——显然不是——我们会 回复&lt;&lt;"hello world"&gt;&gt;

我做错了什么?

【问题讨论】:

    标签: erlang tftp


    【解决方案1】:

    我最初收到了同样的错误,但后来检查了我的防火墙设置以允许 udp/6969 并获得了文件:

    -> % tftp localhost 6969

    tftp> 获取 hello.txt

    在 0.0 秒内收到 11 个字节

    tftp> 退出

    -> % cat hello.txt

    你好世界%

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-09-24
      • 2012-04-18
      • 2022-12-08
      • 2015-02-23
      • 2015-06-13
      • 1970-01-01
      • 1970-01-01
      • 2021-11-01
      相关资源
      最近更新 更多