Hi,
What does your start function currently look like? You can probably
do something like
-module (server).
start () ->
thrift_socket_server:start ([{port, 12345},
{name, ?MODULE},
{service, myService_thrift},
{handler, ?MODULE},
{framed, true},
{socket_opts, [{recv_timeout, 60000}]}]).
Then you should be able to use
% erl -s server
in a server. Also you could check out
https://github.com/toddlipcon/thrift_erl_skel
which will create a skeleton application, supervisor, and service.
-Anthony
On Mon, Feb 14, 2011 at 11:07:01AM -0800, Paul Meier wrote:
> Hi friends,
>
> Forgive me if I'm missing something obvious, but when I try to run an
> Erlang Thrift Server, it works if I run something like:
>
> erl +K true -pa all_your_beams/
>
> And run server:start() from the Erlang command shell.
>
> But if I write a bash wrapper that says something like
>
> erl +K true -pa all_your_beams/ -noshell -run server start
>
> then connecting clients fail, saying Connection Refused, despite there
> being a message saying there's a Thrift Service listening on the appropriate
> port. This is the case in both the tutorial and my own application. Is
> this a known issue? Has anyone else experienced this?
>
> It's not mission-critical, but any help would be appreciated. Thanks
> ^_^
>
> -Paul
--
------------------------------------------------------------------------
Anthony Molinaro <[email protected]>