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.
i have problem with running rabbitmq-server on CentOS 6.
Im getting such message while trying to start rabbitmq-server:
starting networking ...BOOT ERROR: FAILED
Reason: {badmatch,
{error,
{shutdown,
{child,undefined,'rabbit_tcp_listener_sup_:::5672',
{tcp_listener_sup,start_link,
[{0,0,0,0,0,0,0,0},
5672,
[inet6,binary,
{packet,raw},
{reuseaddr,true},
{backlog,128},
{nodelay,true},
{exit_on_close,false}],
{rabbit_networking,tcp_listener_started,[amqp]},
{rabbit_networking,tcp_listener_stopped,[amqp]},
{rabbit_networking,start_client,[]},
"TCP Listener"]},
transient,infinity,supervisor,
[tcp_listener_sup]}}}}
Stacktrace: [{rabbit_networking,start_listener0,4},
{rabbit_networking,'-start_listener/4-lc$^0/1-0-',4},
{rabbit_networking,start_listener,4},
{rabbit_networking,'-boot_tcp/0-lc$^0/1-0-',1},
{rabbit_networking,boot_tcp,0},
{rabbit_networking,boot,0},
{rabbit,'-run_boot_step/1-lc$^1/1-1-',1},
{rabbit,run_boot_step,1}]
Erlang has closed
{"Kernel pid terminated",application_controller,"{application_start_failure,rabbit,{bad_return,{{rabbit,start,[normal,[]]},{'EXIT',{rabbit,failure_during_boot}}}}}"}
Crash dump was written to: erl_crash.dump
Kernel pid terminated (application_controller) ({application_start_failure,rabbit,{bad_return,{{rabbit,start,[normal,[]]},{'EXIT',{rabbit,failure_during_boot}}}}})
In rabbitmq-env.conf i have:
NODENAME=main
CONFIG_FILE=/etc/rabbitmq/
Also in rabbitmq.config i have:
[
{rabbit, [{tcp_listeners, [{"0.0.0.0", 5672}]}]}
].
Hmm? Does anyone know where is the problem?
Thanks in advance
Erlang version: R13B01
Currently I'm struggling trying to make Erlang work with SSL. The programming part was easy, but now starting the system SSL-enabled is not.
Following the Erlang SSL documentation:
1 - Made the start_ssl.rel file
{release, {"OTP APN 181 01","R13B01"}, {erts, "5.7.2"},
[{kernel,"2.13.2"},
{stdlib,"1.16.2"},
{sasl,"2.1.6"},
{os_mon,"2.2.2"},
{ssl,"3.10.3"}]}.
2 - Executed the following command
1> systools:make_script("start_ssl",[]).
According to the documentation, running the shell would output this (this output is from docs, not mine):
$ erl -boot /home/me/ssl/start_ssl
Erlang (BEAM) emulator version 5.0
Eshell V5.0 (abort with ^G)
1> whereis(ssl_server).
<0.32.0>
But, I'm receiving this instead:
erl -boot start_ssl
Erlang R13B01 (erts-5.7.2) [source] [smp:2:2] [rq:2] [async-threads:0] [kernel-poll:false]
1> whereis(ssl_server).
undefined
2>
So, for now, the remaining steps are failing too. Sadly, there is no documentation nor forum threads around the web with the same issue.
Any tips?
Well, after some try and error, I've managed to start the system:
application:start(ssl)
and passing all certificates when creating the listening socket
ssl:listen(Port, ?TCP_OPTIONS ++ [{ip, Host},{verify, 0},
{depth, 0},
{cacertfile, Cacertfile},
{certfile, Certfile},
{keyfile, Keyfile}])
It worked :)