{ok, Pid} = inets:start(httpd, [{port, 0},
2> {server_name,"httpd_test"}, {server_root,"/tmp"},
2> {document_root,"/tmp/htdocs"}, {bind_address, "192.168.0.31"}]).
** exception error: no match of right hand side value {error,{failed_determine_ip_address,"192.168.0.31",inet6fb4,
nxdomain}}当我尝试像上面那样启动inets时,我得到了一个错误信息。为什么会发生这种情况?我复制并粘贴了API文档,但我仍然无法启动inets。我该如何解决这个问题呢?
发布于 2013-06-10 16:44:55
请尝试将绑定地址指定为{bind_address, {192,168,0,31}}。如果你传递一个字符串,inets会认为它是一个主机名,并尝试解析它,以nxdomain失败。
https://stackoverflow.com/questions/17019715
复制相似问题