erlsrv on windows 10 problem

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

erlsrv on windows 10 problem

Wes James
I use erlsrv to install an erlang application on windows.  Windows 7 works fine, but on windows 10, I have to go in and change the service from automatic to Automatic (delayed start), otherwise the app never runs on system start up.  Any idea how to fix this?

I just found this windows command:

sc config SVCNAME start= delayed-auto

I can use that in the install script.

I'd still like it to start with just automatic.  With the delayed option, it takes several extra minutes for the service to start running.

Thanks,

-wes

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: erlsrv on windows 10 problem

Dan Gudmundsson-3
Well you got it run at all, that is something, I have disabled our testing of
services on Windows 10 for now, master branch, since I could not get it run at all. 

From what I googled and understood you will need start the services from an elevated shell, an administer user is not enough. 
But you might already do that or I got it wrong.

Anyway, our Windows knowledge, and priority, is not at the highest level.
So any help would be appreciated.

/Dan

On Fri, Apr 29, 2016 at 5:55 PM Wes James <[hidden email]> wrote:
I use erlsrv to install an erlang application on windows.  Windows 7 works fine, but on windows 10, I have to go in and change the service from automatic to Automatic (delayed start), otherwise the app never runs on system start up.  Any idea how to fix this?

I just found this windows command:

sc config SVCNAME start= delayed-auto

I can use that in the install script.

I'd still like it to start with just automatic.  With the delayed option, it takes several extra minutes for the service to start running.

Thanks,

-wes
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: erlsrv on windows 10 problem

Wes James
I have it working on windows 10, as mentioned, I just need to change the start up option in the windows service from Automatic to Automatic (delayed start).  

What can I help with?

-wes

On Fri, Apr 29, 2016 at 11:59 PM, Dan Gudmundsson <[hidden email]> wrote:
Well you got it run at all, that is something, I have disabled our testing of
services on Windows 10 for now, master branch, since I could not get it run at all. 

From what I googled and understood you will need start the services from an elevated shell, an administer user is not enough. 
But you might already do that or I got it wrong.

Anyway, our Windows knowledge, and priority, is not at the highest level.
So any help would be appreciated.

/Dan

On Fri, Apr 29, 2016 at 5:55 PM Wes James <[hidden email]> wrote:
I use erlsrv to install an erlang application on windows.  Windows 7 works fine, but on windows 10, I have to go in and change the service from automatic to Automatic (delayed start), otherwise the app never runs on system start up.  Any idea how to fix this?

I just found this windows command:

sc config SVCNAME start= delayed-auto

I can use that in the install script.

I'd still like it to start with just automatic.  With the delayed option, it takes several extra minutes for the service to start running.

Thanks,

-wes
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions


_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: erlsrv on windows 10 problem

Wes James
In reply to this post by Dan Gudmundsson-3
This is with the 18.3 windows binary from erlang.org.

-wes

On Fri, Apr 29, 2016 at 11:59 PM, Dan Gudmundsson <[hidden email]> wrote:
Well you got it run at all, that is something, I have disabled our testing of
services on Windows 10 for now, master branch, since I could not get it run at all. 

From what I googled and understood you will need start the services from an elevated shell, an administer user is not enough. 
But you might already do that or I got it wrong.

Anyway, our Windows knowledge, and priority, is not at the highest level.
So any help would be appreciated.

/Dan

On Fri, Apr 29, 2016 at 5:55 PM Wes James <[hidden email]> wrote:
I use erlsrv to install an erlang application on windows.  Windows 7 works fine, but on windows 10, I have to go in and change the service from automatic to Automatic (delayed start), otherwise the app never runs on system start up.  Any idea how to fix this?

I just found this windows command:

sc config SVCNAME start= delayed-auto

I can use that in the install script.

I'd still like it to start with just automatic.  With the delayed option, it takes several extra minutes for the service to start running.

Thanks,

-wes
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions


_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: erlsrv on windows 10 problem

Wes James
I have a script that I right-click on and select run as administrator, so yes, it has to be done as admin.

This is what I use for win 10 (setup-erlsrv.cmd):

@echo off

@rem
@rem sample erlang install service script
@rem - add then start ecom erlang service
@rem - if it already exists, stop then remove first before adding and starting
@rem 

@set erl_service=0ecom
@erlsrv list %erl_service% | @findstr /i "%erl_service%"
@if errorlevel 1 goto next
@echo.
@rem echo Removing erl service...
@erlsrv remove "%erl_service%"

rem @goto:EOF

:next

@SETLOCAL ENABLEDELAYEDEXPANSION
@SET comp=computer-name

@set module=-s ecom
@set onfail=-onfail restart
@set node=-name ecom@%comp%.nr.usu.edu
@rem echo %node%
@set root=-w "C:/windows/erl"
@set srvc_name=-i 0ecom
@set boot=-boot c:/windows/erl/start_ssl_ecom -proto_dist inet_tls -ssl_dist_opt server_certfile c:/windows/erl/ssl/cert.pem -ssl_dist_opt server_keyfile c:/windows/erl/ssl/key.pem -ssl_dist_opt server_secure_renegotiate true client_secure_renegotiate true
@rem set args=-args "%boot% %module%"
@set args=-args "%boot% %module%"

@echo.
@rem echo Adding erl service...
@erlsrv add "%erl_service%" %node% %root% %onfail% %args%
@echo.
@rem echo Starting erl service...
@erlsrv start %erl_service%
@echo.

:end
@pause
@goto:EOF

-------------

Then I paste this in to an elevated cmd shell (for some reason it won't run from a file) to set the service to automatic delayed:

@FOR /F "delims=" %i IN ('sc getkeyname 0ecom') DO set z=%i
@echo %z%
@for /f "tokens=3" %i IN ("%z%") DO set erl_servicedispname=%i
@echo %erl_servicedispname%

@sc config %erl_servicedispname% start= delayed-auto

-------

I use it to install ecom.beam as a service from this project:


-wes

On Mon, May 2, 2016 at 1:18 PM, Dan Gudmundsson <[hidden email]> wrote:
I do not remember the exact error message now, but what I gathered you had to start erlsrv (and erlang) from an "elevated" shell, otherwise you don't have the permissions to install the services. And we run our automtic tests from a "admin" user but not from an "elevated" shell.

But I don't really know what I'm talking about here, as I said, our windows competence is really low. 

So how you install the services, do you run start erlang from inside
and admin cmd prompt.

Regards
/Dan

On Mon, May 2, 2016 at 7:27 PM Wes James <[hidden email]> wrote:
This is with the 18.3 windows binary from erlang.org.

-wes
On Fri, Apr 29, 2016 at 11:59 PM, Dan Gudmundsson <[hidden email]> wrote:
Well you got it run at all, that is something, I have disabled our testing of
services on Windows 10 for now, master branch, since I could not get it run at all. 

From what I googled and understood you will need start the services from an elevated shell, an administer user is not enough. 
But you might already do that or I got it wrong.

Anyway, our Windows knowledge, and priority, is not at the highest level.
So any help would be appreciated.

/Dan

On Fri, Apr 29, 2016 at 5:55 PM Wes James <[hidden email]> wrote:
I use erlsrv to install an erlang application on windows.  Windows 7 works fine, but on windows 10, I have to go in and change the service from automatic to Automatic (delayed start), otherwise the app never runs on system start up.  Any idea how to fix this?

I just found this windows command:

sc config SVCNAME start= delayed-auto

I can use that in the install script.

I'd still like it to start with just automatic.  With the delayed option, it takes several extra minutes for the service to start running.

Thanks,

-wes
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions


_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: erlsrv on windows 10 problem

Dan Gudmundsson-2
Thanks, I figured it should work, but I have disabled the testing since it requires manual starting of elevated cmd shell.

On Mon, May 2, 2016 at 9:51 PM Wes James <[hidden email]> wrote:
I have a script that I right-click on and select run as administrator, so yes, it has to be done as admin.

This is what I use for win 10 (setup-erlsrv.cmd):

@echo off

@rem
@rem sample erlang install service script
@rem - add then start ecom erlang service
@rem - if it already exists, stop then remove first before adding and starting
@rem 

@set erl_service=0ecom
@erlsrv list %erl_service% | @findstr /i "%erl_service%"
@if errorlevel 1 goto next
@echo.
@rem echo Removing erl service...
@erlsrv remove "%erl_service%"

rem @goto:EOF

:next

@SETLOCAL ENABLEDELAYEDEXPANSION
@SET comp=computer-name

@set module=-s ecom
@set onfail=-onfail restart
@set node=-name ecom@%comp%.nr.usu.edu
@rem echo %node%
@set root=-w "C:/windows/erl"
@set srvc_name=-i 0ecom
@set boot=-boot c:/windows/erl/start_ssl_ecom -proto_dist inet_tls -ssl_dist_opt server_certfile c:/windows/erl/ssl/cert.pem -ssl_dist_opt server_keyfile c:/windows/erl/ssl/key.pem -ssl_dist_opt server_secure_renegotiate true client_secure_renegotiate true
@rem set args=-args "%boot% %module%"
@set args=-args "%boot% %module%"

@echo.
@rem echo Adding erl service...
@erlsrv add "%erl_service%" %node% %root% %onfail% %args%
@echo.
@rem echo Starting erl service...
@erlsrv start %erl_service%
@echo.

:end
@pause
@goto:EOF

-------------

Then I paste this in to an elevated cmd shell (for some reason it won't run from a file) to set the service to automatic delayed:

@FOR /F "delims=" %i IN ('sc getkeyname 0ecom') DO set z=%i
@echo %z%
@for /f "tokens=3" %i IN ("%z%") DO set erl_servicedispname=%i
@echo %erl_servicedispname%

@sc config %erl_servicedispname% start= delayed-auto

-------

I use it to install ecom.beam as a service from this project:


-wes

On Mon, May 2, 2016 at 1:18 PM, Dan Gudmundsson <[hidden email]> wrote:
I do not remember the exact error message now, but what I gathered you had to start erlsrv (and erlang) from an "elevated" shell, otherwise you don't have the permissions to install the services. And we run our automtic tests from a "admin" user but not from an "elevated" shell.

But I don't really know what I'm talking about here, as I said, our windows competence is really low. 

So how you install the services, do you run start erlang from inside
and admin cmd prompt.

Regards
/Dan

On Mon, May 2, 2016 at 7:27 PM Wes James <[hidden email]> wrote:
This is with the 18.3 windows binary from erlang.org.

-wes
On Fri, Apr 29, 2016 at 11:59 PM, Dan Gudmundsson <[hidden email]> wrote:
Well you got it run at all, that is something, I have disabled our testing of
services on Windows 10 for now, master branch, since I could not get it run at all. 

From what I googled and understood you will need start the services from an elevated shell, an administer user is not enough. 
But you might already do that or I got it wrong.

Anyway, our Windows knowledge, and priority, is not at the highest level.
So any help would be appreciated.

/Dan

On Fri, Apr 29, 2016 at 5:55 PM Wes James <[hidden email]> wrote:
I use erlsrv to install an erlang application on windows.  Windows 7 works fine, but on windows 10, I have to go in and change the service from automatic to Automatic (delayed start), otherwise the app never runs on system start up.  Any idea how to fix this?

I just found this windows command:

sc config SVCNAME start= delayed-auto

I can use that in the install script.

I'd still like it to start with just automatic.  With the delayed option, it takes several extra minutes for the service to start running.

Thanks,

-wes
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions


_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: erlsrv on windows 10 problem

Wes James
In reply to this post by Dan Gudmundsson-3
I tried this today with 19.3.  I have to set the service to Automatic (Delaye Start) for it to work, like in 18.3.  I looked in the eventviewer and I see these errors:

Error Service Control Manager
Under General Tab
The service terminated with the following error:
The configuration registry key could not be read.

A little further down

Error ErlSrv
Under General Tab
servicename: Could not get registry keys for erlang service.

Which is odd since it does work when delayed.  It's like it's waiting for some other service to start but hasn't yet so it quits.  I'm not sure what it's depending on before starting successfully in delayed start.

-wes

On Fri, Apr 29, 2016 at 11:59 PM, Dan Gudmundsson <[hidden email]> wrote:
Well you got it run at all, that is something, I have disabled our testing of
services on Windows 10 for now, master branch, since I could not get it run at all. 

From what I googled and understood you will need start the services from an elevated shell, an administer user is not enough. 
But you might already do that or I got it wrong.

Anyway, our Windows knowledge, and priority, is not at the highest level.
So any help would be appreciated.

/Dan

On Fri, Apr 29, 2016 at 5:55 PM Wes James <[hidden email]> wrote:
I use erlsrv to install an erlang application on windows.  Windows 7 works fine, but on windows 10, I have to go in and change the service from automatic to Automatic (delayed start), otherwise the app never runs on system start up.  Any idea how to fix this?

I just found this windows command:

sc config SVCNAME start= delayed-auto

I can use that in the install script.

I'd still like it to start with just automatic.  With the delayed option, it takes several extra minutes for the service to start running.

Thanks,

-wes
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions


_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: erlsrv on windows 10 problem

Wes James
I found a fix that works for me.  Note this issue is only on windows 10.

Set this registry entry:

Create AutoStartDelay as DWORD 32 bit and set to decimail 1 in this key:

HKLM\SYSTEM\CurrentControlSet\Control\



-wes

On Thu, Apr 27, 2017 at 11:01 AM, Wes James <[hidden email]> wrote:

>
> I tried this today with 19.3.  I have to set the service to Automatic (Delaye Start) for it to work, like in 18.3.  I looked in the eventviewer and I see these errors:
>
> Error Service Control Manager
> Under General Tab
> The service terminated with the following error:
> The configuration registry key could not be read.
>
> A little further down
>
> Error ErlSrv
> Under General Tab
> servicename: Could not get registry keys for erlang service.
>
> Which is odd since it does work when delayed.  It's like it's waiting for some other service to start but hasn't yet so it quits.  I'm not sure what it's depending on before starting successfully in delayed start.
>
> -wes
>
> On Fri, Apr 29, 2016 at 11:59 PM, Dan Gudmundsson <[hidden email]> wrote:
>>
>> Well you got it run at all, that is something, I have disabled our testing of
>> services on Windows 10 for now, master branch, since I could not get it run at all.
>>
>> From what I googled and understood you will need start the services from an elevated shell, an administer user is not enough.
>> But you might already do that or I got it wrong.
>>
>> Anyway, our Windows knowledge, and priority, is not at the highest level.
>> So any help would be appreciated.
>>
>> /Dan
>>
>> On Fri, Apr 29, 2016 at 5:55 PM Wes James <[hidden email]> wrote:
>>>
>>> I use erlsrv to install an erlang application on windows.  Windows 7 works fine, but on windows 10, I have to go in and change the service from automatic to Automatic (delayed start), otherwise the app never runs on system start up.  Any idea how to fix this?
>>>
>>> I just found this windows command:
>>>
>>> sc config SVCNAME start= delayed-auto
>>>
>>> I can use that in the install script.
>>>
>>> I'd still like it to start with just automatic.  With the delayed option, it takes several extra minutes for the service to start running.
>>>
>>> Thanks,
>>>
>>> -wes
>>> _______________________________________________
>>> erlang-questions mailing list
>>> [hidden email]
>>> http://erlang.org/mailman/listinfo/erlang-questions
>
>

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Loading...