[erlang-questions] : erl: "Can't set long node name!"
Raimo Niskanen
raimo+erlang-questions@REDACTED
Thu Jun 19 10:20:37 CEST 2008
On Wed, Jun 18, 2008 at 11:39:53PM -0400, John Chandler wrote:
> Thanks. I think you may be right. I'll have to work on how to set
> this up, because this is a Mac and the Unix networking tools only
> *sort of* work. In particular, "hostname" doesn't have a "--long"
> option.
On a Mac(OS X), `hostname' gives you the fully qualified
hostname and 'hostname -s' gives the short name. Try
`man hostname', it works on most platforms.
Why do you not run short names a'la `erl -sname foo'?
If you know your hosts DNS domainname you can force
the node name a'la `erl -name foo@REDACTED'.
To make `erl -name foo' work, a name lookup of the
short hostname must return the fully qualified
hostname. Try from erlang with `inet:gethostbyname("foo").',
if that does not give you a long hostname as the
second element of the returned hostent tuple;
long node names will not work without giving
a long node name to the -name argument
>
> Static IP may be a bit challenging, or at least laborious, because
> my machine is a laptop moved relatively frequently to different
> locations.
It works just as well with dynamic IP, if the name
resolver (often DNS resolver) returns a fully qualified name.
>
> And I'm not clear on how to set up a "domain" in the sense you
> mean. I have a couple of them, but they're not DNS'd to my
> laptop.
If you have no clear domain, use short node names;
that is what they are for. Long node names are
only necessary when you have to distinguish between
different domains.
>
> I wonder if Erlang will evolve to match the way people use
> computers now (and didn't 10, 20 years ago).
I am afraid computer networking has not changed much
the last 10, 20 years...
>
> -jmc
>
> On Jun 18, 2008, at 11:00 PM, Edwin Fine wrote:
>
> >Is your OS set up to have a long hostname? What does
> >hostname --long show? I think Erlang expects to see
> >something like mybox.domain.name. Very often, home or
> >personal Linux installations are created without a domain
> >name, so hostname --long returns something just like
> >"mybox". You need to change this so that you have a domain
> >name. To do this, I think you would need to set your box to
> >have a static IP address (not DHCP) and modify /etc/hosts so
> >that the static IP address for your box is known by a fully
> >qualified name, e.g.
> >
> >/etc/hosts:
> >127.0.0.1 localhost
> >192.168.1.100 mybox.mydomain.com
> >
> >If you're not actually on a real domain (which is probable), you'll
> >need to make one up.
> >
> >Hope this helps. It worked for me.
> >
> >On Wed, Jun 18, 2008 at 9:48 PM, John Chandler <morph@REDACTED>
> >wrote:
> >I was following an example and found that my configuration lacks the
> >ability to "set long node name." I checked the crash dump, and it
> >wasn't informative to me. I would attach it, but it's 180K, so I'll
> >only do that if asked to.
> >
> >So, any idea what I should change in my configuration?
> >
> >-jmc
> >====
> > $ erl -name foo
> >{error_logger,{{2008,6,18},{21,43,13}},"Can't set long node name!
> >\nPlease check your configuration\n",[]}
> >{error_logger,{{2008,6,18},{21,43,13}},crash_report,[[{pid,<0.20.0>},
> >{registered_name,net_kernel},{error_info,{error,badarg}},
> >{initial_call,{gen,init_it,[gen_server,<0.17.0>,<0.17.0>,
> >{local,net_kernel},net_kernel,{foo,longnames,15000},[]]}},{ancestors,
> >[net_sup,kernel_sup,<0.8.0>]},{messages,[]},{links,[<0.17.0>]},
> >{dictionary,[{longnames,true}]},{trap_exit,true},{status,running},
> >{heap_size,233},{stack_size,21},{reductions,363}],[]]}
> >{error_logger,{{2008,6,18},{21,43,13}},supervisor_report,[{supervisor,
> >{local,net_sup}},{errorContext,start_error},{reason,
> >{'EXIT',nodistribution}},{offender,[{pid,undefined},{name,net_kernel},
> >{mfa,{net_kernel,start_link,[[foo,longnames]]}},
> >{restart_type,permanent},{shutdown,2000},{child_type,worker}]}]}
> >{error_logger,{{2008,6,18},{21,43,13}},supervisor_report,[{supervisor,
> >{local,kernel_sup}},{errorContext,start_error},{reason,shutdown},
> >{offender,[{pid,undefined},{name,net_sup},{mfa,
> >{erl_distribution,start_link,[]}},{restart_type,permanent},
> >{shutdown,infinity},{child_type,supervisor}]}]}
> >{error_logger,{{2008,6,18},{21,43,13}},crash_report,[[{pid,<0.7.0>},
> >{registered_name,[]},{error_info,{shutdown,{kernel,start,[normal,
> >[]]}}},{initial_call,{application_master,init,[<0.5.0>,<0.6.0>,
> >{appl_data,kernel,
> >[application_controller,erl_reply,auth,boot_server,code_server,disk_lo
> >g_
> >server,disk_log_sup,erl_prim_loader,error_logger,file_server_2,fixtabl
> >e_
> >server,global_group,global_name_server,heart,init,kernel_config,kernel
> >_s
> >up,net_kernel,net_sup,rex,user,os_server,ddll_server,erl_epmd,inet_db,
> >pg
> >2],undefined,{kernel,[]},
> >[application,application_controller,application_master,application_sta
> >rt
> >er,auth,code,code_aux,packages,code_server,dist_util,erl_boot_server,e
> >rl
> >_distribution,erl_prim_loader,erl_reply,erlang,error_handler,error_log
> >ge
> >r,file,file_server,file_io_server,prim_file,global,global_group,global
> >_s
> >earch,group,heart,hipe_unified_loader,inet6_tcp,inet6_tcp_dist,inet6_u
> >dp
> >,inet_config,inet_hosts,inet_gethost_native,inet_tcp_dist,init,kernel,
> >ke
> >rnel_config,net,net_adm,net_kernel,os,ram_file,rpc,user,user_drv,user_
> >su
> >p,disk_log,disk_log_1,disk_log_server,disk_log_sup,dist_ac,erl_ddll,er
> >l_
> >epmd,erts_debug,gen_tcp,gen_udp,gen_sctp,prim_inet,inet,inet_db,inet_d
> >ns
> >,inet_parse,inet_res,inet_tcp,inet_udp,inet_sctp,pg2,seq_trace,wrap_lo
> >g_
> >reader,zlib,otp_ring0],[],infinity,infinity},normal]}},{ancestors,
> >[<0.6.0>]},{messages,[{'EXIT',<0.8.0>,normal}]},{links,
> >[<0.6.0>,<0.5.0>]},{dictionary,[]},{trap_exit,true},{status,running},
> >{heap_size,987},{stack_size,21},{reductions,2063}],[]]}
> >{error_logger,{{2008,6,18},{21,43,13}},std_info,[{application,kernel},
> >{exited,{shutdown,{kernel,start,[normal,[]]}}},{type,permanent}]}
> >{"Kernel pid
> >terminated",application_controller,"{application_start_failure,kernel,
> >{shutdown,{kernel,start,[normal,[]]}}}"}
> >
> >Crash dump was written to: erl_crash.dump
> >Kernel pid terminated (application_controller)
> >({application_start_failure,kernel,{shutdown,{kernel,start,[normal,
> >[]]}}})
> >_______________________________________________
> >erlang-questions mailing list
> >erlang-questions@REDACTED
> >http://www.erlang.org/mailman/listinfo/erlang-questions
> >
> >
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions
--
/ Raimo Niskanen, Erlang/OTP, Ericsson AB
More information about the erlang-questions
mailing list