Private key path not found when registering client
-
Hi,
I created a freshly installed CentOS7 host and I installed fogproject on it.
The installer runs fine and I can log in into Fog.
When I install the client on the first computer and try to register this computer in for, the registration fails and the client does not want to do anything like power management or execute a snapin.In the logs of the client I get the following errors:
------------------------------------------------------------------------------ ----------------------------------UserTracker--------------------------------- ------------------------------------------------------------------------------ 28/08/2019 13:33 Client-Info Client Version: 0.11.16 28/08/2019 13:33 Client-Info Client OS: Windows 28/08/2019 13:33 Client-Info Server Version: 1.5.7 28/08/2019 13:33 Middleware::Response ERROR: Unable to get subsection 28/08/2019 13:33 Middleware::Response ERROR: Object reference not set to an instance of an object. 28/08/2019 13:33 Service Sleeping for 61 seconds 28/08/2019 13:34 Middleware::Communication URL: http://fog.onetrail.net/fog/management/index.php?sub=requestClientInfo&configure&newService&json 28/08/2019 13:34 Middleware::Response Success 28/08/2019 13:34 Middleware::Communication URL: http://fog.onetrail.net/fog/management/index.php?sub=requestClientInfo&mac=1C:39:47:2E:F8:9B|E0:94:67:A6:E1:36|E0:94:67:A6:E1:37|E2:94:67:A6:E1:36|00:FF:1E:AA:B0:FA|00:FF:52:22:4A:DF|00:FF:C9:DC:0C:28|00:FF:62:19:D9:92&newService&json 28/08/2019 13:34 Middleware::Authentication Waiting for authentication timeout to pass 28/08/2019 13:35 Middleware::Communication Download: http://fog.onetrail.net/fog/management/other/ssl/srvpublic.crt 28/08/2019 13:35 Data::RSA FOG Server CA cert found 28/08/2019 13:35 Middleware::Authentication Cert OK 28/08/2019 13:35 Middleware::Authentication No token found at C:\Program Files (x86)\FOG\token.dat, this is expected if the client has not authenticated before 28/08/2019 13:35 Middleware::Authentication ERROR: Could not get security token 28/08/2019 13:35 Middleware::Authentication ERROR: Could not find file 'C:\Program Files (x86)\FOG\token.dat'. 28/08/2019 13:35 Middleware::Communication POST URL: http://fog.onetrail.net/fog/management/index.php?sub=requestClientInfo&authorize&newService 28/08/2019 13:35 Middleware::Response Private key path not found 28/08/2019 13:35 Middleware::Response Success 28/08/2019 13:35 Middleware::Communication URL: http://fog.onetrail.net/fog/service/getversion.php?clientver&newService&json 28/08/2019 13:35 Middleware::Communication URL: http://fog.onetrail.net/fog/service/getversion.php?newService&json 28/08/2019 13:35 Service Creating user agent cache 28/08/2019 13:35 Middleware::Response ERROR: Unable to get subsection 28/08/2019 13:35 Middleware::Response ERROR: Object reference not set to an instance of an object. 28/08/2019 13:35 Middleware::Response ERROR: Unable to get subsection 28/08/2019 13:35 Middleware::Response ERROR: Object reference not set to an instance of an object. 28/08/2019 13:35 Middleware::Response ERROR: Unable to get subsection 28/08/2019 13:35 Middleware::Response ERROR: Object reference not set to an instance of an object.
This continues on an on.
Reading previous posts I check the rights of the key, but that seems to be OK.
[root@office-fogserver ssl]# pwd /opt/fog/snapins/ssl [root@office-fogserver ssl]# ls -lha total 28K drwxrwxrwx. 3 fogproject apache 4,0K 28 aug 14:03 . drwxrwxrwx. 3 fogproject apache 4,0K 28 aug 14:02 .. drwxrwxrwx. 2 fogproject apache 4,0K 28 aug 14:03 CA -rwxrwxrwx. 1 fogproject apache 115 28 aug 14:03 ca.cnf -rwxrwxrwx. 1 fogproject apache 1,7K 28 aug 14:03 fog.csr -rwxrwxrwx. 1 fogproject apache 247 28 aug 14:03 req.cnf -rwxrwxrwx. 1 fogproject apache 3,2K 28 aug 14:03 .srvprivate.key
SELinux has bee turned off.
I tried running installfog.sh -KY, the installer runs and ends fine, but it doesn’t solve my issue.
What can be wrong and where can I look?
Thanks in advance!
Jurgen. -
@Jurgen-Goedbloed said in Private key path not found when registering client:
Private key path not found
Please take a look at the storage node definition/settings in the web UI. There is an option called SSL path. Make sure this matches exactly what you have in the filesystem -
/opt/fog/snapins/ssl
as we see. -
Hi Sebastian,
Thanks for the answer.
This was indeed the root cause.
On our Linux servers we set the umask to 0027 instead of 0022.
That has the consequence that /opt/fog did not have access permissions for the apache user as the R and X for others missed. Maybe an improvement for the installer as the other directories under /opt/fog have their rights set explicitely by the installer? -
@Jurgen-Goedbloed I am not exactly sure I get what you say. Has the SSL path option been wrong? What was it set to? Is this something the installer messed up?
Or do you mean the permissions were causing this issue? I have not messed with umask in a long time but I do remember this can cause quite some unexpected situations. I can imagine this could also cause trouble in other places where the FOG installer does not explicitly set permissions.