Production Problems

69 views
Skip to first unread message

Graeme Defty

unread,
Jul 19, 2014, 3:12:56 PM7/19/14
to chica...@googlegroups.com
Well having got things working in my development environments I have now pushed all changes to the server.

I also put in all the patches to boss_db, erlydtl etc that made things work...

BUT (and you knew this was not going to be a happy ending, right?)

... when I try to start the server I get the following:


graeme@li184-248:~/egolf-uat$ sudo ./init.sh start
[sudo] password for graeme:
starting boss in production mode...
ERROR: boss failed while processing /home/graeme/egolf-uat: {'EXIT',{undef,[{rebar_config,get_global,[c,"help"],[]},
                {boss_plugin,boss,2,
                             [{file,"priv/rebar/boss_plugin.erl"},{line,31}]},
                {rebar_core,run_modules,4,
                            [{file,"src/rebar_core.erl"},{line,446}]},
                {rebar_core,execute,5,
                            [{file,"src/rebar_core.erl"},{line,371}]},
                {rebar_core,process_dir1,6,
                            [{file,"src/rebar_core.erl"},{line,235}]},
                {rebar_core,process_commands,2,
                            [{file,"src/rebar_core.erl"},{line,90}]},
                {rebar,main,1,[{file,"src/rebar.erl"},{line,58}]},
                {escript,run,2,[{file,"escript.erl"},{line,752}]}]}}
graeme@li184-248:~/egolf-uat$


Any clues?

A workaround would do - my prod server is down.  :-(

g

Graeme Defty

unread,
Jul 19, 2014, 3:15:24 PM7/19/14
to chica...@googlegroups.com
Sorry, I should not have assumed everyone was following my mini-saga in detail  :-)

I am using :

- Ubuntu 14.04
- Erlang R17
- CB 8.13

Thanks,

g



Jesse Gumm

unread,
Jul 19, 2014, 4:36:10 PM7/19/14
to chica...@googlegroups.com
Hi Graeme,

So again, that's a weird error that again looks like an outdated version of rebar.  That it's breaking on this line https://github.com/ChicagoBoss/ChicagoBoss/blob/master/skel/priv/rebar/boss_plugin.erl#L31

Does dev mode run on your production server?

-Jesse




--
You received this message because you are subscribed to the Google Groups "ChicagoBoss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chicagoboss...@googlegroups.com.
Visit this group at http://groups.google.com/group/chicagoboss.
To view this discussion on the web visit https://groups.google.com/d/msgid/chicagoboss/CAKF5fiB073Xa1qnr8RbnxH4YZepi4Dh-gGa-JQbfE62cqj8Hqg%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.



--
Jesse Gumm
Owner, Sigma Star Systems
414.940.4866 || sigma-star.com || @jessegumm

Graeme Defty

unread,
Jul 20, 2014, 4:06:31 AM7/20/14
to chica...@googlegroups.com
Hi Jesse, and thanks for the quick response.

When I looked at your link - code i admittedly saw already - it was clear (in a way that it was not at 3.00am)that the rebar_plugin module must match rebar. I noted in my post the differences in arity, but I had not thought to replace rebar_plugin. Once I did so the application both compiled and ran :-)

BUT . . . (why is there always a but?)

in production (not in dev) trying to run the application gives:

07:53:21.136 [error] Error in view egolf_view_club_list_html error undef
    [{erlydtl_runtime,find_value,
        [cred,
            [{"_vars",
                [    {"_before",{cred,id,"fairplayasia.com:8001",undefined,
                                {club,"g4",[],"g4",[],[],[],[],[],[],"www.fairplayasia.com",[],[],[],[],[],[]},
                                [{role,"role-29","g4","visitor"}],
                                ["comp.list","comp.list_rounds","comp.results","comp_entry.list","comp_entry.view",
                                "entry_player.list","entry_player.view","round.list","round.view"],[],[],[]}},
                    {"_lang","en"},
                    {"_session",[]},
etc. etc. etc.

Strangely, going to the command line and using erlydtl_runtime:module_info(exports) shows both find_value/2 and find_value/3.  I am unable to check that one of these is being called because the output is truncated, both on the console and in the log (as indicated by the etc.s above - I am unable to count the args, but I have no reason to believe it is being called incorrectly.

How can I see it on the command line but it is undef when running?

Any thoughts?

g















Jesse Gumm

unread,
Aug 19, 2014, 6:13:14 PM8/19/14
to chica...@googlegroups.com
Hi Graeme,

Sorry for the late response.

Have a look at the lager configuration https://github.com/basho/lager#setting-the-truncation-limit-at-compile-time to change the truncation level so you can actually see the full call that's failing.

Otherwise, I don't know, man!

-Jesse



For more options, visit https://groups.google.com/d/optout.

Graeme Defty

unread,
Aug 19, 2014, 11:29:50 PM8/19/14
to chica...@googlegroups.com
Hahaha - no problem Jesse

In the end I just re-built my production site from scratch with new Linux, new Erlang, new CB, and all this stuff went away.

It was painful, but in the end I suspect less painful than trying to work my way out of the mess I had manged to get into. (I learned something about my recovery procedures too ;-) )

Thanks again,

graeme




Jesse Gumm

unread,
Aug 20, 2014, 12:06:25 AM8/20/14
to chica...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages