Note that there are some explanatory texts on larger screens.

plurals
  1. POStarting an Erlang slave node in escript fails when using custom Erlang in Ubuntu 10.4
    primarykey
    data
    text
    <p>I have the following escript:</p> <pre><code>#!/usr/bin/env escript %%! -name test_starter@127.0.0.1 main(_) -&gt; NodeName = test, Host = '127.0.0.1', Args = "", {ok, _Node} = slave:start_link(Host, NodeName, Args), io:format("Node started successfully!"). </code></pre> <p>When running it on Ubuntu 10.04 I get this:</p> <pre><code>$ ./start_slave Node started successfully! $ </code></pre> <p>I want to install my own Erlang (latest version, debug compiled files for dialyzer etc) since the stock install of Erlang on Ubuntu lacks some features. I put my Erlang binaries inside <code>~/Applications/bin</code>. Starting Erlang normally works, and starting slave nodes inside an Erlang shell works as well.</p> <p>However, now my escript doesn't work. After about 60 seconds it returns an error:</p> <pre><code>$ ./start_slave escript: exception error: no match of right hand side value {error,timeout} </code></pre> <p>Even if I change the first line to the escript to use my erlang version, it still does not work:</p> <pre><code>#!/home/user/Applications/bin/escript </code></pre> <p>The slave node is started with a call to <code>erlang:open_port/2</code> which seems to be using <code>sh</code> which in turn does not read my <code>.bashrc</code> file that sets my custom <code>PATH</code> environment variable. The timeout seems to occur when <code>slave:start_link/3</code> waits for the slave node to respond, which it never does.</p> <p><em>How can I roll my own installation of Erlang and start slave nodes inside escripts on Ubuntu 10.4?</em></p> <p><strong>Update:</strong> I've tried to add the path to my custom Erlang inside <code>/etc/environment</code> (where the original <code>PATH</code> in Ubuntu is set) but this does not change anything...</p> <p><strong>Update 2:</strong> Accepting the only answer given (even though it didn't solve the problem). The Ubuntu and Erlang versions are a bit old now and this might not be an issue anymore.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload