[erlang-questions] use only parts of a release

Pablo Platt pablo.platt@REDACTED
Sat Apr 23 16:41:35 CEST 2011


I have successfully installed the second release on the dev machine with release_handle:unpack_release, install_release and make_permanent
but when trying to install myserver_2.tar.gz on the new machine I'm still getting same errors.

I'm able  to extract myserver_2.tar.gz with erl_tar:extract("myserver_2.tar.gz", [compressed])
so I don't think it's a permission issue.
I also see the myserver_2.rel file so maybe the error is because the path is not correct?

The contents after extracting are:
lib\
     all the application folders...
releases\
     myserver_2.rel
     \2
          relup
          myserver.boot (symlink)
          start.boot
          start_clean.boot

Again, the errors I'm getting are:
1. Error when trying to use release_handler:unpack_release("myserver_2"):
{error,{enoent,"/usr/lib/myserver/releases/myserver_2.rel"}}

2. After I copy myserver_2.rel manually to /usr/lib/myserver/releases and trying release_handler:unpack_release("myserver_2") again I'm getting:
{error,{{case_clause,{error,eacces}},
        [{release_handler,extract_tar,2},
         {release_handler,do_unpack_release,4},
         {release_handler,handle_call,3},
         {gen_server,handle_msg,5},
         {proc_lib,init_p_do_apply,3}]}}
          

>> 11. /usr/lib/myserver/bin/myserver attach
>> release_handler:unpack_release("myserver_2").
>> {error,{enoent,"/usr/lib/myserver/releases/myserver_2.rel"}}
>> Why am I getting the enoent error?
>
>I don't use rebar for releases so I can't help you here. I don't know
>why this file didn't exist.
>
>> 12. trying to fix the error - copy manually the myserver_2.rel file to
>> /usr/lib/myserver/releases
>> release_handler:unpack_release("myserver_2").
>> {error,{{case_clause,{error,eacces}},
>>         [{release_handler,extract_tar,2},
>>          {release_handler,do_unpack_release,4},
>>          {release_handler,handle_call,3},
>>          {gen_server,handle_msg,5},
>>          {proc_lib,init_p_do_apply,3}]}}
>
>The obvious guess here would be that the user running the Erlang VM
>doesn't have write access to all the paths in the tar.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20110423/d5330282/attachment.htm>


More information about the erlang-questions mailing list