Page 1 of 1

Can't set af_servername without GUI

Posted: Wed May 24, 2017 8:42 am
by victor
Our renders machines (agents) setup automatically and run as a windows services.
Thus we need to set 'af_servername' using a script (without GUI).
For that purpose we use C:\Users\Administrator\AppData\Roaming\cgru\config.json.

In this file our script sets af_servername = "10.163.2.222"
In GUI setting servername is 10.163.2.20

The result:
The render cannot connect to the server and only when we manually change the server in GUI to 10.163.2.222 it connects successfully.

running _afcmd.cmd prints the following strange lines:
Parsing config file ‘C:\Users\Administrator\AppData\Roaming\cgru/config.json’:
af_servername = ‘10.163.2.20’

As I mentioned in this file af_servername = "10.163.2.222"

Please help.
Thanks
Victor

Re: Can't set af_servername without GUI

Posted: Wed May 24, 2017 8:52 am
by timurhai
Setting af_servername from GUI is not needed at all. It was made just for testing.
This is our cgru/config.json file for MS Windows platform:

Code: Select all

{"cgru_config":{
	"include":["T:/config.json"]
}}
It just includes other config from a shared place.

"AppData\Roaming\cgru" just needed to store user specific settings, like afwatch color there, it should be used for a farm setup.

Re: Can't set af_servername without GUI

Posted: Wed May 24, 2017 10:42 am
by victor
Sorry, I still dont understand what should I do to make it work properly.
What file does define the actual config?
Where should it be located?

Re: Can't set af_servername without GUI

Posted: Wed May 24, 2017 11:02 am
by timurhai

Re: Can't set af_servername without GUI

Posted: Mon May 29, 2017 8:43 am
by victor
Ok, we resolved our issue.
The problem was the way we run it in windows:
It runs as a windows service.
When the service runs under Admin user it takes the config defined by the GUI.
We changed the service to run as a System user and only then it takes the config from the files as defined in documentation.

Thanks