Page 1 of 2

afserver and render client as services in windows

Posted: Wed Apr 18, 2018 12:18 pm
by sag
Hi Timur,

Thanks for this wonderful render management software.
I have been trying this for couple of days in windows environment.
It is working fine through Keeper.
But I would like to run afserver as a service on Windows Server 2012 and render.exe as a service on Windows 7
Please let me know how i can do this.
The purpose of doing this is obvious.
Need to start both afserver and render on client machines when machines start after shutdown without login in.
So that rendering keeps on running un monitored.

If there is any other way to achieve this, please guide me to that.

Thanks a bunch!

Re: afserver and render client as services in windows

Posted: Wed Apr 18, 2018 12:30 pm
by timurhai
There is no "out-of-the-box" method provided with CGRU for Afanasy services for MS Windows OS.
But there are programs that allows you to run any custom thing as a service.

Re: afserver and render client as services in windows

Posted: Wed Apr 18, 2018 12:56 pm
by sag
Great thanks.
Will try first with Windows native sc.exe if that works.

Re: afserver and render client as services in windows

Posted: Wed Apr 18, 2018 1:28 pm
by anmax
Hi
You can use AlwaysUP software to easily run any application as a Windows Service

Re: afserver and render client as services in windows

Posted: Thu Apr 19, 2018 6:07 am
by sag
Sure will explore that too.
Thanks

Re: afserver and render client as services in windows

Posted: Tue May 08, 2018 11:13 am
by sag
Hi,

I tried using windows task scheduler to run the given scripts which in turn runs the afserver.exe and afrender.exe
I setup task to trigger at system startup and with a dedicated logon.
Tasks starts perfectly fine on its own and server and render clients are running too.
When I check with afwatch through Keeper, all the clients are registered with server also.
But clients doesn't render anything, and I can't get any error message in the error host log. It just says AVOIDING after getting 3 errors.
But if I stop the task, and run the cgru/start/AFANASY/_afserver.cmd and cgru/start/AFANASY/render.cmd manually, then it works and also renders fine.

What could I be doing wrong while assigning the same scripts _afserver.cmd and render.cmd in task schedular?
Please help as I don't have much programming knowledge in python.

Thanks,
Tushar
Using CGRU.2.2.3
Server: Windows server 2012 R2
Client: Windows 7

Re: afserver and render client as services in windows

Posted: Tue May 08, 2018 12:01 pm
by timurhai
Hi.
Most probably this is because service user and you (logged in graphical) has different environment.
For example permissions, mapped disks, network, display.
Some details can be in the task ouput (not just server log).

Also you should know that some programs/plugins can work w/o gui at all.
For this case there should be a graphical login and a link for render/server in "Start Up".

Re: afserver and render client as services in windows

Posted: Tue May 08, 2018 12:45 pm
by sag
Yes. If I put server/render scripts in 'Start up' it launches fine when I log in and also renders.
But that's the dependency I don't want, because we have many render nodes on which render client will be running.
It would be a big task to first login manually in all of them so that render client launches.
Can you please guide to set this up without GUI?

Thanks,
Tushar

Re: afserver and render client as services in windows

Posted: Tue May 08, 2018 1:48 pm
by timurhai
If services are working and you see task log, it seems that you already done it.
Now you should look at the task output.

Re: afserver and render client as services in windows

Posted: Tue May 08, 2018 1:55 pm
by sag
Hi,

Thanks for the hint to look for the log in Task Output.
It says, Error opening scene file: "X:\maxjobs\TestFile.max" and later also give error of writing bitmap etc.
I think this is because since render is launched when graphical logon is not even done, mapped network drive 'X' is not connected.
I had tried to use UNC path for the working directory like "\\workstation\maxjobs\TestFile.max".
But then, I was getting error that UNC path cannot start with '\', working directory doesn't exist.

Do I have to make any change in the config.json file for using UNC path as working directory for submitting job instead of mapped network drive?

Thanks,
Tushar