Initially it looked like some access rights issue
so I've updated /etc/riak-cs/app.config
and /etc/stanchion/app.config
with my admin's keys so I could use s3-cmd to figure out why some users
lost access to database.

but now it fails to start (see below).
riak-cs starts only after machine being rebooted, and fails first time
then I try to manipulate files with boto.

riak-cs console
Node 'riak-cs@127.0.0.1' not responding to pings.
config is OK
Exec: /usr/lib/riak-cs/erts-5.9.1/bin/erlexec -boot
/usr/lib/riak-cs/releases/1.3.1/riak-cs             -embedded -config
/etc/riak-cs/app.config             -pa
/usr/lib/riak-cs/lib/basho-patches             -args_file
/etc/riak-cs/vm.args -- console
Root: /usr/lib/riak-cs
Erlang R15B01 (erts-5.9.1) [source] [64-bit] [smp:4:4]
[async-threads:64] [kernel-poll:true]

opening log file: "/var/log/riak-cs/access.log.2014_01_29_23"
00:45:05.232 [info] Application lager started on node 'riak-cs@127.0.0.1'
00:45:05.233 [info] Application poolboy started on node 'riak-cs@127.0.0.1'
00:45:05.253 [info] Application folsom started on node 'riak-cs@127.0.0.1'
Eshell V5.9.1  (abort with ^G)
(riak-cs@127.0.0.1)1> 00:45:05.330 [error] CRASH REPORT Process
<0.129.0> with 0 neighbours exited with reason: {tcp,econnrefused} in
gen_server:init_it/6 line 320
/usr/lib/riak-cs/lib/os_mon-2.2.9/priv/bin/memsup: Erlang has closed.
                                                                     
Erlang has closed
                                                                                
      
{"Kernel pid
terminated",application_controller,"{application_start_failure,riak_cs,{shutdown,{riak_cs_app,start,[normal,[]]}}}"}
Kernel pid terminated (application_controller)
({application_start_failure,riak_cs,{shutdown,{riak_cs_app,start,[normal,[]]}}})


Here are my config files:


cat /etc/riak-cs/app.config
%% -*- tab-width: 4;erlang-indent-level: 4;indent-tabs-mode: nil -*-
%% ex: ts=4 sw=4 et
[
 %% Riak CS configuration
 {riak_cs, [
              %% == Basic Configuration ==

              %% Riak CS http/https port and IP address to listen at
              %% for object storage activity
              {cs_ip, "0.0.0.0"},
              {cs_port, 8080 } ,

              %% Riak node to which Riak CS accesses
              {riak_ip, "127.0.0.1"},
              {riak_pb_port, 8087 } ,

              %% Configuration for access to request
              %% serialization service
              {stanchion_ip, "127.0.0.1"},
              {stanchion_port, 8085 },
              {stanchion_ssl, false },

              %% Enable this to allow the creation of an admin user
              %% when setting up a system. It is recommended to only
              %% enable this temporarily unless your use-case
              %% specifically dictates letting anonymous users to
              %% create accounts.
              {anonymous_user_creation, true},

              %% Admin user credentials. Admin access like
              %% /riak-cs/stats requires this entry to be set
              %% properly. The credentials specified here must match
              %% the admin credentials specified in the stanchion
              %% app.config for the system to function properly.
              {admin_key, "JRG1FHSN-LR27WQGBD1G"},
              {admin_secret, "n7rjS9rdXvMa6ji5BPaiw5NBK9yB2V6J_J2gow=="},

              %% Port and IP address to listen on for system
              %% administration tasks. Uncomment the following lines
              %% to use a separate IP and port for administrative
              %% API calls.
              %% {admin_ip, "0.0.0.0"},
              %% {admin_port, 8887 } ,

              %% If SSL needed, un-comment. Without SSL
              %% section, CS will be accessible via http.
              %% {ssl, [
              %%        {certfile, "./etc/cert.pem"},
              %%        {keyfile, "./etc/key.pem"}
              %%       ]},

              %% Root host name which Riak CS accepts.
              %% Your CS bucket at s3.example.com will be accessible
              %% via URL like http://bucket.s3.example.com/object/name
              {cs_root_host, "s3.amazonaws.com"},

              %% Connection pools
              %% Each pool is specified as a nested
              %% tuple of {Name, {FixedSize, OverflowSize}}
              {connection_pools,
               [
                {request_pool, {128, 0} },
                {bucket_list_pool, {5, 0} }
               ]},

              %% == Rolling upgrade support ==

              %% Riak CS version number. This is used to selectively
              %% enable new features for the current version to better
              %% support rolling upgrades. New installs should not
              %% need to modify this. If peforming a rolling upgrade
              %% then set this value to 0 until all nodes have been
              %% upgraded and then set back to the original value.
              {cs_version, 10300 },

              %% == Usage recording ==

              %% How often to flush the access log; integer factor of
              %% access_archive_period (1 == once per period; 2 ==
              %% twice per period, etc.)
              {access_log_flush_factor, 1},

              %% Additional access log flush trigger - flush after
              %% this many accesses are recorded, even if the flush
              %% interval has not expired; integer number of accesses
              {access_log_flush_size, 1000000},

              %% How large each access archive object is. Should be a
              %% multiple of access_log_flush_interval; integer number
              %% of seconds (3600 == 1 hour)
              {access_archive_period, 3600},

              %% How many access logs are allowed to pile up in the
              %% archiver's queue before it starts skipping to catch
              %% up; integer number of logs
              {access_archiver_max_backlog, 2},

              %% When to automatically start storage calculation
              %% batches; list of "HHMM" UTC times
              %% ([] == do not automatically calculation;
              %%  ["0600"] == automatically calculate at 6am UTC every day;
              %%  ["0600","1945"] == automatically calculate at 6am and
              %%                     again at 7:45pm every day)
              {storage_schedule, []},

              %% How large each storage archive object is. Should be
              %% chosen such that each storage_schedule entry falls in
              %% a different period; integer number of seconds
              %% (86400 == 1 day)
              {storage_archive_period, 86400},

              %% How many archive periods a user can request in one
              %% usage read, applied independently to access and
              %% storage; integer number of intervals (744 == 1 month
              %% @ 1 hour intervals)
              {usage_request_limit, 744},

              %% == Garbage Collection ==

              %% The number of seconds to retain the block
              %% for an object after it has been deleted.
              %% This leeway time is set to give the delete
              %% indication time to propogate to all replicas.
              %% 86400 is 24-hours.
              {leeway_seconds, 86400},

              %% How often the garbage collection daemon
              %% waits in-between gc batches.
              %% 900 is 15-minutes.
              {gc_interval, 900},

              %% How long a move to the garbage
              %% collection to do list can remain
              %% failed, before we retry it.
              %% 21600 is 6-hours.
              {gc_retry_interval, 21600},

              %% == DTrace ==

              %% If your Erlang virtual machine supports DTrace (or
              %% user-space SystemTap), set dtrace_support to true.
              {dtrace_support, false}

             ]},

 {webmachine, [
               %% custom server name at http response header "Server:
Riak CS"
               {server_name, "Riak CS"},

               %% The webmachine_log_handler entry can be
               %% commented-out or removed to disable access
               %% logging. Do not remove the
               %% riak_cs_access_log_handler entry.
               {log_handlers, [
                               {webmachine_log_handler,
["/var/log/riak-cs"]},
                               {riak_cs_access_log_handler, []}
                              ]}
              ]},

 {lager, [
          %% What handlers to install with what arguments
          %% The defaults for the logfiles are to rotate the files when
          %% they reach 10Mb or at midnight, whichever comes first, and keep
          %% the last 5 rotations. See the lager README for a description of
          %% the time rotation format:
          %% https://github.com/basho/lager/blob/master/README.org
          %%
          %% If you wish to disable rotation, you can either set the
size to 0
          %% and the rotation time to "", or instead specify a 2-tuple
that only
          %% consists of {Logfile, Level}.
          {handlers, [
                      {lager_console_backend, info},
                      {lager_file_backend, [
                                           
{"/var/log/riak-cs/error.log", error, 10485760, "$D0", 5},
                                           
{"/var/log/riak-cs/console.log", info, 10485760, "$D0", 5}
                                           ]}
                     ]},

          %% Whether to write a crash log, and where.
          %% Commented/omitted/undefined means no crash logger.
          {crash_log, "/var/log/riak-cs/crash.log"},

          %% Maximum size in bytes of events in the crash log - defaults
to 65536
          {crash_log_msg_size, 65536},

          %% Maximum size of the crash log in bytes, before its rotated, set
          %% to 0 to disable rotation - default is 0
          {crash_log_size, 10485760},

          %% What time to rotate the crash log - default is no time
          %% rotation. See the lager README for a description of this
format:
          %% https://github.com/basho/lager/blob/master/README.org
          {crash_log_date, "$D0"},

          %% Number of rotated crash logs to keep, 0 means keep only the
          %% current one - default is 0
          {crash_log_count, 5},

          %% Whether to redirect error_logger messages into lager -
defaults to true
          {error_logger_redirect, true}
         ]},

 %% SASL config
 {sasl, [
         {sasl_error_logger, false}
        ]},

 %% riak control
    {riak_cs_control, [
       %% What port to run the application on.
       {port, 8000 },

       %% Instance of Riak CS you wish to talk to.
       {cs_hostname, "0.0.0.0" },
       {cs_port, 80 },
       {cs_protocol, "http" },

       %% Proxy information; necessary if you are using s3.amazonaws.com as
       %% your hostname.
       {cs_proxy_host, "localhost" },
       {cs_proxy_port, 8080 },

       %% Credentials you want the application to run as.
       {cs_admin_key, "JRG1FHSN-LR27WQGBD1G"},
       {cs_admin_secret, "n7rjS9rdXvMa6ji5BPaiw5NBK9yB2V6J_J2gow=="},

       %% Specify the bucket name for administration options.
       {cs_administration_bucket, "riak-cs" }
    ]}
].


cat /etc/stanchion/app.config
%% -*- tab-width: 4;erlang-indent-level: 4;indent-tabs-mode: nil -*-
%% ex: ts=4 sw=4 et
[
 %% Stanchion config
 {stanchion, [
                   {stanchion_ip, "127.0.0.1"},
                   {stanchion_port, 8085 } ,

                   %%{ssl, [
                   %%       {certfile, "./etc/cert.pem"},
                   %%       {keyfile, "./etc/key.pem"}
                   %%      ]},

                   {auth_bypass, false } ,

                   %% Riak connection details
                   {riak_ip, "127.0.0.1"},
                   {riak_pb_port, 8087 },

                   %% Admin user credentials
                   {admin_key, "JRG1FHSN-LR27WQGBD1G"},
                   {admin_secret,
"n7rjS9rdXvMa6ji5BPaiw5NBK9yB2V6J_J2gow=="}
                  ]},

 {lager, [
          %% What handlers to install with what arguments
          %% The defaults for the logfiles are to rotate the files when
          %% they reach 10Mb or at midnight, whichever comes first, and keep
          %% the last 5 rotations. See the lager README for a description of
          %% the time rotation format:
          %% https://github.com/basho/lager/blob/master/README.org
          %%
          %% If you wish to disable rotation, you can either set the
size to 0
          %% and the rotation time to "", or instead specify a 2-tuple
that only
          %% consists of {Logfile, Level}.
          {handlers, [
                      {lager_console_backend, info},
                      {lager_file_backend, [
                                           
{"/var/log/stanchion/error.log", error, 10485760, "$D0", 5},
                                           
{"/var/log/stanchion/console.log", info, 10485760, "$D0", 5}
                                           ]}
                     ]},

          %% Whether to write a crash log, and where.
          %% Commented/omitted/undefined means no crash logger.
          {crash_log, "/var/log/stanchion/crash.log"},

          %% Maximum size in bytes of events in the crash log - defaults
to 65536
          {crash_log_msg_size, 65536},

          %% Maximum size of the crash log in bytes, before its rotated, set
          %% to 0 to disable rotation - default is 0
          {crash_log_size, 10485760},

          %% What time to rotate the crash log - default is no time
          %% rotation. See the lager README for a description of this
format:
          %% https://github.com/basho/lager/blob/master/README.org
          {crash_log_date, "$D0"},

          %% Number of rotated crash logs to keep, 0 means keep only the
          %% current one - default is 0
          {crash_log_count, 5},

          %% Whether to redirect error_logger messages into lager -
defaults to true
          {error_logger_redirect, true}
         ]},

 %% SASL config
 {sasl, [
         {sasl_error_logger, false}
        ]}
].


_______________________________________________
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to