I've installed Erlang and the OSERL distribution. I was following the installation instructions provided with the product, however, when I try to run the first example with:
submit_esme:start().
I get the error: ** exception error: undefined function submit_esme:start/0
Looking at the code for submit_esme.erl, there is no start method. There is a start _link(). method. But trying it results in an error as well:
** exception error: undefined function gen_esme:start_link/4
Is it possible the docs are out of sync with this release or (probably more likely) am I doing something wrong?
I did get warnings when I compiled submit_esme.erl stating that behaviour gen_esme undefined on line 28. and integer/1 obsolete on line 427.
I'm using the R13B01 distribution of Erlang.
-Brett
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
after running make on the tree, I did remove warning that behaviouf gen_esme was undefined. I still get the warning that integer/1 is obsolete. There still seems to be the fundamental that there is no start() method in submit_esme. Trying to run start_link() yields:
4> submit_esme:start_link().
{ok,<0.39.0>}
Could not bind to the SMSC: {error,econnrefused}
5>
=INFO REPORT==== 1-Sep-2009::15:13:31 ===
application: gen_esme
info: terminate
details: [{reason,{error,econnrefused}},{pid,<0.39.0>}]
** exception error: {error,econnrefused}
5>
=ERROR REPORT==== 1-Sep-2009::15:13:31 ===
** Generic server submit_esme terminating
** Last message in was {'$gen_cast',{cast,{bind_error,{error,econnrefused}}}}
** When Server state == {state,submit_esme,
{state,undefined},
closed,undefined,<0.40.0>}
** Reason for termination ==
** {error,econnrefused}
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
My apologies. It seems that the repository was broken.
Please update your common_lib and oserl again.
This new update includes major changes. I believe it should be ready for production but we are still doing some testing. Once testing is finished we will pack the latest release.
There are some new man pages. Please read the documentation by typing:
erl -man ./gen_esme.3
You may also want to try the examples under doc/examples. To do so you can open two shells, one for the MC and another one for the ESME.
Eshell V5.7.1 (abort with ^G)
1> application:start(common_lib).
ok
2> sample_mc:start_link(false).
{ok,<0.40.0>}
Connection from 127.0.0.1 refused
3>
=ERROR REPORT==== 2-Sep-2009::12:54:03 ===
** State machine <0.44.0> terminating
** Last event in was {accept,#Port<0.797>,{127,0,0,1}}
** When State == listen
** Data == {st,<0.40.0>,gen_mc,<0.43.0>,0,undefined,<0.45.0>,24592,0,
{timers_smpp,180000,60000,infinity,60000},
undefined,undefined,undefined,undefined}
** Reason for termination =
** refused
after running make on the tree, I did remove warning that behaviouf gen_esme was undefined. I still get the warning that integer/1 is obsolete. There still seems to be the fundamental that there is no start() method in submit_esme. Trying to run start_link() yields:
4> submit_esme:start_link().
{ok,<0.39.0>}
Could not bind to the SMSC: {error,econnrefused}
5>
=INFO REPORT==== 1-Sep-2009::15:13:31 ===
application: gen_esme
info: terminate
details: [{reason,{error,econnrefused}},{pid,<0.39.0>}]
** exception error: {error,econnrefused}
5>
=ERROR REPORT==== 1-Sep-2009::15:13:31 ===
** Generic server submit_esme terminating
** Last message in was {'$gen_cast',{cast,{bind_error,{error,econnrefused}}}}
** When Server state == {state,submit_esme,
{state,undefined},
closed,undefined,<0.40.0>}
** Reason for termination ==
** {error,econnrefused}
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If you checkout the sources from the CVS and follow the example I posted on my previous email you shall have no problems.
Sorry but I'm not sure to understand your email. It seems that you are trying to run an old example (anyway, please note that in order to run any ESME example you will need to have a SMSC simulator to bind to).
Enrique
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I think my message from yesterday reposted. I"ve downloaded the latest copies of oserl and common_lib from cvs and I am getting that deployed. That is the full latest version correct? Just wanted to make sure it wasn't a patch set that should be layed over some base release.
I had previously downloaded the the oserl-1.3.tgz from the project main page from which I had posted my original question. Sounds like that is an older release, so I've shelved that and downloaded the latest copies from cvs.
Thanks for you help.
-Brett
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Getting ready to run the example when I noticed my tree has no oserl/ebin directory. I thought perhaps I screwed up my checkout, so I browsed the tree online and the ebin directory is empty (cvs doesn't checkout empty dirs?).
To follow up, I created the ebin dirs myself (the one in common_lib was also not there) and then ran make and built the required files. I guess since cvs prunes empty dirs, the directories themselves were not getting created and that caused make to fail.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes indeed. I would suggest you to use the latests sources available on the cvs repository. The update since 1.3 is really worth it.
I've downloaded a fresh copy from the csv and I do get the ebin dir. Never mind, if you can run the examples under oserl/doc/examples you should be fine.
Regards,
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've installed Erlang and the OSERL distribution. I was following the installation instructions provided with the product, however, when I try to run the first example with:
submit_esme:start().
I get the error: ** exception error: undefined function submit_esme:start/0
Looking at the code for submit_esme.erl, there is no start method. There is a start _link(). method. But trying it results in an error as well:
** exception error: undefined function gen_esme:start_link/4
Is it possible the docs are out of sync with this release or (probably more likely) am I doing something wrong?
I did get warnings when I compiled submit_esme.erl stating that behaviour gen_esme undefined on line 28. and integer/1 obsolete on line 427.
I'm using the R13B01 distribution of Erlang.
-Brett
after running make on the tree, I did remove warning that behaviouf gen_esme was undefined. I still get the warning that integer/1 is obsolete. There still seems to be the fundamental that there is no start() method in submit_esme. Trying to run start_link() yields:
4> submit_esme:start_link().
{ok,<0.39.0>}
Could not bind to the SMSC: {error,econnrefused}
5>
=INFO REPORT==== 1-Sep-2009::15:13:31 ===
application: gen_esme
info: terminate
details: [{reason,{error,econnrefused}},{pid,<0.39.0>}]
** exception error: {error,econnrefused}
5>
=ERROR REPORT==== 1-Sep-2009::15:13:31 ===
** Generic server submit_esme terminating
** Last message in was {'$gen_cast',{cast,{bind_error,{error,econnrefused}}}}
** When Server state == {state,submit_esme,
{state,undefined},
closed,undefined,<0.40.0>}
** Reason for termination ==
** {error,econnrefused}
My apologies. It seems that the repository was broken.
Please update your common_lib and oserl again.
This new update includes major changes. I believe it should be ready for production but we are still doing some testing. Once testing is finished we will pack the latest release.
There are some new man pages. Please read the documentation by typing:
erl -man ./gen_esme.3
You may also want to try the examples under doc/examples. To do so you can open two shells, one for the MC and another one for the ESME.
On the MC side:
erl -pa ../../ebin -pa ../../../common_lib/ebin
Erlang R13B (erts-5.7.1) [source] [smp:2:2] [rq:2] [async-threads:0] [kernel-poll:false]
Eshell V5.7.1 (abort with ^G)
1> application:start(common_lib).
ok
2> sample_mc:start_link(false).
{ok,<0.40.0>}
Connection from 127.0.0.1 refused
3>
=ERROR REPORT==== 2-Sep-2009::12:54:03 ===
** State machine <0.44.0> terminating
** Last event in was {accept,#Port<0.797>,{127,0,0,1}}
** When State == listen
** Data == {st,<0.40.0>,gen_mc,<0.43.0>,0,undefined,<0.45.0>,24592,0,
{timers_smpp,180000,60000,infinity,60000},
undefined,undefined,undefined,undefined}
** Reason for termination =
** refused
Accepted connection from 127.0.0.1
Bind request from: oserl/oserl
System Id: sample_mc
Session: <0.47.0>
Received: {4,0,2,
[{short_message,"hello world"},
{sm_default_msg_id,0},
{data_coding,3},
{replace_if_present_flag,0},
{registered_delivery,0},
{validity_period,[]},
{schedule_delivery_time,[]},
{priority_flag,0},
{protocol_id,0},
{esm_class,0},
{destination_addr,"9876543210"},
{dest_addr_npi,1},
{dest_addr_ton,1},
{source_addr,"0123456789"},
{source_addr_npi,1},
{source_addr_ton,5},
{service_type,[]},
{source_network_type,0},
{source_bearer_type,0},
{source_addr_subunit,0},
{set_dpf,1},
{privacy_indicator,0},
{payload_type,0},
{ms_validity,{ms_validity_absolute,0}},
{more_messages_to_send,1},
{language_indicator,0},
{display_time,1},
{dest_network_type,0},
{dest_bearer_type,0},
{dest_addr_subunit,0},
{dest_addr_np_resolution,0},
{alert_on_message_delivery,0}]}
Error: Message Queue Full.
Session: <0.47.0>
Received: {4,0,3,
[{short_message,"hello world"},
{sm_default_msg_id,0},
{data_coding,3},
{replace_if_present_flag,0},
{registered_delivery,0},
{validity_period,[]},
{schedule_delivery_time,[]},
{priority_flag,0},
{protocol_id,0},
{esm_class,0},
{destination_addr,"9876543210"},
{dest_addr_npi,1},
{dest_addr_ton,1},
{source_addr,"0123456789"},
{source_addr_npi,1},
{source_addr_ton,5},
{service_type,[]},
{source_network_type,0},
{source_bearer_type,0},
{source_addr_subunit,0},
{set_dpf,1},
{privacy_indicator,0},
{payload_type,0},
{ms_validity,{ms_validity_absolute,0}},
{more_messages_to_send,1},
{language_indicator,0},
{display_time,1},
{dest_network_type,0},
{dest_bearer_type,0},
{dest_addr_subunit,0},
{dest_addr_np_resolution,0},
{alert_on_message_delivery,0}]}
Message ID: 0
3>
On the ESME side:
erl -pa ../../ebin -pa ../../../common_lib/ebin
Erlang R13B (erts-5.7.1) [source] [smp:2:2] [rq:2] [async-threads:0] [kernel-poll:false]
Eshell V5.7.1 (abort with ^G)
1> application:start(common_lib).
ok
2> sample_esme:start_link(false).
{ok,<0.40.0>}
Connected to 127.0.0.1:2775
Session closed due to reason: closed
Could not bind: noproc
Connected to 127.0.0.1:2775
Bound to sample_mc
3> sample_esme:send("0123456789", "9876543210", "hello world", []).
ok
Request: {submit_sm,[{short_message,"hello world"},
{destination_addr,"9876543210"},
{source_addr_ton,5},
{source_addr,"0123456789"}]}
Status: Message Queue Full.
Request: {submit_sm,[{short_message,"hello world"},
{destination_addr,"9876543210"},
{source_addr_ton,5},
{source_addr,"0123456789"}]}
Response: {2147483652,0,3,
[{message_id,"0"},{dpf_result,0},{congestion_state,0}]}
4>
Note that the sample MC generates random errors.
Regards,
Enrique
after running make on the tree, I did remove warning that behaviouf gen_esme was undefined. I still get the warning that integer/1 is obsolete. There still seems to be the fundamental that there is no start() method in submit_esme. Trying to run start_link() yields:
4> submit_esme:start_link().
{ok,<0.39.0>}
Could not bind to the SMSC: {error,econnrefused}
5>
=INFO REPORT==== 1-Sep-2009::15:13:31 ===
application: gen_esme
info: terminate
details: [{reason,{error,econnrefused}},{pid,<0.39.0>}]
** exception error: {error,econnrefused}
5>
=ERROR REPORT==== 1-Sep-2009::15:13:31 ===
** Generic server submit_esme terminating
** Last message in was {'$gen_cast',{cast,{bind_error,{error,econnrefused}}}}
** When Server state == {state,submit_esme,
{state,undefined},
closed,undefined,<0.40.0>}
** Reason for termination ==
** {error,econnrefused}
If you checkout the sources from the CVS and follow the example I posted on my previous email you shall have no problems.
Sorry but I'm not sure to understand your email. It seems that you are trying to run an old example (anyway, please note that in order to run any ESME example you will need to have a SMSC simulator to bind to).
Enrique
Thanks for the response, I"ll download the latest copies and give it a try.
(Sorry for the previous repost, hit refresh this morning, and I guess the browser resubmitted my previous post!)
I think my message from yesterday reposted. I"ve downloaded the latest copies of oserl and common_lib from cvs and I am getting that deployed. That is the full latest version correct? Just wanted to make sure it wasn't a patch set that should be layed over some base release.
I had previously downloaded the the oserl-1.3.tgz from the project main page from which I had posted my original question. Sounds like that is an older release, so I've shelved that and downloaded the latest copies from cvs.
Thanks for you help.
-Brett
Getting ready to run the example when I noticed my tree has no oserl/ebin directory. I thought perhaps I screwed up my checkout, so I browsed the tree online and the ebin directory is empty (cvs doesn't checkout empty dirs?).
http://oserl.cvs.sourceforge.net/viewvc/oserl/oserl/ebin/
Is there a chance there is a problem with the current tree?
To follow up, I created the ebin dirs myself (the one in common_lib was also not there) and then ran make and built the required files. I guess since cvs prunes empty dirs, the directories themselves were not getting created and that caused make to fail.
Yes indeed. I would suggest you to use the latests sources available on the cvs repository. The update since 1.3 is really worth it.
I've downloaded a fresh copy from the csv and I do get the ebin dir. Never mind, if you can run the examples under oserl/doc/examples you should be fine.
Regards,