<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>Hi,</p>
<p><br>
</p>
<p>I have found recently found out that Erlang questions in Stackoverflow earn a person a tumbleweed award
<img class="EmojiInsert" style="vertical-align: bottom;" alt="😊" src="cid:a9060b89-04dd-4134-9647-bdf73ec54784"></p>
<p><br>
</p>
<p>Throughout development, I have in general had no issues starting a release, and running "attach". I have however found after performing a hot code load, this functionality appears to break.</p>
<p>I fully documented (https://github.com/technion/erlvulnscan) in the "Hot code upgrade" heading the process I used. This process appears to have worked correctly, however, I then lose the ability to attach, and more importantly, send "stop" commands when
 I later wish to perform maintenance on this process.</p>
<p><br>
</p>
<p>Using the old release directory:</p>
<pre class="lang-erlang prettyprint prettyprinted"><code><span class="pln">$ </span><span class="pun">.</span><span class="pln">/erlvulnscan-</span><span class="lit">1.02</span><span class="pln">/bin/erlvulnscan attach
escript: </span><span class="typ">Failed</span><span class="pln"> to open
file: /home/technion/erlvulnscan/rel/erlvulnscan-</span><span class="lit">1.02</span><span class="pln">/erts-</span><span class="lit">6.4</span><span class="pln">/bin/nodetool
</span><span class="typ">Node</span><span class="pln"> is not running!</span></code></pre>
<p>In the new one:</p>
<pre class="lang-erlang prettyprint prettyprinted"><code><span class="pln">$ </span><span class="pun">.</span><span class="pln">/erlvulnscan-</span><span class="lit">1.03</span><span class="pln">/bin/erlvulnscan attach
pong
</span><span class="typ">Can</span><span class="lit">'t access pipe  </span><span class="pln">
directory /tmp//home/technion/erlvulnscan/rel/erlvulnscan-</span><span class="lit">1.03</span><span class="pln">/: 
</span><span class="typ">No</span><span class="pln"> such file or directory</span></code></pre>
<p>I did ultimately find I could connect using this command:</p>
<pre class="lang-erlang prettyprint prettyprinted"><code><span class="pln">$ </span><span class="pun">.</span><span class="pln">/erlvulnscan-</span><span class="lit">1.03</span><span class="pln">/erts-</span><span class="lit">6.4</span><span class="pln">/bin/to_erl 
/tmp/home/technion/erlvulnscan/rel/erlvulnscan-</span><span class="lit">1.02</span><span class="pln">/erlang</span><span class="pun">.</span><span class="pln">pipe</span><span class="pun">.</span><span class="lit">2</span></code></pre>
<p>However this feels like an absurd workaround - like something is obviously broken to get into this state.</p>
<p>I can kill the process (using the kill command) after which it can be started and stopped without issue, suggesting something was done wrong, or got broken, during the code load process.</p>
<p><br>
</p>
<p>I'm not sure if it's an Erlangism I should get used to, but the location of these pipes in general feels very unusual. I don't see why an entire directory structure would be recreated under /tmp, I'd expect to either sit under the release' own directory,
 or one directory deep in /tmp. The fact it's a deterministic file and directory name could lead to security issues.</p>
<p><br>
</p>
<p> </p>
<p>Any assistance appreciated (any comments on code or general design also appreciated, this is my first Erlang project).<br>
</p>
</div>
</body>
</html>