Exception in Mochiweb

21 views
Skip to first unread message

gozdal

unread,
Mar 12, 2012, 4:04:29 PM3/12/12
to ope...@googlegroups.com
I am trying to start OpenACD but get mochiweb exception when getsalt URL is retrieved by Web UI:

=CRASH REPORT==== 12-Mar-2012::19:56:41 ===
  crasher:
    initial call: mochiweb_acceptor:init/3
    pid: <0.189.0>
    registered_name: []
    exception error: undefined function public_key:pem_decode/1
      in function  util:get_pubkey/0
      in call from cpx_web_management:api/3
      in call from cpx_web_management:loop/2
      in call from mochiweb_http:headers/5

I am running on Debian Squeeze 64 bit with erlang 1:14.a-dfsg-3squeeze1 (Erlang R14A (erts-5.8) [source] [64-bit] [smp:2:2] [rq:2] [async-threads:0] [kernel-poll:false]).

I do have erlang-public-key package installed (1:14.a-dfsg-3squeeze1).

Any idea why it fails to find pem_decode/1 ?

Best regards

Abhinav Jha

unread,
Mar 12, 2012, 5:20:54 PM3/12/12
to ope...@googlegroups.com
Hi,

Can you run code:which(public_key) on the prompt and return the output ? 
It should return the path of the beam file. You can open the corresponding path ( replace ebin by src in the path ) and look for the function pem_decode. If not present, you have an older version present probably ?

Thanks, 
Abhinav

Marcin Gozdalik

unread,
Mar 13, 2012, 5:45:15 AM3/13/12
to ope...@googlegroups.com
Yep, it seems to be the problem.

-module(public_key).

-include("public_key.hrl").

-export([decode_private_key/1, decode_private_key/2, decode_dhparams/1,
         decrypt_private/2, decrypt_private/3, encrypt_public/2,
         encrypt_public/3, decrypt_public/2, decrypt_public/3,
         encrypt_private/2, encrypt_private/3, gen_key/1, sign/2, sign/3,
         verify_signature/3, verify_signature/4, verify_signature/5,
         pem_to_der/1, pem_to_der/2, der_to_pem/2,
         pkix_decode_cert/2, pkix_encode_cert/1, pkix_transform/2,
         pkix_is_self_signed/1, pkix_is_fixed_dh_cert/1,
         pkix_issuer_id/2,
         pkix_is_issuer/2, pkix_normalize_general_name/1,
         pkix_path_validation/3
        ]).

Does Erlang have a notion of package manager? How can I upgrade just public_key? Debian Squeeze has public_key 0.7 packaged, I assume the latest is 0.14 (as per http://www.erlang.org/doc/man/public_key.html).

Is there a list of modules and their minimum versions for OpenACD?

2012/3/12 Abhinav Jha <viro...@gmail.com>



--
Marcin Gozdalik

Marcin Gozdalik

unread,
Mar 13, 2012, 6:38:10 AM3/13/12
to ope...@googlegroups.com
Just a follow-up that indeed upgrading to newer Erlang helps (from Debian Backports, package 1:15.b-dfsg-2~bpo60+1, Erlang R15B (erts-5.9) [source] [64-bit] [smp:2:2] [async-threads:5] [kernel-poll:true]).

Thanks for hinting at public_key version.

2012/3/13 Marcin Gozdalik <goz...@gmail.com>



--
Marcin Gozdalik
Reply all
Reply to author
Forward
0 new messages