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 » Wed May 24, 2017 8:42 am

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: 356
Joined: Sun Jan 15, 2017 8:40 pm
Location: Russia, Korolev
Contact:

Re: Can't set af_servername without GUI

Post by timurhai » Wed May 24, 2017 8:52 am

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 2.3.0 Debian 9, Ubuntu 18.04LTS, MS Windows 7,10 (client only).

victor
Posts: 22
Joined: Mon May 15, 2017 9:53 am

Re: Can't set af_servername without GUI

Post by victor » Wed May 24, 2017 10:42 am

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: 356
Joined: Sun Jan 15, 2017 8:40 pm
Location: Russia, Korolev
Contact:

Re: Can't set af_servername without GUI

Post by timurhai » Wed May 24, 2017 11:02 am

Timur Hairulin
CGRU 2.3.0 Debian 9, Ubuntu 18.04LTS, MS Windows 7,10 (client only).

victor
Posts: 22
Joined: Mon May 15, 2017 9:53 am

Re: Can't set af_servername without GUI

Post by victor » Mon May 29, 2017 8:43 am

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

Who is online

Users browsing this forum: No registered users and 2 guests