Reputation: 101
I'm trying to run Yaws 1.94 on my Mac OS X 10.8 and it crashes. I'm running Erlang R15B01
I am using macports to install this with the commands:
sudo port selfupdate
sudo port install erlang +ssl yaws
export ERL_LIBS=/opt/local/lib/yaws/
sudo mkdir /etc/yaws/
sudo cp /opt/local/etc/yaws/yaws.conf.template /etc/yaws/yaws.conf
When I run yaws, it crashes
$ sudo yaws -i --conf /etc/yaws/yaws.conf
Erlang R15B01 (erts-5.9.1) [source] [64-bit] [smp:4:4] [async-threads:0] [hipe] [kernel- poll:true]
Eshell V5.9.1 (abort with ^G)
1>
=INFO REPORT==== 25-Jul-2012::16:36:20 ===
Yaws: Using config file /etc/yaws/yaws.conf
=INFO REPORT==== 25-Jul-2012::16:36:20 ===
yaws debug:Add path "/opt/local/var/yaws/ebin"
=INFO REPORT==== 25-Jul-2012::16:36:20 ===
yaws debug:Add path "/opt/local/lib/yaws/ebin"
=INFO REPORT==== 25-Jul-2012::16:36:20 ===
yaws debug:Add path "/opt/local/lib/yaws/examples/ebin"
=INFO REPORT==== 25-Jul-2012::16:36:20 ===
yaws debug:Running with id="default" (localinstall=false)
Running with debug checks turned on (slower server)
to directory "/opt/local/var/log/yaws"
=INFO REPORT==== 25-Jul-2012::16:36:20 ===
application: yaws
exited: {shutdown,{yaws_app,start,[normal,[]]}}
type: permanent
{"Kernel pid terminated",application_controller,"{application_start_failure,yaws,{shutdown,{yaws_app,start,[normal,[]]}}}"}
Crash dump was written to: erl_crash.dump
Kernel pid terminated (application_controller) ({application_start_failure,yaws,{shutdown,{yaws_app,start,[normal,[]]}}})
When I check to see if there is a yaws process around (ps -efw | grep yaws) and there is none
What am I missing here? I would love to be able to use Yaws on Mac OS X. Thanks
$ sudo yaws -i --conf /etc/yaws/yaws.conf --erlarg '-boot start_sasl'
Erlang R15B01 (erts-5.9.1) [source] [64-bit] [smp:4:4] [async-threads:0] [hipe] [kernel-poll:true]
=PROGRESS REPORT==== 26-Jul-2012::15:41:44 ===
supervisor: {local,sasl_safe_sup}
started: [{pid,<0.34.0>},
{name,alarm_handler},
{mfargs,{alarm_handler,start_link,[]}},
{restart_type,permanent},
{shutdown,2000},
{child_type,worker}]
=PROGRESS REPORT==== 26-Jul-2012::15:41:44 ===
supervisor: {local,sasl_safe_sup}
started: [{pid,<0.35.0>},
{name,overload},
{mfargs,{overload,start_link,[]}},
{restart_type,permanent},
{shutdown,2000},
{child_type,worker}]
=PROGRESS REPORT==== 26-Jul-2012::15:41:44 ===
supervisor: {local,sasl_sup}
started: [{pid,<0.33.0>},
{name,sasl_safe_sup},
{mfargs,
{supervisor,start_link,
[{local,sasl_safe_sup},sasl,safe]}},
{restart_type,permanent},
{shutdown,infinity},
{child_type,supervisor}]
=PROGRESS REPORT==== 26-Jul-2012::15:41:44 ===
supervisor: {local,sasl_sup}
started: [{pid,<0.36.0>},
{name,release_handler},
{mfargs,{release_handler,start_link,[]}},
{restart_type,permanent},
{shutdown,2000},
{child_type,worker}]
=PROGRESS REPORT==== 26-Jul-2012::15:41:44 ===
application: sasl
started_at: nonode@nohost
=PROGRESS REPORT==== 26-Jul-2012::15:41:44 ===
supervisor: {local,yaws_sup}
started: [{pid,<0.43.0>},
{name,yaws_log},
{mfargs,{yaws_log,start_link,[]}},
{restart_type,permanent},
{shutdown,5000},
{child_type,worker}]
=PROGRESS REPORT==== 26-Jul-2012::15:41:44 ===
supervisor: {local,yaws_sup}
started: [{pid,<0.44.0>},
{name,yaws_trace},
{mfargs,{yaws_trace,start_link,[]}},
{restart_type,permanent},
{shutdown,5000},
{child_type,worker}]
Eshell V5.9.1 (abort with ^G)
1>
=INFO REPORT==== 26-Jul-2012::15:41:44 ===
Yaws: Using config file /etc/yaws/yaws.conf
=INFO REPORT==== 26-Jul-2012::15:41:44 ===
yaws debug:Add path "/opt/local/var/yaws/ebin"
=INFO REPORT==== 26-Jul-2012::15:41:44 ===
yaws debug:Add path "/opt/local/lib/yaws/ebin"
=INFO REPORT==== 26-Jul-2012::15:41:44 ===
yaws debug:Add path "/opt/local/lib/yaws/examples/ebin"
=INFO REPORT==== 26-Jul-2012::15:41:44 ===
yaws debug:Running with id="default" (localinstall=false)
Running with debug checks turned on (slower server)
Logging to directory "/opt/local/var/log/yaws"
=CRASH REPORT==== 26-Jul-2012::15:41:44 ===
crasher:
initial call: yaws_server:init/1
pid: <0.45.0>
registered_name: []
exception exit: {{badmatch,{error,enotdir}},
[{yaws_server,setup_dirs,1,
[{file,"yaws_server.erl"},{line,525}]},
{yaws_server,init2,5,
[{file,"yaws_server.erl"},{line,200}]},
{gen_server,init_it,6,
[{file,"gen_server.erl"},{line,304}]},
{proc_lib,init_p_do_apply,3,
[{file,"proc_lib.erl"},{line,227}]}]}
in function gen_server:init_it/6 (gen_server.erl, line 328)
ancestors: [yaws_sup,<0.41.0>]
messages: []
links: [<0.42.0>]
dictionary: [{start_time,{{2012,7,26},{15,41,44}}},
{gc,{gconf,"/opt/local/lib/yaws",false,102,
"/opt/local/var/log/yaws",
["/opt/local/var/yaws/ebin",
"/opt/local/lib/yaws/ebin",
"/opt/local/lib/yaws/examples/ebin"],
[],30000,nolimit,400,1000000,8000,nolimit,[],
10240,[],1000000,0,
["/opt/local/lib/yaws/include",
"/opt/local/lib/yaws/examples/include"],
"/usr/bin/php-cgi","Yaws 1.94","default",false,
[],yaws_session_server,8}}]
trap_exit: true
status: running
heap_size: 2584
stack_size: 24
reductions: 40977
neighbours:
=SUPERVISOR REPORT==== 26-Jul-2012::15:41:44 ===
Supervisor: {local,yaws_sup}
Context: start_error
Reason: {{badmatch,{error,enotdir}},
[{yaws_server,setup_dirs,1,
[{file,"yaws_server.erl"},{line,525}]},
{yaws_server,init2,5,[{file,"yaws_server.erl"},{line,200}]},
{gen_server,init_it,6,[{file,"gen_server.erl"},{line,304}]},
{proc_lib,init_p_do_apply,3,
[{file,"proc_lib.erl"},{line,227}]}]}
Offender: [{pid,undefined},
{name,yaws_server},
{mfargs,
{yaws_server,start_link,
[{env,true,false,false,
{file,"/etc/yaws/yaws.conf"},
false,false,"default"}]}},
{restart_type,permanent},
{shutdown,120000},
{child_type,worker}]
=INFO REPORT==== 26-Jul-2012::15:41:44 ===
application: yaws
exited: {shutdown,{yaws_app,start,[normal,[]]}}
type: permanent
{"Kernel pid terminated",application_controller,"{application_start_failure,yaws,{shutdown,{yaws_app,start,[normal,[]]}}}"}
Crash dump was written to: erl_crash.dump
Kernel pid terminated (application_controller) ({application_start_failure,yaws,{shutdown,{yaws_app,start,[normal,[]]}}})
Upvotes: 2
Views: 914
Reputation: 7836
looking at the error in the crash message exception exit: {badmatch,{error,enotdir}}
. This looks like yaws expected a directory somewhere and its finding something else. i suggest that you look at the line 525
in the file yaws_server.erl
. you could even put an io:format/2
and see what yaws is getting at that point. It could be a mal-formatted directory name, perhaps containing spaces. You could also try to check the conf file its using to start and look at the PATHS
that the server wants to use as the docroot
. Also, check the permissions of the installation directory of yaws, and all the Directories
that yaws wants to look into.
Upvotes: 1
Reputation: 20004
I'm not sure of the origins or viability of the builds of Erlang and Yaws one can retrieve via macports, so I have no idea whether they actually work or not. Personally I don't use macports because of problems with other software I got from there.
To try to get more information about what's going wrong with your Yaws installation, start Yaws like this:
sudo yaws -i --conf /etc/yaws/yaws.conf --erlarg '-boot start_sasl'
Hopefully sasl
can give us more information about the underlying issues.
Upvotes: 1