yaws built with crypto fails to start - cryptography

I need to use hashed passwords for authentication in Yaws.
I've rebuilt it from source (https://github.com/klacke/yaws), with this sequence of commands:
./configure --enable-crypto --prefix=/some/local/path
make install
When I run yaws (/some/local/path/bin/yaws -i -erlarg "-boot start_sasl"), I get this error:
{"init terminating in do_boot",{{badmatch,{'EXIT',{badarg,[{erlang,list_to_existing_atom,["crypto"],[]},{yaws,'-start_app_deps/0-fun-0-',2,[{file,"yaws.erl"},{line,264}]},{lists,foldl,3,[{file,"lists.erl"},{line,1263}]},{yaws,start_app_deps,0,[{file,"yaws.erl"},{line,263}]},{yaws,start,0,[{file,"yaws.erl"},{line,209}]},{init,start_em,1,[]},{init,do_boot,3,[]}]}}},[{yaws,start,0,[{file,"yaws.erl"},{line,209}]},{init,start_em,1,[]},{init,do_boot,3,[]}]}}
The crypto library is present:
checking for Erlang/OTP 'crypto' library subdirectory... /usr/local/Cellar/erlang/19.2/lib/erlang/lib/crypto-3.7.2
checking for Erlang/OTP 'crypto' library version... 3.7.2
What is this problem caused by? Do I need to pass some specific options to run the newly built Yaws server?
When I run make test, all tests pass.
EDIT
Starting yaws with bin/yaws -i -erlarg "-init_debug" yields this output:
{progress,preloaded}
{progress,kernel_load_completed}
{progress,modules_loaded}
{start,heart}
{start,error_logger}
{start,application_controller}
{progress,init_kernel_started}
{apply,{application,load,[{application,stdlib,[{description,"ERTS CXC 138 10"},{vsn,"3.2"},{id,[]},{modules,[array,base64,beam_lib,binary,c,calendar,dets,dets_server,dets_sup,dets_utils,dets_v8,dets_v9,dict,digraph,digraph_utils,edlin,edlin_expand,epp,eval_bits,erl_anno,erl_bits,erl_compile,erl_eval,erl_expand_records,erl_internal,erl_lint,erl_parse,erl_posix_msg,erl_pp,erl_scan,erl_tar,error_logger_file_h,error_logger_tty_h,escript,ets,file_sorter,filelib,filename,gb_trees,gb_sets,gen,gen_event,gen_fsm,gen_server,gen_statem,io,io_lib,io_lib_format,io_lib_fread,io_lib_pretty,lib,lists,log_mf_h,maps,math,ms_transform,orddict,ordsets,otp_internal,pool,proc_lib,proplists,qlc,qlc_pt,queue,rand,random,re,sets,shell,shell_default,slave,sofs,string,supervisor,supervisor_bridge,sys,timer,unicode,win32reg,zip]},{registered,[timer_server,rsh_starter,take_over_monitor,pool_master,dets]},{applications,[kernel]},{included_applications,[]},{env,[]},{maxT,infinity},{maxP,infinity}]}]}}
{progress,applications_loaded}
{apply,{application,start_boot,[kernel,permanent]}}
Erlang/OTP 19 [erts-8.2] [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:true] [dtrace]
{apply,{application,start_boot,[stdlib,permanent]}}
{apply,{application,start_boot,[sasl,permanent]}}
=PROGRESS REPORT==== 20-Nov-2018::14:09:57 ===
supervisor: {local,sasl_safe_sup}
started: [{pid,<0.60.0>},
{id,alarm_handler},
{mfargs,{alarm_handler,start_link,[]}},
{restart_type,permanent},
{shutdown,2000},
{child_type,worker}]
=PROGRESS REPORT==== 20-Nov-2018::14:09:57 ===
supervisor: {local,sasl_sup}
started: [{pid,<0.59.0>},
{id,sasl_safe_sup},
{mfargs,
{supervisor,start_link,
[{local,sasl_safe_sup},sasl,safe]}},
{restart_type,permanent},
{shutdown,infinity},
{child_type,supervisor}]
=PROGRESS REPORT==== 20-Nov-2018::14:09:57 ===
supervisor: {local,sasl_sup}
started: [{pid,<0.61.0>},
{id,release_handler},
{mfargs,{release_handler,start_link,[]}},
{restart_type,permanent},
{shutdown,2000},
{child_type,worker}]
{apply,{c,erlangrc,[]}}
=PROGRESS REPORT==== 20-Nov-2018::14:09:57 ===
application: sasl
started_at: nonode#nohost
{progress,started}
{"init terminating in do_boot",{{badmatch,{'EXIT',{badarg,[{erlang,list_to_existing_atom,["crypto"],[]},{yaws,'-start_app_deps/0-fun-0-',2,[{file,"yaws.erl"},{line,264}]},{lists,foldl,3,[{file,"lists.erl"},{line,1263}]},{yaws,start_app_deps,0,[{file,"yaws.erl"},{line,263}]},{yaws,start,0,[{file,"yaws.erl"},{line,209}]},{init,start_em,1,[]},{init,do_boot,3,[]}]}}},[{yaws,start,0,[{file,"yaws.erl"},{line,209}]},{init,start_em,1,[]},{init,do_boot,3,[]}]}}
init terminating in do_boot ()
It appears that the crypto service is not started.

Related

run rabbitmq on windows

I was using rabbitmq on Windows about 6 months ago, now I am reinstalling rabbitmq and erlang but I get this error:
C:\Program Files\new_RabbitMQ Server\rabbitmq_server-3.8.12\sbin>rabbitmq-server
Configuring logger redirection
12:49:39.059 [warning] Using RABBITMQ_ADVANCED_CONFIG_FILE: c:/Users/ALFA RAYAN/AppData/Roaming/RabbitMQ/advanced.config
12:49:39.810 [error]
BOOT FAILED
12:49:39.810 [error] BOOT FAILED
===========
12:49:39.810 [error] ===========
ERROR: distribution port 25672 in use by another node: rabbit#Ali
12:49:39.810 [error] ERROR: distribution port 25672 in use by another node: rabbit#Ali
12:49:39.810 [error]
12:49:40.826 [error] Supervisor rabbit_prelaunch_sup had child prelaunch started with rabbit_prelaunch:run_prelaunch_first_phase() at undefined exit with reason {dist_port_already_used,25672,"rabbit","Ali"} in context start_error
12:49:40.826 [error] CRASH REPORT Process <0.150.0> with 0 neighbours exited with reason: {{shutdown,{failed_to_start_child,prelaunch,{dist_port_already_used,25672,"rabbit","Ali"}}},{rabbit_prelaunch_app,start,[normal,[]]}} in application_master:init/4 line 138
{"Kernel pid terminated",application_controller,"{application_start_failure,rabbitmq_prelaunch,{{shutdown,{failed_to_start_child,prelaunch,{dist_port_already_used,25672,\"rabbit\",\"Ali\"}}},{rabbit_prelaunch_app,start,[normal,[]]}}}"}
Kernel pid terminated (application_controller) ({application_start_failure,rabbitmq_prelaunch,{{shutdown,{failed_to_start_child,prelaunch,{dist_port_already_used,25672,"rabbit","Ali"}}},{rabbit_prelau
Crash dump is being written to: erl_crash.dump...done
i use otp_win64_23.2 and rabbitmq-server-3.8.12
Go to windows services and look for RabbitMQ. Right click on it and stop the service.
Restart the RabbitMQ server in an administrator mode. This worked for me.

Rabbitmq server failed to boot

I'm trying to start my rabbitmq server using command:sudo rabbitmq-server on ubuntu 20.04 but it crashes.I have absolutely no clue whatsoever as to what I should do.
Rabbitmq version: 3.8.5 erlang version: 23
17:41:07.587 [error]
17:41:07.591 [error] BOOT FAILED
BOOT FAILED
17:41:07.592 [error] ===========
===========
17:41:07.592 [error] ERROR: distribution port 25672 in use by rabbit#nadaanbaalak
ERROR: distribution port 25672 in use by rabbit#nadaanbaalak
17:41:07.592 [error]
17:41:08.594 [error] Supervisor rabbit_prelaunch_sup had child prelaunch started with rabbit_prelaunch:run_prelaunch_first_phase() at undefined exit with reason {dist_port_already_used,25672,"rabbit","nadaanbaalak"} in context start_error
17:41:08.594 [error] CRASH REPORT Process <0.153.0> with 0 neighbours exited with reason: {{shutdown,{failed_to_start_child,prelaunch,{dist_port_already_used,25672,"rabbit","nadaanbaalak"}}},{rabbit_prelaunch_app,start,[normal,[]]}} in application_master:init/4 line 138
{"Kernel pid terminated",application_controller,"{application_start_failure,rabbitmq_prelaunch,{{shutdown,{failed_to_start_child,prelaunch,{dist_port_already_used,25672,\"rabbit\",\"nadaanbaalak\"}}},{rabbit_prelaunch_app,start,[normal,[]]}}}"}
Kernel pid terminated (application_controller) ({application_start_failure,rabbitmq_prelaunch,{{shutdown,{failed_to_start_child,prelaunch,{dist_port_already_used,25672,"rabbit","nadaanbaalak"}}},{rabb
Crash dump is being written to: erl_crash.dump...done
Any help would be great
It's pretty simple. Just needed to look at the logs. killed the process at the port number "25672" and restarted the rabbitmq server.

Error Installing RabbitMQ on Ubuntu 16.04

I'm trying to setup RabbitMQ on Ubuntu 16.04. I've installed Erlang on my machine by following this blog. I'm getting this error when I do this sudo apt-get install rabbitmq-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
rabbitmq-server is already the newest version (3.8.0-1).
0 upgraded, 0 newly installed, 0 to remove and 118 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Setting up rabbitmq-server (3.8.0-1) ...
Job for rabbitmq-server.service failed because the control process exited with error code.
See "systemctl status rabbitmq-server.service" and "journalctl -xe" for details.
invoke-rc.d: initscript rabbitmq-server, action "start" failed.
● rabbitmq-server.service - RabbitMQ broker
Loaded: loaded (/lib/systemd/system/rabbitmq-server.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Fri 2019-10-11 19:35:40 IST; 4ms ago
Process: 20134 ExecStart=/usr/lib/rabbitmq/bin/rabbitmq-server (code=exited, status=1/FAILURE)
Main PID: 20134 (code=exited, status=1/FAILURE)
Oct 11 19:35:40 developer-OptiPlex-3020 systemd[1]: Failed to start RabbitMQ broker.
dpkg: error processing package rabbitmq-server (--configure):
installed rabbitmq-server package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
rabbitmq-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
Any knowledge on how to fix this would help me. Thanks.

Failed to deploy the latest rabbitmq?

I install erlang(erlang-20.3.7-1.el7.centos.x86_64.rpm),the installed rabbimq(rabbitmq-server-3.7.6). When I check the node status, rabbitmqctl got the
crush message.Have I lost something? Many appritiation!
=INFO REPORT==== 20-Jun-2018::11:11:00.813218 ===
application: logger
exited: {{shutdown,
{failed_to_start_child,'Elixir.Logger.ErrorHandler',noproc}},
{'Elixir.Logger.App',start,[normal,[]]}}
type: temporary
Could not start application logger: Logger.App.start(:normal, []) returned an error: shutdown: failed to start child: Logger.ErrorHandler
** (EXIT) no process: the process is not alive or there's no process currently associated with the given name, possibly because its application isn't started
I just installed rabbitmq-server v3.7.6 and If you are running debian-based distro, makes sure you have pinned your esl-erlang and erlang* package to 20.3.x (see here for more detail). Also, makes sure /var/lib/rabbitmq directory belongs to rabbitmq user and group. If not, use chown -R rabbitmq:rabbitmq /var/lib/rabbitmq to fix it.
And finally, just install one of these packages, esl-erlang or erlang.
I saw that you type erlang-20.3.7-1.el7.centos.x86_64.rpm, but the latest version for v20.3.x branch is v20.3.6. Please check it again...
Read the rabbitmq compatibility with erlang/otp here. I already tested using above configuration, and it works perfectly after I typed sudo rabbitmq-ctl status.
If success, you may see below result.
Status of node rabbit#eternalbox ...
[{pid,28772},
{running_applications,
[{rabbit,"RabbitMQ","3.7.6"},
{mnesia,"MNESIA CXC 138 12","4.15.3"},
{rabbit_common,
"Modules shared by rabbitmq-server and rabbitmq-erlang-client",
"3.7.6"},
{ranch_proxy_protocol,"Ranch Proxy Protocol Transport","1.5.0"},
{ranch,"Socket acceptor pool for TCP protocols.","1.5.0"},
{ssl,"Erlang/OTP SSL application","8.2.6"},
{public_key,"Public key infrastructure","1.5.2"},
{asn1,"The Erlang ASN1 compiler version 5.0.5","5.0.5"},
{os_mon,"CPO CXC 138 46","2.4.4"},
{crypto,"CRYPTO","4.2.2"},
{jsx,"a streaming, evented json parsing toolkit","2.8.2"},
{xmerl,"XML parser","1.3.16"},
{inets,"INETS CXC 138 49","6.5.1"},
{recon,"Diagnostic tools for production use","2.3.2"},
{lager,"Erlang logging framework","3.5.1"},
{goldrush,"Erlang event stream processor","0.1.9"},
{compiler,"ERTS CXC 138 10","7.1.5"},
{syntax_tools,"Syntax tools","2.1.4"},
{syslog,"An RFC 3164 and RFC 5424 compliant logging framework.","3.4.2"},
{sasl,"SASL CXC 138 11","3.1.2"},
{stdlib,"ERTS CXC 138 10","3.4.5"},
{kernel,"ERTS CXC 138 10","5.4.3"}]},
{os,{unix,linux}},
{erlang_version,
"Erlang/OTP 20 [erts-9.3.1] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:128] [hipe] [kernel-poll:true]\n"},
{memory,
[{connection_readers,0},
{connection_writers,0},
{connection_channels,0},
{connection_other,0},
{queue_procs,0},
{queue_slave_procs,0},
{plugins,5936},
{other_proc,19686048},
{metrics,184824},
{mgmt_db,0},
{mnesia,73040},
{other_ets,1882432},
{binary,57352},
{msg_index,28976},
{code,25081646},
{atom,1041593},
{other_system,12953873},
{allocated_unused,16013176},
{reserved_unallocated,2306048},
{strategy,rss},
{total,[{erlang,60995720},{rss,79314944},{allocated,77008896}]}]},
{alarms,[]},
{listeners,[{clustering,25672,"::"},{amqp,5672,"::"}]},
{vm_memory_calculation_strategy,rss},
{vm_memory_high_watermark,0.4},
{vm_memory_limit,6579339264},
{disk_free_limit,50000000},
{disk_free,118526930944},
{file_descriptors,
[{total_limit,924},{total_used,2},{sockets_limit,829},{sockets_used,0}]},
{processes,[{limit,1048576},{used,211}]},
{run_queue,0},
{uptime,87},
{kernel,{net_ticktime,60}}]
Good luck!
because you are having the wrong version of the erlang to install it properly you need the latest erlang version 20.3 because the 21 version only works with rabbitmq version 3.7.6 beta.
To install rabbitmq and its dependency
sudo apt install rabbitmq-server erlang-base=1:20.3-1 erlang-syntax-tools=1:20.3-1 erlang-asn1=1:20.3-1 erlang-crypto=1:20.3-1 erlang-mnesia=1:20.3-1 erlang-runtime-tools=1:20.3-1 erlang-public-key=1:20.3-1 erlang-ssl=1:20.3-1 erlang-diameter=1:20.3-1 erlang-inets=1:20.3-1 erlang-xmerl=1:20.3-1 erlang-edoc=1:20.3-1 erlang-eldap=1:20.3-1 erlang-erl-docgen=1:20.3-1 erlang-eunit=1:20.3-1 erlang-ic=1:20.3-1 erlang-inviso=1:20.3-1 erlang-odbc=1:20.3-1 erlang-snmp=1:20.3-1 erlang-os-mon=1:20.3-1 erlang-parsetools=1:20.3-1 erlang-percept=1:20.3-1 erlang-ssh=1:20.3-1 erlang-tools=1:20.3-1 erlang-nox=1:20.3-1

Erlang "host key verification" error

I'm new in tsung and erlang and I want to distribution on tsung.
When I use this command:
ardic#base-64-arcsp:~/tsungtest$ erl -rsh ssh -name ardic#tsung -setcookie tsung"
Erlang R13B03 (erts-5.7.4) [source] [64-bit] [rq:1] [async-threads:0] [hipe] [kernel-poll:false]
Eshell V5.7.4 (abort with ^G)
(ardic#tsung)1> slave:start(tsungnode2,ardic,"-setcookie tsung").
"{error,timeout}
I took this error.
And I did everything in tsung FAQ about error, timeout.
Do you have any idea?
I met the same error on my virtual ubuntu, and at last I found: virtual ubuntu can be master but not be slave (another centos can be slave or master ). I do not know why . I'll join the mail list to ask for more help.
=INFO REPORT==== 28-Mar-2012::01:00:09 ===
ts_os_mon_erlang:(3:<0.2713.0>) Fail to start beam on host "centos-181" ({error,
timeout})
=ERROR REPORT==== 28-Mar-2012::01:00:09 ===
** Generic server <0.2713.0> terminating
** Last message in was {timeout,#Ref<0.0.0.26000>,start_beam}
** When Server state == {state,{global,ts_mon},
10000,undefined,"centos-181",undefined}
** Reason for termination ==
** {error,timeout}