Project

General

Profile

Actions

Bug #23396

closed

Debian 10 agents are not registered

Added by Roni Väyrynen 9 months ago. Updated 9 months ago.

Status:
Resolved
Priority:
N/A
Assignee:
-
Category:
Agent
Target version:
-
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
To do
Fix check:
To do
Regression:
No

Description

New Debian 10 agents fail with relay or server as policy server. The initial agent inventory during installation fails as follows:

Node uuid: af26cc47-d08a-4658-95b8-a815607a297a
M| State         Technique                 Component                 Key                Message
E| compliant     Common                    Compute inventory splay                      Scheduling rudder_run_inventory was correct
E| error         Inventory                 Inventory                                    Generated inventory has been detected as invalid
info     Rudder agent was run on a subset of policies - not all policies were checked

## Summary #####################################################################
2 components verified in 3 directives
   => 2 components in Enforce mode
      -> 1 compliant
      -> 1 error
Execution time: 2.09s
################################################################################
OK

Manual rudder agent update after this outputs:

# rudder agent update -i
   error: Can't stat file '/var/rudder/share/af26cc47-d08a-4658-95b8-a815607a297a/rules/cfengine-community/rudder-promises-generated' on '<ip-address>' in files.copy_from promise, it may be missing or access may not be authorized
   error: Errors encountered when actuating files promise '/var/rudder/cfengine-community/inputs/rudder-promises-generated.tmp'
R: *********************************************************************************
  *  You must accept this node on the server before updating this node            *
  *  This node uses initial policies, some error message are expected until       *
  *  the node is accepted.                                                        *
  *********************************************************************************
ok: Rudder node waiting to be accepted

But node never ends up to pending nodes for acceptance. I mainly use relay, but tested that i can reproduce this with direct server connection. Only difference i can find from logs while doing this:

working node (eq. Debian 12):

2023-09-06T11:51:40.190100+00:00 rudder-relay cf-serverd[3762852]: rudder     info: <ip-address>>   Accepting connection
2023-09-06T11:51:40.245896+00:00 rudder-relay cf-serverd[3762852]:   notice: <ip-address>>   Trusting new key: MD5=e938051f89ec90d8084c0ef774f1519e
2023-09-06T11:51:40.645398+00:00 rudder-relay cf-serverd[3762852]: rudder     info: <ip-address>>   Closing connection, terminating thread

non-working node:

2023-09-06T12:16:02.759739+00:00 rudder-relay cf-serverd[3765716]: rudder     info: <ip-address>  Accepting connection
2023-09-06T12:16:02.818102+00:00 rudder-relay cf-serverd[3765716]: rudder     info: <ip-address>  Failed to canonicalise filename '/var/rudder/share/af26cc47-d08a-4658-95b8-a815607a297a/rules/cfengine-community/rudder-promises-generated' (realpath: No such file or directory)
2023-09-06T12:16:02.830194+00:00 rudder-relay-public-fi-hel1 cf-serverd[3765716]: rudder     info: <ip-address>  Closing connection, terminating thread

Error isn't really obvious and no idea why it happens only with older Debian.

I've tried to install the agent from both repository.rudder.io and download.rudder.io if that would've made any difference but they seem identical to me so probably no difference.

Actions #1

Updated by Alexis Mousset 9 months ago

Can you give the output of:

rudder agent inventory -i
Actions #2

Updated by Roni Väyrynen 9 months ago

Alexis Mousset wrote in #note-1:

Can you give the output of:

[...]

Thank you. For some reason i didn't realize to run this. This actually solves the issue. Hostname wasn't resolvable via DNS and was missing from /etc/hosts file so in the end, the issue was our Debian 10 installation, not rudder. Sorry for the trouble and thanks for help.

Actions #3

Updated by Alexis Mousset 9 months ago

  • Status changed from New to Resolved

Thanks for your answer, I'm closing this ticket.

Actions

Also available in: Atom PDF