Search code examples
rundeck

Nodes not displaying, console shows xml parsing error


I'm having troubles viewing my nodes in a fresh rundeck install. resources.xml

<?xml version="1.0" encoding="UTF-8"?>
<project>
    <node name="fooweb01"
          description="fooweb01" tags="foo,us-east,webserver"
          osFamily="unix" osName="Linux"
          hostname="fooweb01"  username="user"
    />
    <node name="fooweb02"
          description="fooweb02" tags="foo,us-east,webserver"
          osFamily="unix" osName="Linux"
          hostname="fooweb02"  username="user"
    />
    <node name="fooweb03"
          description="fooweb03" tags="foo,us-east,webserver"
          osFamily="unix" osName="Linux"
          hostname="fooweb03"  username="user"
    />
    <node name="fooweb04"
          description="fooweb04" tags="foo,us-east,webserver"
          osFamily="unix" osName="Linux"
          hostname="fooweb04"  username="user"
    />
    <node name="foocorp01"
          description="foocorp01" tags="foo,us-east,corporate"
          osFamily="unix" osName="Linux"
          hostname="foocorp01"  username="user"
    />
    <node name="foocorp02"
          description="foocorp02" tags="foo,us-east,corporate"
          osFamily="unix" osName="Linux"
          hostname="foocorp02"  username="user"
    />
    <node name="foopartner01"
          description="foopartner01" tags="foo,us-east,partner-api"
          osFamily="unix" osName="Linux"
          hostname="foopartner01"  username="user"
    />
    <node name="foodb01"
          description="foodb01" tags="foo,us-east,cluster-node"
          osFamily="unix" osName="Linux"
          hostname="foodb01"  username="user"
    />
    <node name="foodb02"
          description="foodb02" tags="foo,us-east,cluster-node"
          osFamily="unix" osName="Linux"
          hostname="foodb02"  username="user"
    />
    <node name="foodb03"
          description="foodb03" tags="foo,us-east,cluster-node"
          osFamily="unix" osName="Linux"
          hostname="foodb03"  username="user"
    />
    <node name="foolb01"
          description="foolb03" tags="foo,us-east,haproxy"
          osFamily="unix" osName="Linux"
          hostname="foolb03"  username="user"
    />
    <node name="foolb02"
          description="foolb03" tags="foo,us-east,haproxy"
          osFamily="unix" osName="Linux"
          hostname="foolb03"  username="user"
    />
    <node name="foojobs01"
          description="foojobs03" tags="foo,us-east,docker-services"
          osFamily="unix" osName="Linux"
          hostname="foojobs03"  username="user"
    />
    <node name="foomonitor"
          description="Ops Host" tags="foo,us-east,monitor"
          osFamily="unix" osName="Linux"
          hostname="foomonitor"  username="user"
    />
</project>

project.properties in the same folder

project.resources.file=/var/lib/rundeck/projects/cron_jobs/etc/resources.xml
resources.source.1.type=file
resources.source.1.config.file=/var/lib/rundeck/projects/cron_jobs/etc/resources.xml
resources.source.1.config.format=resourcexml
resources.source.1.config.requireFileExists=true
resources.source.1.config.includeServerNode=true
resources.source.1.config.generateFileAutomatically=true

project.resources.file=/var/lib/rundeck/projects/cron_jobs/etc/resources.xml was a recent test that didn't help. When i load project/cron_jobs/nodes in the browser console i see

XML Parsing Error: syntax error
Location: https://example.org/project/cron_jobs/nodes
Line Number 1: Column 1:

There are no errors in the logs, i have reimported the project each time i make a change to the file, which has not been frequent.

This is driving me crazy, looking for another pair of eyes. All other pages work fine.


Solution

  • Rundeck enumerates their model sources (for example: 1=your resources.xml file, 2=ansible inventory, 3=ec2 nodes, etc.) in your case, the first one is the resources.xml file.

    Just delete the project.resources.file=/var/lib/rundeck/projects/cron_jobs/etc/resources.xml line and save.

    I created a new project (on Rundeck 3.3.10), deleted the first model source (local), added your resources.xml file (which works like a charm) as first model source and the project.properties looks in the following way:

    #Fri Mar 26 08:53:10 CLST 2021
    #edit below
    project.disable.executions=false
    project.disable.schedule=false
    project.execution.history.cleanup.batch=500
    project.execution.history.cleanup.enabled=false
    project.execution.history.cleanup.retention.days=60
    project.execution.history.cleanup.retention.minimum=50
    project.execution.history.cleanup.schedule=0 0 0 1/1 * ? *
    project.jobs.gui.groupExpandLevel=1
    project.name=ProjectEXAMPLE
    project.nodeCache.enabled=true
    project.nodeCache.firstLoadSynch=true
    project.output.allowUnsanitized=false
    project.ssh-authentication=privateKey
    project.ssh-command-timeout=0
    project.ssh-connect-timeout=0
    project.ssh-keypath=/home/user/.ssh/id_rsa
    resources.source.1.config.file=/path/to/your/resources.xml
    resources.source.1.config.format=resourcexml
    resources.source.1.config.generateFileAutomatically=true
    resources.source.1.config.writeable=true
    resources.source.1.type=file
    service.FileCopier.default.provider=jsch-scp
    service.NodeExecutor.default.provider=jsch-ssh
    

    And the nodes on "Nodes" page.