Can't set af_servername without GUI

General discussions and questions.
Post Reply
victor
Posts: 22
Joined: Mon May 15, 2017 9:53 am

Can't set af_servername without GUI

Post 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
User avatar
timurhai
Site Admin
Posts: 911
Joined: Sun Jan 15, 2017 8:40 pm
Location: Russia, Korolev
Contact:

Re: Can't set af_servername without GUI

Post 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.
Timur Hairulin
CGRU 3.3.1, Ubuntu 20.04, 22.04, MS Windows 10 (clients only).
victor
Posts: 22
Joined: Mon May 15, 2017 9:53 am

Re: Can't set af_servername without GUI

Post 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?
User avatar
timurhai
Site Admin
Posts: 911
Joined: Sun Jan 15, 2017 8:40 pm
Location: Russia, Korolev
Contact:

Re: Can't set af_servername without GUI

Post by timurhai »

Timur Hairulin
CGRU 3.3.1, Ubuntu 20.04, 22.04, MS Windows 10 (clients only).
victor
Posts: 22
Joined: Mon May 15, 2017 9:53 am

Re: Can't set af_servername without GUI

Post 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
Post Reply