This topic created in 1550 days ago, the information mentioned may be changed or developed.
# /etc/hosts
127.0.0.1 localhost myhostname
::1 localhost
这种情况下,
inet:gethostname(). = myhostname
inet_db:gethostname(). = localhost
但是我看了 inet_db:set_hostname 源码,db 的 hostname 也是通过 inet_config 模块调用 inet:get_hostname 实现的,后面我手动调用得到的值也是 myhostname ,并非 localhost
----------------
然后只要我把 /etc/hosts 文件改成
127.0.0.1 localhost
::1 localhost
结果就是对的了:
inet:gethostname(). = myhostname
inet_db:gethostname(). = myhostname
实在是困惑,请各位大佬解惑。十分感谢!
2 replies • 2022-01-29 00:14:14 +08:00
 |
|
1
TangMonk Jan 28, 2022 via iPhone
现在还有人用 erlang 啊
|
 |
|
2
dhq Jan 29, 2022
@ TangMonk 不是想用,因为用的 rabbitmq ,用这个写的。。
|