Erlang Mailing Lists

Author Message

<  Yaws mailing list  ~  Getting Yapp started on EC2 AMI instance

beadsland
Posted: Thu Jun 16, 2011 10:31 pm Reply with quote
Joined: 16 Jun 2011 Posts: 8
Yesterday, I started working with yapp in my development environment: win32 yaws 1.90, Erlang OTP R14B03. Followed the instructions for yapp_intro, and everything worked like a charm!

Today, I tried getting the same configuration working on an Amazon EC2 micro instance that I'm using to stage and share developed code.

Following compile and mnesia schema creation, I stopped my Yaws daemon and fired it up in interactive mode. Yapp would get as far as waiting for Yaws to become available, announce it was starting, and then do nothing more. Silent failure.

Attempting to load the file from erl commandline reported a syntax error in yapp.app. Upon closer examination, it turned out that %VSN% and %MODULES% had not been replaced during the make from yapp.app.src.

Examining the Yaws include.mk, I discovered that the regex code in APPSCRIPT was looking for what looked like a pattern you'd see after direct checkout from git. Tooling APPSCRIPT to get it to match on the %var% form got me a yapp.app file with proper substitutions and no syntax errors.

So, I went back to yaws -i. This time I get pretty quickly:

{error,{shutdown,{yapp_app,start,[normal,[]]}}}

This suggests to me that something within the yapp supervisory tree is not starting properly, but I'm hesitant to start trying each and every module to see which one is dying a horrible death, without at least asking if anyone else has seen this problem before.


The funny thing is, it's usually Win32 versions of apps that are the most problem getting started in my experience. And yet when I start yaws -i using the very same Yaws 1.90 install package on my netbook, it happily ticks away, notifying me as it adds each yapp listed in yaws.conf. I'm blown away that getting the same thing to work on a (virtual) linux box has been such a challenge.


--------------------------------------------------------------------


Status update:

I've rolled back to 1.89. Perl regex problem appears to have been introduced with 1.90.

Further, after again blowing away and recreating the Mnesia db, 1.89 yapp loads and inserts yapps without incident.


---------------------------------------------------------------------------



Spoke too soon.

Yapp bootstraps without incident.

The yapp I added on my development server without issue, when added via the yapp control panel, crashes the yaws server after the next restart.

Only way to save it is to stop yaws, blow away the Mnesia database, and restart yaws, with yapp thus disabled.

I really don't get it.



Eshell V5.8.4 (abort with ^G)
1>
=INFO REPORT==== 16-Jun-2011::21:48:56 ===
Yaws: Using config file /opt/etc/yaws/yaws.conf
yaws:Add path "/opt/erl/yaws/applications/yapp/ebin"
yaws:Add path "/opt/erl/lekplay/ebin"
yaws:Add path "/opt/var/yaws/ebin"
yaws:Add path "/opt/lib/yaws/examples/ebin"
yaws:Add path "/opt/lib/yaws/examples/ebin"
yaws:Running with id="default" (localinstall=false)
Running with debug checks turned on (slower server)
Logging to directory "/opt/var/log/yaws"

=INFO REPORT==== 16-Jun-2011::21:48:56 ===
Ctlfile : /root/.yaws/yaws/default/CTL


=INFO REPORT==== 16-Jun-2011::21:48:56 ===
Yaws: Listening to 0.0.0.0:8080 for <1> virtual servers:
- http://internalserver:8080 under /opt/var/yaws/www

=INFO REPORT==== 16-Jun-2011::21:48:56 ===
sync call yapp:start

=INFO REPORT==== 16-Jun-2011::21:48:56 ===
Yapp starting but Yaws not ready - waiting 500 ms
=INFO REPORT==== 16-Jun-2011::21:48:56 ===
Yaws: Listening to 0.0.0.0:443 for <1> virtual servers:
- https://ip-10-195-205-240 under /tmp

=INFO REPORT==== 16-Jun-2011::21:48:56 ===
Yaws: Listening to 0.0.0.0:80 for <1> virtual servers:
- http://externalserver under /opt/erl/lekplay/priv/docroot

=INFO REPORT==== 16-Jun-2011::21:48:57 ===
Starting yapp

=INFO REPORT==== 16-Jun-2011::21:48:57 ===
Inserting App yapp in Url "/yapp"

=INFO REPORT==== 16-Jun-2011::21:48:57 ===
Starting app lekplay
=INFO REPORT==== 16-Jun-2011::21:48:57 ===
Inserting App lekplay in Url "/lekplay"

=INFO REPORT==== 16-Jun-2011::21:48:57 ===
update_sconf: Stats pid undefined


=INFO REPORT==== 16-Jun-2011::21:48:57 ===
stop_ready([], <0.62.0>)

=INFO REPORT==== 16-Jun-2011::21:48:57 ===
Updating sconf for server http://internalserver:8080

=INFO REPORT==== 16-Jun-2011::21:48:57 ===
Keeping conf for https://ip-10-195-205-240 intact

=INFO REPORT==== 16-Jun-2011::21:48:57 ===
Keeping conf for http://externalserver intact

=ERROR REPORT==== 16-Jun-2011::21:49:10 ===
Yaws process died: {{badrecord,gconf},
[{yaws_compile,new_out_file_name,2},
{yaws_compile,new_out_file,4},
{yaws_compile,compile_file,7},
{yaws_compile,'-compile_file/1-fun-0-',3},
{global,trans,4},
{yaws_server,do_yaws,4},
{yaws_server,aloop,3},
{yaws_server,acceptor0,2}]}


What's particularly confusing is that the yapps are all added to "internal server", but yaws goes down on a query to "external server" if any yapps other than yapp itself are in the registry.
View user's profile Send private message
beadsland
Posted: Fri Jun 17, 2011 3:08 am Reply with quote
Joined: 16 Jun 2011 Posts: 8
On a hunch that the problem might have been with mnesia, I switched to the ets registry. Same yaws crash as soon as any http request hit the server, again the error being a badrecord for gconf.

Did a side by side comparison of the yaws.conf file I'm using with the template supplied by 1.89. Other than the movement of auth log settings to server instances, there doesn't seem to have been any changes to yaws.conf from 1.89 to 1.90, so it isn't stray terms in yaws.conf polluting gconf.

Suggestions?
View user's profile Send private message
wuji
Posted: Mon Sep 10, 2012 7:52 am Reply with quote
User Joined: 10 Aug 2012 Posts: 654
mentally ill, who, with further evaluation, could have been helped.Kevorkian became the the cheap replica *beep* the face of the assisted suicide movement, which had its roots in
United States in the 1930s and gathered steam in the 1990s.Jack Kevorkian Kevorkian [h2]cheap authentic jordans[/h2] Kevorkian Photographed DyingKevorkian was born in Pontiac, Mich., the son of working-class
who left Armenia after the genocide of 1915. He was trained as as cheap designer *beep* as a pathologist and first got his name, Dr. Death, because of
1956 paper he wrote about photographing the eyes of dying patients.He also also real jordans also created music and art with ghoulish themes.Kevorkian was dismissed from his
at the University of Michigan for advocating experimentation on consenting convicts during during cheap polo ralph lauren during execution. Other medical projects included experiments on transfusing blood from cadavers
living patients.By 1987, he began advertising in newspapers as a "physician consultant" consultant" [h1]cheap real jordans[/h1] consultant" for "death counseling," and in 1989 he built his suicide machine
his kitchen table.The first assisted death was that of Janet Adkins, a a authentic jordans a 54 year old from Oregon with Alzheimer's disease. It took place
View user's profile Send private message

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum