<div dir="ltr"><div><div>I got it to work by putting .erlang.cookie in c:\windows.<br><br></div>In my testing I had put a file there previously, but it wouldn't be read if the file wasn't set to readonly.<br><br></div>
Thanks,<br><div><br>wes<br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Feb 12, 2013 at 2:17 PM, Dave Cottlehuber <span dir="ltr"><<a href="mailto:dch@jsonified.com" target="_blank">dch@jsonified.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Last time I looked at the source workdir wasn't for changing where the<br>
cookie got read from.<br>
<br>
But you should be able to load the cookie & start the network<br>
programatically, something like this, starting up in non-distributed<br>
mode:<br>
<br>
net_kernel:start([<newname>]). %% uses longnames by default<br>
net_kernel:start([<newname>, shortnames]). %% if you prefer shortname.<br>
erlang:set_cookie(node(), yumyumyum). %% yes it's an atom.<br>
<br>
This has the added bonus of being able to stash your cookie in an<br>
encrypted form either on disk or in the beam.<br>
<br>
Let me know if this works out, I haven't tried it but use similar<br>
things for monitoring.<br>
<br>
And I'm one of those closet Erlang Windows users too.<br>
<br>
A+<br>
Dave<br>
<div><div class="h5"><br>
On 12 February 2013 22:11, Wes James <<a href="mailto:comptekki@gmail.com">comptekki@gmail.com</a>> wrote:<br>
> I was able to get ssl communication between nodes on linux. Here is a<br>
> windows .cmd script for installing erlsrv with ssl communication:<br>
><br>
> @rem<br>
> @rem sample erlang install service script<br>
> @rem - add then start ecom erlang service<br>
> @rem - if it already exists, stop then remove first before adding and<br>
> starting<br>
> @rem<br>
><br>
> @set erl_service=my_service<br>
> @erlsrv list %erl_service% | @findstr /i "%erl_service%"<br>
> @echo.<br>
> @if errorlevel 1 goto install<br>
> @rem echo Stopping and removing erl service...<br>
> @erlsrv remove "%erl_service%"<br>
><br>
> :install<br>
> @set module=-s my_module<br>
> @set onfail=-onfail restart<br>
> @set node=-name node_name<br>
> @set root=-w "C:/path"<br>
> @set srvc_name=-i my_service<br>
> @set boot=-boot c:/path/start_ssl_ecom -proto_dist inet_tls -ssl_dist_opt<br>
> server_certfile c:/path/ssl/cert.pem -ssl_dist_opt server_keyfile<br>
> c:/path/ssl/key.pem -ssl_dist_opt server_secure_renegotiate true<br>
> client_secure_renegotiate true<br>
> @set cookie=-setcookie my_cookie<br>
> @set args=-args "%boot% %cookie% %module%"<br>
><br>
> @echo.<br>
> @rem echo Adding erl service...<br>
> @erlsrv add "%erl_service%" %node% %root% %onfail% %args% %srvc_name%<br>
> @echo.<br>
> @rem echo Starting erl service...<br>
> @erlsrv start %erl_service%<br>
> @echo.<br>
> @pause<br>
><br>
> Now if I can figure out why it's not picking up the .erlang.cookie from -w<br>
> path, I'll be able to remove the -setcookie option. I've tried putting the<br>
> .erlang.cookie in a lot of different places to see if it gets read - no dice<br>
> yet. I have been able to get .erlang.cookie created in my windows profile<br>
> c:/users/username when I run erl -name, but not yet with erlsrv.<br>
><br>
> I'm excited to get ssl working. I have wanted it working for<br>
> <a href="https://github.com/comptekki/esysman" target="_blank">https://github.com/comptekki/esysman</a> so I can send commands encrypted and<br>
> not in the clear.<br>
><br>
> Thanks to all that have contributed to my questions about this!<br>
><br>
> wes<br>
><br>
</div></div>> _______________________________________________<br>
> erlang-questions mailing list<br>
> <a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
> <a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
><br>
</blockquote></div><br></div>