Skip to content

Instantly share code, notes, and snippets.

View sf-mrichter's full-sized avatar

Mark Richter sf-mrichter

  • Solarflare
  • Sorrento Valley, San Diego, CA
View GitHub Profile
@sf-mrichter
sf-mrichter / gist:2c5c653b3800708c1a67ba41e4992129
Created July 19, 2019 22:12
OpenSSL 1.1.1 on RHEL 7 errors
make depend && make _tests
make[1]: Entering directory `/home/solarflare/openssl-1.1.1c'
make[1]: Leaving directory `/home/solarflare/openssl-1.1.1c'
make[1]: Entering directory `/home/solarflare/openssl-1.1.1c'
( cd test; \
mkdir -p test-runs; \
SRCTOP=../. \
BLDTOP=../. \
RESULT_D=test-runs \
PERL="/usr/bin/perl" \
@sf-mrichter
sf-mrichter / gist:c66eef046b1cc64353d0d539ac0a1ded
Created May 8, 2019 20:38
Installed on both hosts, set vm.args and ran the first erl command
$ erl -name couchdb@sfsdr220d.sd.solarflare.com -setcookie 'monster' -kernel inet_dist_listen_min 9100 -kernel inet_dist_listen_max 9107
{error_logger,{{2019,5,8},{13,27,37}},"Protocol: ~tp: the name couchdb@sfsdr220d.sd.solarflare.com seems to be in use by another Erlang node",["inet_tcp"]}
{error_logger,{{2019,5,8},{13,27,37}},crash_report,[[{initial_call,{net_kernel,init,['Argument__1']}},{pid,<0.20.0>},{registered_name,[]},{error_info,{exit,{error,badarg},[{gen_server,init_it,6,[{file,"gen_server.erl"},{line,320}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,239}]}]}},{ancestors,[net_sup,kernel_sup,<0.10.0>]},{messages,[]},{links,[#Port<0.57>,<0.17.0>]},{dictionary,[{longnames,true}]},{trap_exit,true},{status,running},{heap_size,610},{stack_size,27},{reductions,767}],[]]}
{error_logger,{{2019,5,8},{13,27,37}},supervisor_report,[{supervisor,{local,net_sup}},{errorContext,start_error},{reason,{'EXIT',nodistribution}},{offender,[{pid,undefined},{name,net_kernel},{mfargs,{net_kernel,start_link,[[
@sf-mrichter
sf-mrichter / gist:e75f79833b775194b7e0323517a8f7a1
Created January 31, 2019 21:09
CouchDB 2.3 errors after update
Errors when updating from 2.2 to 2.3, no other changes. All DB accesses get this response:
{
"error": "internal_server_error",
"reason": "No DB shards could be opened.",
"ref": 1699161575
}
$ tail /opt/couchdb/couchdb.log
[error] 2019-01-31T21:02:17.885747Z couchdb@127.0.0.1 <0.260.0> -------- Could not get design docs for <<"shards/20000000-3fffffff/_users.1519191048">> error:{error,{nodedown,<<"progress not possible">>}}
@sf-mrichter
sf-mrichter / couchdb.log
Created June 29, 2018 17:22
Last 720 lines in the log
[info] 2018-06-29T17:01:25.960891Z couchdb@localhost <0.2936.0> -------- Opening index for db: shards/40000000-5fffffff/host_db.1523489983 idx: _design/doc sig: "8a202e39f1bfc1220faac69e3b557c89"
[info] 2018-06-29T17:01:25.960929Z couchdb@localhost <0.2942.0> -------- Opening index for db: shards/e0000000-ffffffff/host_db.1523489983 idx: _design/doc sig: "8a202e39f1bfc1220faac69e3b557c89"
[info] 2018-06-29T17:01:25.960943Z couchdb@localhost <0.2954.0> -------- Opening index for db: shards/80000000-9fffffff/host_db.1523489983 idx: _design/doc sig: "8a202e39f1bfc1220faac69e3b557c89"
[info] 2018-06-29T17:01:25.960948Z couchdb@localhost <0.2938.0> -------- Opening index for db: shards/a0000000-bfffffff/host_db.1523489983 idx: _design/doc sig: "8a202e39f1bfc1220faac69e3b557c89"
[info] 2018-06-29T17:01:25.960970Z couchdb@localhost <0.2962.0> -------- Starting index update for db: shards/40000000-5fffffff/host_db.1523489983 idx: _design/doc
[info] 2018-06-29T17:01:25.961007Z couchdb@localhost <0.2963.0> -------- Sta
@sf-mrichter
sf-mrichter / gist:e0a3d9207d3a74d1d1a1fdeb1c0039eb
Created May 16, 2018 19:27
Diff between our modified local.ini and the original distribution local.ini
[solarflare@localhost ~]$ sudo diff -uw /opt/couchdb/etc/local.ini* | more
--- /opt/couchdb/etc/local.ini 2018-05-16 15:16:42.497615158 -0400
+++ /opt/couchdb/etc/local.ini.orig 2017-11-07 17:57:46.000000000 -0500
@@ -5,10 +5,8 @@
; overwritten on server upgrade.
[couchdb]
-delayed_commits = true
;max_document_size = 4294967296 ; bytes
;os_process_timeout = 5000
@sf-mrichter
sf-mrichter / gist:8f8fa9c9b2e3d0794c9cffb5b82c1086
Created May 15, 2018 00:46
couchdb error log for attempts to create a user
[error] 2018-05-15T00:23:24.879371Z couchdb@localhost <0.539.0> -------- OS Process Error <0.540.0> :: {os_process_error,{exit_status,1}}
[error] 2018-05-15T00:23:29.868522Z couchdb@localhost <0.526.0> -------- rexi_server: from: couchdb@localhost(<0.522.0>) mfa: fabric_rpc:update_docs/3 exit:{timeout,{gen_server,call,[couch_proc_manager,{get_proc,{doc,<<"_design/_auth">>,{1,[<<199,155,192,12,136,156,233,185,18,251,222,138,63,82,222,55>>]},{[{<<"language">>,<<"javascript">>},{<<"validate_doc_update">>,<<"\n function(newDoc, oldDoc, userCtx, secObj) {\n if (newDoc._deleted === true) {\n // allow deletes by admins and matching users\n // without checking the other fields\n if ((userCtx.roles.indexOf('_admin') !== -1) ||\n (userCtx.name == oldDoc.name)) {\n return;\n } else {\n throw({forbidden: 'Only admins may delete other user docs.'});\n }\n }\n\n if (newDoc.type !== 'user') {\n
@sf-mrichter
sf-mrichter / gist:054c6c5433c7e55e0fe72d1dce96eb46
Created November 14, 2017 17:41
Top output summary for couchdb > 100% CPU
Tasks: 151 total, 1 running, 150 sleeping, 0 stopped, 0 zombie
%Cpu(s): 78.6 us, 7.1 sy, 0.0 ni, 14.3 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem : 3836948 total, 1739740 free, 1082068 used, 1015140 buff/cache
KiB Swap: 4063228 total, 4063228 free, 0 used. 2438048 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1198 couchdb 20 0 1394920 145952 5788 S 126.7 3.8 5267:03 beam.smp
44730 root 20 0 486848 54528 7028 S 46.7 1.4 9:39.67 python
1 root 20 0 190880 3908 2520 S 0.0 0.1 0:33.57 systemd
@sf-mrichter
sf-mrichter / two.errors
Created October 5, 2017 22:15
Two errors that seem to be related
[error] 2017-10-05T23:04:00.016621Z couchdb@localhost <0.4376.2400> 49a6ccf549 req_err(2413987899) internal_server_error : No DB shards could be opened.
[<<"fabric_util:get_shard/4 L180">>,<<"fabric_util:get_shard/4 L193">>,<<"fabric_util:get_shard/4 L193">>,<<"fabric:get_security/2 L146">>,<<"chttpd_auth_request:db_authorization_check/1 L87">>,<<"chttpd_auth_request:authorize_request/1 L19">>,<<"chttpd:process_request/1 L291">>,<<"chttpd:handle_request_int/1 L229">>]
[error] 2017-10-05T23:04:30.005876Z couchdb@localhost <0.2852.2401> -------- CRASH REPORT Process (<0.2852.2401>) with 1 neighbors exited with reason: no match of right hand value {error,eacces} at couch_file:init/1(line:381) <= gen_server:init_it/6(line:328) <= proc_lib:init_p_do_apply/3(line:247) at gen_server:init_it/6(line:352) <= proc_lib:init_p_do_apply/3(line:247); initial_call: {couch_file,init,['Argument__1']}, ancestors: [<0.1159.2401>], messages: [], links: [#Port<0.148105>,<0.1159.2401>], dictionary: [], trap_exit: true, status:
@sf-mrichter
sf-mrichter / errors.after._users
Created October 4, 2017 18:32
Errors seen even after creating _users
[error] 2017-10-04T19:07:07.009406Z couchdb@localhost <0.1148.757> 136bd4568f req_err(2413987899) internal_server_error : No DB shards could be opened.
[<<"fabric_util:get_shard/4 L180">>,<<"fabric_util:get_shard/4 L193">>,<<"fabric_util:get_shard/4 L193">>,<<"fabric:get_security/2 L146">>,<<"chttpd_auth_request:db_authorization_check/1 L87">>,<<"chttpd_auth_request:authorize_request/1 L19">>,<<"chttpd:process_request/1 L291">>,<<"chttpd:handle_request_int/1 L229">>]
@sf-mrichter
sf-mrichter / Odd.directories
Created October 4, 2017 17:56
Strange directories on localhost
$ locate shards
/opt/couchdb/lib/mem3-2.1.0/ebin/mem3_shards.beam
/var/lib/couchdb/.shards
/var/lib/couchdb/shards
/var/lib/couchdb/.couchdb/shards
/var/lib/couchdb/.couchdb/couchdb/shards
/var/lib/couchdb/.couchdb/couchdb/couchdb/shards
/var/lib/couchdb/.couchdb/couchdb/couchdb/couchdb/shards
/var/lib/couchdb/.couchdb/couchdb/couchdb/couchdb/couchdb/shards
/var/lib/couchdb/.couchdb/couchdb/couchdb/couchdb/couchdb/couchdb/shards