Using /etc/hosts entry and not ip in configuration files ..

Seth Thomas sthomas at basho.com
Tue Oct 1 21:50:12 EDT 2013


Mike,

Based on the Chef line you have there, the issue is that you aren't
providing a FQDN. If the name is just "<hostname>-int" then it isn't a
fully qualified domain name and therefore Erlang complains.

Hopefully that clears up the confusion.


On Sat, Sep 21, 2013 at 8:12 PM, Mike Nathe <mnathe at fathom-i.com> wrote:

> Hi Alex.
>
> thanks a bunch for the info and the link to the white paper.
>
> Unfortunately we still haven't been able to use a domain name in the
> vm.args successfully.
>
> We use Chef scripts to build our EC2 instances (OpsWorks).
> The only difference in the scripts is:
>
> # use domain name
> node.set['riak']['args']['-name'] = "riak@#{node['hostname']}-int"
> # use ip
> node.set['riak']['args']['-name'] = "riak@#{node['ipaddress']}"
>
> The deployment with the ipaddress works great.
> The deployment with the hostname does start the server but the tools do
> not work (<riak-admin ringready> returns "Node is not running").
> We checked /var/log/riak and the console.log and error.log looked clean,
> though there was an erlang dump.
>
> Any insight into this would be greatly appreciated.
> Thanks again.
>
> Cheers,
> Michael
>
>
>
> The result of a simple test for hostname deployment:
>
> ubuntu at riaknode1:~$ sudo /usr/local/riak/bin/riak-admin ringready
> Node is not running!
>
>
> The result of a simple test for ipaddress deployment:
>
> ubuntu at riaknode1:~$ sudo /usr/local/riak/bin/riak-admin ringready
> TRUE All nodes agree on the ring ['riak at 172.31.44.73']
>
>
>
>
> On 19 September 2013 16:58, Alex Moore <amoore at basho.com> wrote:
>
>> Hey Mike,
>>
>> Another option for your app.config would be to bind everything to
>> "0.0.0.0", which will make Riak listen on all interfaces.  This combined
>> with using a domain name in the vm.args should prevent you from having to
>> do renames/changing ips in the config files.
>> If you do this, please consider using a VPC to limit access to the
>> machines.
>>
>> A good resource to read over is Amazon's Riak Whitepaper:
>> http://media.amazonwebservices.com/AWS_NoSQL_Riak.pdf, as it goes
>> through some operation considerations and tuning points that might be
>> useful to you.
>>
>> Thanks,
>> Alex
>>
>> On September 19, 2013 at 6:52:29 PM, Mike Nathe (mnathe at fathom-i.com)
>> wrote:
>>
>> hi.
>>
>> we are trying to run Riak in the Amazon cloud (using OpsWorks).
>> With every restart of the servers the ip addresses change so using an
>> entry in the /etc/hosts instead of an IP looks like a great idea.
>>
>> Google's answer is:
>>
>> http://lists.basho.com/pipermail/riak-users_lists.basho.com/2011-December/006912.html
>>
>> Just to make sure: Riak only supports IP addresses and not DNS names in
>> the config files.
>> Though in your docs it still says:
>> "Riak identifies other machines in the ring using Erlang identifiers
>> (<hostname or IP>, ex: riak at 10.9.8.7)."
>>
>>
>> The error logged when changing our config from something
>> like 172.31.41.138 to riaknode2-ext is:
>>
>> 2013-09-19 21:49:53.383 [error] <0.113.0> Supervisor riak_core_sup had
>> child "http_riaknode2-ext:8098" started with
>> webmachine_mochiweb:start([{name,"http_riaknode2-ext:8098"},{ip,"riaknode2-ext"},{port,8098},{nodelay,true},{log_dir,"log"},...])
>> at undefined exit with reason
>> {'EXIT',{{badmatch,{error,einval}},[{mochiweb_socket_server,parse_options,2},{mochiweb_socket_server,start,1},{supervisor,do_start_child,2},{supervisor,start_children,3},{supervisor,init_children,2},{gen_server,init_it,6},{proc_lib,init_p_do_apply,3}]}}
>> in context start_error
>>
>> Thanks a bunch.
>>
>> Have a great day.
>> Michael
>>
>>
>
> _______________________________________________
> riak-users mailing list
> riak-users at lists.basho.com
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20131001/28270015/attachment.html>


More information about the riak-users mailing list