thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hannes Baldursson" <hann...@gmail.com>
Subject Re: Don't get it (Erlang)
Date Fri, 31 Oct 2008 12:35:52 GMT
Whoops I'm still in trouble...

I've made great progress though... I've figured out HOW to use the skeleton
app generator, I've figured out where to place my definition files and the
Erlang lib for thrift. I've managed to make the erlang server app (haven't
added any code so far).  I got the server running but it crashed and I
wasn't able to connect to it via a PHP client (Connection refused).

In short I need a proof of concept server that I can call function foo() and
get the string "bar" back to the client.

Could you give me a hand?

Thanks in advance,
Hannes Balduesson

Here's a dump of what erlang gives me. What am I doing wrong?


Eshell V5.5.5  (abort with ^G)
(session@hannson-test)1>
=PROGRESS REPORT==== 31-Oct-2008::12:27:36 ===
          supervisor: {local,sasl_safe_sup}
             started: [{pid,<0.45.0>},
                       {name,alarm_handler},
                       {mfa,{alarm_handler,start_link,[]}},
                       {restart_type,permanent},
                       {shutdown,2000},
                       {child_type,worker}]

=PROGRESS REPORT==== 31-Oct-2008::12:27:36 ===
          supervisor: {local,sasl_safe_sup}
             started: [{pid,<0.46.0>},
                       {name,overload},
                       {mfa,{overload,start_link,[]}},
                       {restart_type,permanent},
                       {shutdown,2000},
                       {child_type,worker}]

=PROGRESS REPORT==== 31-Oct-2008::12:27:36 ===
          supervisor: {local,sasl_sup}
             started: [{pid,<0.44.0>},
                       {name,sasl_safe_sup},
                       {mfa,
                           {supervisor,
                               start_link,
                               [{local,sasl_safe_sup},sasl,safe]}},
                       {restart_type,permanent},
                       {shutdown,infinity},
                       {child_type,supervisor}]

=PROGRESS REPORT==== 31-Oct-2008::12:27:36 ===
          supervisor: {local,sasl_sup}
             started: [{pid,<0.47.0>},
                       {name,release_handler},
                       {mfa,{release_handler,start_link,[]}},
                       {restart_type,permanent},
                       {shutdown,2000},
                       {child_type,worker}]

=PROGRESS REPORT==== 31-Oct-2008::12:27:36 ===
         application: sasl
          started_at: 'session@hannson-test'

=SUPERVISOR REPORT==== 31-Oct-2008::12:27:36 ===
     Supervisor: {local,session_sup}
     Context:    start_error
     Reason:     {'EXIT',
                     {undef,
                         [{thrift_server,
                              start_link,
                              [8080,sessionServer_thrift,session_service]},
                          {supervisor,do_start_child,2},
                          {supervisor,start_children,3},
                          {supervisor,init_children,2},
                          {gen_server,init_it,6},
                          {proc_lib,init_p,5}]}}
     Offender:   [{pid,undefined},
                  {name,session_service},
                  {mfa,{session_service,start_link,[]}},
                  {restart_type,permanent},
                  {shutdown,2000},
                  {child_type,worker}]

=CRASH REPORT==== 31-Oct-2008::12:27:36 ===
  crasher:
    pid: <0.51.0>
    registered_name: []
    error_info: {shutdown,{session_app,start,[normal,[]]}}
    initial_call: {application_master,
                     init,
                     [<0.5.0>,
                      <0.50.0>,
                      {appl_data,
                          session,
                          [],
                          undefined,
                          {session_app,[]},
                          ["session_app","session_sup","session_service"],
                          [],
                          infinity,
                          infinity},
                      normal]}
    ancestors: [<0.50.0>]
    messages: [{'EXIT',<0.52.0>,normal}]
    links: [<0.50.0>,<0.5.0>]
    dictionary: []
    trap_exit: true
    status: running
    heap_size: 610
    stack_size: 21
    reductions: 2058
  neighbours:

=INFO REPORT==== 31-Oct-2008::12:27:36 ===
    application: session
    exited: {shutdown,{session_app,start,[normal,[]]}}
    type: temporary



On Thu, Oct 30, 2008 at 21:12, Suhail Doshi <digitalwarfare@gmail.com>wrote:

> Hannes Baldursson wrote:
>
>> Hi all,
>>
>> I'm having some troubles with the Erlang generated code from Thrift. I
>> might
>> add that I'm a newbie in using Thrift and got minimal knowledge about
>> Erlang
>> but I'm fairly experienced in programming.
>>
>> I've been looking at the tutorial where in one directory "tutorial/erl/"
>> there are files called "server.erl" and "server.sh" that seem to be an
>> implementation of the RPC functions. Am I missing something or doesn't
>> Thrift generate server stubs based on my definition file?
>>
>> All the generated files I see are in the gen-erl and I can't see that any
>> one of them do what server.erl does... am I missing something or do I have
>> to hand code the "server.erl" file
>>
>> btw, I will make sure to add your points into the wiki page
>>
>> Thanks in advance,
>> Hannes Baldursson
>>
>>
>>
> Hi Hannes,
>
> I am very new to thrift too, just started hacking away at it last week.
> Fortunately I was lucky to be friends with Todd Lipcon who made the Erlang
> bindings for Thrift in the first place. Something very useful is:
>
> http://github.com/toddlipcon/thrift_erl_skel/tree/master
>
> Play around and check it out, should give you a great stepping stone. You
> might get stuck make the erlang app, make sure to check where your rpc
> directory is pointing to in gen/Makefile.
>
> Suhail
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message