These are chat archives for synrc/n2o

12th
Feb 2016
Ram Kumar
@ramka001
Feb 12 2016 13:31
Hi @5HT is there anyway to to execute the mad without having dependency on the shell i.e. to run on the background
Namdak Tonpa
@5HT
Feb 12 2016 13:32
you mean omit it dependencies ?
mad need sh perform mad sh command
that is why it depends on it
if you don't need that command, you can use it in background mode
Ram Kumar
@ramka001
Feb 12 2016 13:33
i mean like with erl -pa ebin deps//ebin -s couchbeam -pa deps//ebin -s db_mysql_conn -pa deps/*/ebin -s test
Namdak Tonpa
@5HT
Feb 12 2016 13:33
yes, mad start, but mad start also needs sh library )
because of exec syscall
you can replace mad start with your own mad profile and use raw os:cmd instead of sh:run
Ram Kumar
@ramka001
Feb 12 2016 13:34
i have the sh library, I'm trying to run this on the openshift cloud server
Namdak Tonpa
@5HT
Feb 12 2016 13:35
but this introduce new hacker surface, so it is up to you
and what problem with sh in openshift ?
Ram Kumar
@ramka001
Feb 12 2016 13:35
:) the old erl -pa was working, now i'm trouble shooting the mad start
Namdak Tonpa
@5HT
Feb 12 2016 13:36
which one?
can I see error message?
Ram Kumar
@ramka001
Feb 12 2016 13:36
the mad start runs for a few seconds then it stops
hang on i'll paste it
==> dependency: "git://github.com/FortAwesome/Font-Awesome"; tag: {tag,
"v4.5.0"}
==> dependency: "git://github.com/evanmiller/erlydtl"; tag: {tag,"0.8.0"}
==> dependency: "git://github.com/synrc/nitro"; tag: {tag,"0.9"}
==> dependency: "git://github.com/synrc/mad"; tag: {tag,"1.9"}
==> dependency: "git://github.com/synrc/sh"; tag: {tag,"1.9"}
==> dependency: "git://github.com/synrc/fs"; tag: {tag,"1.9"}
==> dependency: "git://github.com/synrc/active"; tag: {tag,"1.9"}
==> dependency: "git://github.com/synrc/rest"; tag: {tag,"2.9"}
==> dependency: "git://github.com/synrc/n2o"; tag: {tag,"master"}
==> dependency: "git://github.com/sile/jsone.git"; tag: {tag,"v0.3.3"}
==> dependency: "git://github.com/extend/cowboy"; tag: {tag,"1.0.1"}
==> dependency: "git://github.com/ninenines/cowlib.git"; tag: "1.0.0"
==> dependency: "git://github.com/ninenines/ranch.git"; tag: "1.0.0"
==> dependency: "git://github.com/uwiger/gproc.git"; tag: {tag,"0.3"}
==> dependency: "git://github.com/synrc/kvs"; tag: {tag,"2.9"}
==> dependency: "git://github.com/Vagabond/gen_smtp.git" tag: {tag,"0.9.0"}
==> dependency: "git://github.com/smarkets/erlang-bcrypt.git"; tag: {tag,
"0.5.0.3"}
==> "../apps/siddhaweb/priv/static/less"
==> "../apps/siddhaweb/priv/static/font-awesome"
==> "erlydtl"
==> "nitro"
==> "mad"
==> "sh"
==> "fs"
==> "active"
==> "rest"
==> "n2o"
==> "jsone"
==> "cowboy"
==> "cowlib"
==> "ranch"
==> "gproc"
==> "kvs"
==> "gen_smtp"
==> "bcrypt"
==> "/var/lib/openshift/566848077628e1a8c70001c0/app-root/runtime/repo"
==> "../apps/siddhaweb/priv/static/less"
==> "../apps/siddhaweb/priv/static/font-awesome"
==> "/var/lib/openshift/566848077628e1a8c70001c0/app-root/runtime/repo/apps"
==> "/var/lib/openshift/566848077628e1a8c70001c0/app-root/runtime/repo/apps/siddhaweb"
OK
Ordered: [kernel,stdlib,fs,ranch,compiler,syntax_tools,asn1,crypto,mnesia,
inets,gproc,kvs,cowlib,public_key,ssl,cowboy,n2o,siddhaweb,active,
bcrypt,erlydtl,gen_smtp,jsone,mad,nitro,rest,sh]
OK
Scripting: "/var/lib/openshift/566848077628e1a8c70001c0/app-root/runtime/repo//siddhaweb"
OK
Namdak Tonpa
@5HT
Feb 12 2016 13:40
I asked about Error Message not about tree OKs :-)
ensure that you have fdlink in /deps/sh/priv
Ram Kumar
@ramka001
Feb 12 2016 13:42
[siddha-prodnode.rhcloud.com sh]> cd priv/
[siddha-prodnode.rhcloud.com priv]> ls -al
total 16
drwx------. 2 566848077628e1a8c70001c0 566848077628e1a8c70001c0 19 Feb 12 08:39 .
drwx------. 7 566848077628e1a8c70001c0 566848077628e1a8c70001c0 4096 Feb 12 08:30 ..
-rwx------. 1 566848077628e1a8c70001c0 566848077628e1a8c70001c0 9686 Feb 12 08:39 fdlink
Namdak Tonpa
@5HT
Feb 12 2016 13:42
compiled within C compiler in your Linux with mad com or rebar compile (in case of troubles)
have your logs generated?
Ram Kumar
@ramka001
Feb 12 2016 13:43
no
i'm recompiling
i've got erlang.log.1
Namdak Tonpa
@5HT
Feb 12 2016 13:43
you runed with mad sh ?
Ram Kumar
@ramka001
Feb 12 2016 13:44
yes
Namdak Tonpa
@5HT
Feb 12 2016 13:44
and?
how it quits?
CTRL+D?
Ram Kumar
@ramka001
Feb 12 2016 13:45
no it aborted itself

Configuration: [{n2o,[{port,8080},
{transition_port,8080},
{app,siddhaweb},
{upload,"./apps/siddhaweb/priv/static/"},
{search,"/Users/5HT/depot/synrc/synrc.com/apps//doc/web/.htm"},
{route,routes},
{mq,n2o_mq},
{formatter,bert},
{log_modules,config},
{log_level,config},
{log_backend,n2o_log},
{session,n2o_session},
{origin,<<"*">>},
{bridge,n2o_cowboy},
{pickler,n2o_pickle},
{erroring,n2o_error},
{event,pickle}]},
{kvs,[{dba,store_mnesia},
{schema,[kvs_user,kvs_acl,kvs_feed,kvs_subscription]}]}]
Applications: [kernel,stdlib,fs,ranch,compiler,syntax_tools,asn1,crypto,
mnesia,inets,gproc,kvs,cowlib,public_key,ssl,cowboy,n2o,
siddhaweb,active,bcrypt,erlydtl,gen_smtp,jsone,mad,nitro,rest,
sh]
Erlang/OTP 18 [erts-7.1] [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false]

Eshell V7.1 (abort with ^G)
1> Setting up watches. Beware: since -r was given, this may take a while!
Watches established.
Aborted (core dumped)

but the core dump is not generated
i'm looking for that
Namdak Tonpa
@5HT
Feb 12 2016 13:46
where did you get this fucked copy of Erlang? :-)
throw it away
Ram Kumar
@ramka001
Feb 12 2016 13:46
Ericsson where else ?
:)
Namdak Tonpa
@5HT
Feb 12 2016 13:46
built yourself?
Ram Kumar
@ramka001
Feb 12 2016 13:46
nope straight download
Namdak Tonpa
@5HT
Feb 12 2016 13:47
for Linux?
Ericsson has no copies for Linux.
Ram Kumar
@ramka001
Feb 12 2016 13:47
its only the source code
have to builde it from scratch
Namdak Tonpa
@5HT
Feb 12 2016 13:48
We clearly desribed in README.md which erlang builds we support.
ensure that you have no other erlang instansed on your machine
ps aux | grep beam
or not at ports you run the application
Ram Kumar
@ramka001
Feb 12 2016 13:51
6006 431714 1.1 0.1 946280 18252 pts/1 Sl+ 08:51 0:00 /var/lib/openshift/566848077628e1a8c70001c0/app-root/runtime/erlang//lib/erlang/erts-7.1/bin/beam.smp -- -root /var/lib/openshift/566848077628e1a8c70001c0/app-root/runtime/erlang//lib/erlang -progname erl -- -home /var/lib/openshift/566848077628e1a8c70001c0/ --
Namdak Tonpa
@5HT
Feb 12 2016 13:52
to much for clean experement ;-)
Ram Kumar
@ramka001
Feb 12 2016 13:52
its too cloudy
:)
I can create the crash dump on the cloud but not when using the mad
just using the erl command
Ram Kumar
@ramka001
Feb 12 2016 14:01
run_erl [382101] Fri Feb 12 08:39:23 2016
Args before exec of shell:
run_erl [382101] Fri Feb 12 08:39:23 2016
argv[0] = sh
run_erl [382101] Fri Feb 12 08:39:23 2016
argv1 = -c
run_erl [382101] Fri Feb 12 08:39:23 2016
argv[2] = exec /var/lib/openshift/566848077628e1a8c70001c0/app-root/runtime/repo//siddhaweb sh
Namdak Tonpa
@5HT
Feb 12 2016 14:02
are you sure you are not running application twice at the same port ?
Ram Kumar
@ramka001
Feb 12 2016 14:02
let me change the port and test
Namdak Tonpa
@5HT
Feb 12 2016 14:03
you can use netstat too
Ram Kumar
@ramka001
Feb 12 2016 14:03
can't limited rights
Namdak Tonpa
@5HT
Feb 12 2016 14:03
oh
Ram Kumar
@ramka001
Feb 12 2016 14:03
only super users are allowed to do that
not port conflict
Namdak Tonpa
@5HT
Feb 12 2016 14:04
so the trace is also impossible
Ram Kumar
@ramka001
Feb 12 2016 14:05
only ports allowed is 8080 and anything after 15000 - 18000
alternative is to use htop
or ss
Namdak Tonpa
@5HT
Feb 12 2016 14:05
what's happening when you do mad start ?
and then $(mad attach)
followed by CTRL+D
Ram Kumar
@ramka001
Feb 12 2016 14:07

[siddha-prodnode.rhcloud.com repo]> mad start && $(mad attach)
Scripting: "/var/lib/openshift/566848077628e1a8c70001c0/app-root/runtime/erlang/bin/mad"
OK
Attaching to . (^D to exit)

^LConfiguration: [{n2o,[{port,8080},
{transition_port,8080},
{app,siddhaweb},
{upload,"./apps/siddhaweb/priv/static/"},
{search,"/Users/5HT/depot/synrc/synrc.com/apps//doc/web/.htm"},
{route,routes},
{mq,n2o_mq},
{formatter,bert},
{log_modules,config},
{log_level,config},
{log_backend,n2o_log},
{session,n2o_session},
{origin,<<"*">>},
{bridge,n2o_cowboy},
{pickler,n2o_pickle},
{erroring,n2o_error},
{event,pickle}]},
{kvs,[{dba,store_mnesia},
{schema,[kvs_user,kvs_acl,kvs_feed,kvs_subscription]}]}]
Applications: [kernel,stdlib,fs,ranch,compiler,syntax_tools,asn1,crypto,
mnesia,inets,gproc,kvs,cowlib,public_key,ssl,cowboy,n2o,
siddhaweb,active,bcrypt,erlydtl,gen_smtp,jsone,mad,nitro,rest,
sh]
Erlang/OTP 18 [erts-7.1] [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false]

Eshell V7.1 (abort with ^G)
1> Setting up watches. Beware: since -r was given, this may take a while!
Watches established.
[End]

Namdak Tonpa
@5HT
Feb 12 2016 14:08
well, it's dying?
Ram Kumar
@ramka001
Feb 12 2016 14:08
it came on htop for afew seconds.. then stopped
well mad is super fast
Namdak Tonpa
@5HT
Feb 12 2016 14:08
well, try with mad start only
without attaching
Ram Kumar
@ramka001
Feb 12 2016 14:09
[siddha-prodnode.rhcloud.com repo]>
[siddha-prodnode.rhcloud.com repo]> mad start
Scripting: "/var/lib/openshift/566848077628e1a8c70001c0/app-root/runtime/erlang/bin/mad"
OK
[siddha-prodnode.rhcloud.com repo]>
let me print screen
Namdak Tonpa
@5HT
Feb 12 2016 14:10
please no!
don't do that! :-)
Ram Kumar
@ramka001
Feb 12 2016 14:10
lol
Namdak Tonpa
@5HT
Feb 12 2016 14:11
how many seconds were to live?
Ram Kumar
@ramka001
Feb 12 2016 14:11
~2
Namdak Tonpa
@5HT
Feb 12 2016 14:11
pity
I really have no idea :-)
Ram Kumar
@ramka001
Feb 12 2016 14:12
no problem in building with git or pushing to the server
Namdak Tonpa
@5HT
Feb 12 2016 14:13
should work. mad sucks
Ram Kumar
@ramka001
Feb 12 2016 14:14
even local build on my linux desktop no probs
Namdak Tonpa
@5HT
Feb 12 2016 14:14
:-)
Ram Kumar
@ramka001
Feb 12 2016 14:14
mad is going psycho
Namdak Tonpa
@5HT
Feb 12 2016 14:14
it is happening on both desktop and openshift?
Ram Kumar
@ramka001
Feb 12 2016 14:14
no only openshift.. desktop is smooth
Namdak Tonpa
@5HT
Feb 12 2016 14:15
red hat is wasted :'-(
Ram Kumar
@ramka001
Feb 12 2016 14:15
know of any other open source cloud server?
Andy
@m-2k
Feb 12 2016 14:25
lol
its magick