---
title: "关于long node name启动失败的问题"
author: "luckyclouds"
date: "2011-04-13T14:56:51Z"
tags: []
categories: ["编程语言"]
slug: "long-node-name"
draft: false
lastmod: "2011-04-13T14:56:51Z"
id: 1001670
url: "https://luckyclouds.iteye.com/blog/1001670"
---

今天在一台Red Hat Enterprise Linux Server release 5.4 (Tikanga)上
执行erl -name sfsdf 报如下错误：
#erl -name sfsdf
{error_logger,{{2011,4,13},{14,28,4}},"Can't set long node name!\nPlease check your configuration\n",}
{error_logger,{{2011,4,13},{14,28,4}},crash_report,}},{pid,<0.21.0>},{registered_name,},{error_info,{exit,{error,badarg},}},{ancestors,},{messages,},{links,},{dictionary,},{trap_exit,true},{status,running},{heap_size,377},{stack_size,24},{reductions,629}],]}
{error_logger,{{2011,4,13},{14,28,4}},supervisor_report,]}},{restart_type,permanent},{shutdown,2000},{child_type,worker}]}]}
{error_logger,{{2011,4,13},{14,28,4}},supervisor_report,}},{restart_type,permanent},{shutdown,infinity},{child_type,supervisor}]}]}
{error_logger,{{2011,4,13},{14,28,4}},std_info,]}}},{type,permanent}]}
{"Kernel pid terminated",application_controller,"{application_start_failure,kernel,{shutdown,{kernel,start,]}}}"}

Crash dump was written to: erl_crash.dump
Kernel pid terminated (application_controller) ({application_start_failure,kernel,{shutdown,{kernel,start,]}}})

结果发现还是/etc/hosts配置和 hostname不一致引起的
把/etc/hosts中的
127.0.0.1    localhost.localdomain localhost
改成：
127.0.0.1    cloudbox.localdomain cloudbox
即可