Project

General

Profile

Actions

Bug #22947

closed

Unable to join agent to Rudder 7.3 server

Added by Julien Briault over 1 year ago. Updated over 1 year ago.

Status:
Rejected
Priority:
N/A
Assignee:
-
Category:
Agent
Target version:
Severity:
Minor - inconvenience | misleading | easy workaround
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
To do
Fix check:
To do
Regression:
No

Description

Hello friends,

I'm contacting you because I've come up against a rather unusual problem.
Let me explain, when I try to add my node to Rudder and send the first inventory I get the following error message:

```
Rudder agent 7.3.2
Node uuid: ade33535-0add-437c-93e2-d554e4e505ec
verbose: CFEngine Core 3.21.0
verbose: ----------------------------------------------------------------
verbose: Initialization preamble
verbose: ----------------------------------------------------------------
verbose: Default port for cfengine is 5308
verbose: Work directory is /var/rudder/cfengine-community
verbose: Making sure that internal directories are private...
verbose: Checking integrity of the trusted workdir
verbose: Checking integrity of the state database
verbose: Checking integrity of the module directory
verbose: Checking integrity of the PKI directory
verbose: Loaded private key at '/var/rudder/cfengine-community/ppkeys/localhost.priv'
verbose: Loaded public key '/var/rudder/cfengine-community/ppkeys/localhost.pub'
verbose: Reference time set to 'Fri Jun 23 07:20:59 2023'
verbose: CFEngine Core 3.21.0 - ready
verbose: ----------------------------------------------------------------
verbose: Environment discovery
verbose: ----------------------------------------------------------------
verbose: Host name is: mymachine
verbose: Operating System Type is linux
verbose: Operating System Release is 5.15.0-75-generic
verbose: Architecture = x86_64
verbose: CFEngine detected operating system description is linux
verbose: The time is now Fri Jun 23 07:20:59 2023
verbose: Additional hard class defined as: 64_bit
verbose: Additional hard class defined as: linux_5_15_0_75_generic
verbose: Additional hard class defined as: linux_x86_64
verbose: Additional hard class defined as: linux_x86_64_5_15_0_75_generic
verbose: GNU autoconf class from compile time: compiled_on_linux_gnu
verbose: Address given by nameserver: 127.0.1.1
verbose: No interface exception file /var/rudder/cfengine-community/inputs/ignore_interfaces.rx
verbose: Interface 1: lo
verbose: Interface 2: ens18
verbose: IP address of host set to x.x.x.x
verbose: Interface 3: ens19
verbose: Trying to locate my IPv6 address
verbose: Found IPv6 address fe80::2c10:5fff:fe7c:bf7b
verbose: Found IPv6 address fe80::3842:5bff:fe59:ceb9
verbose: Reading netstat info from /proc/58171/net/netstat
verbose: Reading (null) info from /proc/58171/net/route
verbose: Reading (null) info from /proc/58171/net/snmp6
verbose: Reading (null) info from /proc/58171/net/ipv6_route
verbose: Reading (null) info from /proc/58171/net/if_inet6
verbose: Reading interfaces_data info from /proc/58171/net/dev
verbose: Looking for environment from cf-monitord...
verbose: Unable to detect environment from cf-monitord
verbose: This appears to be a debian system.
verbose: Looking for Debian version...
verbose: Found 4 processors
verbose: Loading persistent classes
verbose: Persistent class 'rudder_promises_generated_tmp_file_error' for 3 more minutes
verbose: This agent is bootstrapped to: x.x.x.x
verbose: No host-specific JSON data available at '/var/rudder/cfengine-community/data/host_specific.json'
verbose: Loading JSON augments from '/var/rudder/cfengine-community/inputs/def.json' (input dir '/var/rudder/cfengine-community/inputs', input file '/var/rudder/cfengine-community/inputs/promises.cf'
verbose: could not load JSON augments from '/var/rudder/cfengine-community/inputs/def.json'
verbose: Input file '/var/rudder/cfengine-community/inputs/promises.cf' has changed since the last policy read attempt (file is newer than previous)
verbose: Input file is changed since last validation, validating it
verbose: Verifying the syntax of the inputs...
verbose: Checking policy with command '"/opt/rudder/bin/cf-promises" "/var/rudder/cfengine-community/inputs/promises.cf" -b "doInventory"'
error: Can't stat file '/var/rudder/ncf//bin/sh: 0: cannot open /var/rudder/ncf/common/10_ncf_internals/list-compatible-inputs: No such file' for parsing. (stat: No such file or directory)
error: Policy failed validation with command '"/opt/rudder/bin/cf-promises" "/var/rudder/cfengine-community/inputs/promises.cf" -b "doInventory"'
verbose: Error reading policy, and failafe reloading is disabled.
error: Error reading CFEngine policy. Exiting...

info Rudder agent was run on a subset of policies - not all policies were checked

  1. Summary #####################################################################
    0 components verified in 1 directives
    Execution time: 0.05s ################################################################################
    ```
    I had a doubt at startup that the feeds were not open, but this is not the case:

```
root@mymachine:~# nc -vzt x.x.x.x 443
Connection to x.x.x.x 443 port [tcp/https] succeeded!
root@mymachine:~# nc -vzt x.x.x.x 5309
Connection to x.x.x.x 5309 port [tcp/*] succeeded!
```

Thank you in advance for your help, I remain available if you need more information.
There's definitely something I'm missing.

Actions #1

Updated by Nicolas CHARLES over 1 year ago

Hi Julien,

You are missing ncf on your node and there is a message about error at update
When you ran `rudder agent run` do you have an error stating that update didn't work ?
Can you ensure that the allowed network are correctly defined on the rudder server and that the node is in the allowed network?

Actions #2

Updated by Julien Briault over 1 year ago

Nicolas CHARLES wrote in #note-1:

Hi Julien,

You are missing ncf on your node and there is a message about error at update
When you ran `rudder agent run` do you have an error stating that update didn't work ?
Can you ensure that the allowed network are correctly defined on the rudder server and that the node is in the allowed network?

The network is allowed in Rudder, here is the return of the run command:

```
Rudder agent 7.3.2
Node uuid: e2381f56-e917-461d-99bc-b2f7afef999e
error: Can't stat file '/var/rudder/ncf//bin/sh: 0: cannot open /var/rudder/ncf/common/10_ncf_internals/list-compatible-inputs: No such file' for parsing. (stat: No such file or directory)
error: Policy failed validation with command '"/opt/rudder/bin/cf-promises" -c "/var/rudder/cfengine-community/inputs/promises.cf"'
error: Error reading CFEngine policy. Exiting...
error Rudder agent was interrupted during execution by a fatal error
Run with -i to see log messages.

  1. Summary #####################################################################
    0 components verified in 1 directives
    This summary is incomplete as the agent was interrupted during execution
    Execution time: 0.08s ################################################################################
    ```
Actions #3

Updated by Nicolas CHARLES over 1 year ago

Oh, and can you return the output of `rudder agent update -I`

Did you have any network issue during first agent run? It seems like this node has the policies but not the ncf lib, which is really weird

Actions #4

Updated by Julien Briault over 1 year ago

I've just figured out the problem and it's not with the agent but with the network configuration of the machines.
I've managed to fix it by adding a route in the node configuration.

In fact, the nodes in question have 2 interfaces (management and production), just like the Rudder server. What happened was that the first flow naturally went through the gateway (i.e. the management interface) and then through the production interface.

Sorry for the inconvenience. Thanks for your efficiency as always! :)

Actions #5

Updated by Vincent MEMBRÉ over 1 year ago

  • Target version changed from 7.3.3 to 7.3.4
Actions #6

Updated by Nicolas CHARLES over 1 year ago

  • Status changed from New to Rejected
Actions

Also available in: Atom PDF