Imported Client discovery list via script is not being discovered

OS - Centos7
UrBackup Server - 2.4.13

Clients - windows 10
UrBackup client - 2.4.10

The server and clients are on different subnets. I found a script on a forum which adds computers to discovery list and it works as expected, discovery list is filled with all computers I exported from AD. The problem is that these computers are not being discovered as clients. I tried removing them from a list and added one computer manually and then it worked.

The script:

import urbackup_api

server = urbackup_api.urbackup_server("http://127.0.0.1:55414/x", "adminusername", "adminpassword")

for extra_client in server.get_extra_clients():
    server.remove_extra_client(extra_client["id"])

with open("/scripts/ComputersList.txt", "r") as f:
    for line in f:
        server.add_extra_client(line)

Enabled debug mode on server and here is the log:

2020-09-10 10:34:14: WARNING: Shutting down (Signal 15)
2020-09-10 11:17:01: WARNING: Shutting down (Signal 15)
2020-09-10 16:49:47: WARNING: Shutting down (Signal 15)
2020-09-11 10:18:24: WARNING: Shutting down (Signal 15)
2020-09-11 10:20:09: WARNING: Shutting down (Signal 15)
2020-09-11 10:20:09: Starting HTTP-Server on port 55414
2020-09-11 10:20:09: HTTP: Server started up successfully!
2020-09-11 10:20:09: SQLite: recovered 45 frames from WAL file /var/urbackup/backup_server.db-wal code: 283
2020-09-11 10:20:10: SQLite: recovered 105860 frames from WAL file /var/urbackup/backup_server_files.db-wal code: 283
2020-09-11 10:20:10: SQLite: recovered 10 frames from WAL file /var/urbackup/backup_server_link_journal.db-wal code: 283
2020-09-11 10:20:10: SQLite: recovered 1202 frames from WAL file /var/urbackup/backup_server_settings.db-wal code: 283
2020-09-11 10:20:10: SQLite: recovered 45 frames from WAL file /var/urbackup/backup_server.db-wal code: 283
2020-09-11 10:20:10: SQLite: recovered 1202 frames from WAL file /var/urbackup/backup_server_settings.db-wal code: 283
2020-09-11 10:20:10: SQLite: recovered 105860 frames from WAL file /var/urbackup/backup_server_files.db-wal code: 283
2020-09-11 10:20:10: SQLite: recovered 10 frames from WAL file /var/urbackup/backup_server_link_journal.db-wal code: 283
2020-09-11 10:20:10: Started UrBackup...
2020-09-11 10:20:10: Removing temporary files...
2020-09-11 10:20:10: Recreating temporary folder...
2020-09-11 10:20:10: Image mounting disabled: Backupfolder not set
2020-09-11 10:20:10: Testing if backup destination can handle subvolumes and snapshots...
2020-09-11 10:20:10: Backup destination cannot handle subvolumes and snapshots. Snapshots disabled.
2020-09-11 10:20:10: Testing if backup destination can handle filesystem transactions...
2020-09-11 10:20:10: Testing for hardlinks in backup destination...
2020-09-11 10:20:10: Could create hardlink at backup destination. Hardlinks enabled.
2020-09-11 10:20:10: Testing for reflinks in backup destination...
2020-09-11 10:20:10: Could create reflink at backup destination. Reflinks enabled.
2020-09-11 10:20:10: Binding to interface eno16780032 (ipv4) for broadcasting...
2020-09-11 10:20:10: Broadcasting on ipv4 interface eno16780032 addr 10.0.xx.xx
2020-09-11 10:20:10: Binding to interface eno16780032 (ipv6) for broadcasting...
2020-09-11 10:20:10: Broadcasting on ipv6 interface eno16780032 addr fe80::250:56ff:fe89:200b
2020-09-11 10:20:11: UrBackup Server start up complete.
2020-09-11 10:20:11: Server started up successfully!
2020-09-11 10:20:11: Looking for old Sessions... 0 sessions
2020-09-11 10:20:12: Downloading version file...
2020-09-11 10:20:12: Downloading version file...
2020-09-11 10:20:12: Downloading server version info...
2020-09-11 10:20:12: Downloading dataplan database...
2020-09-11 10:20:42: New Backupclient: KamerosVaist
2020-09-11 10:20:42: New Backupclient: Temperatura-PC
2020-09-11 10:20:42: Sending Identity to client "Kame*******" failed. Retrying soon...
2020-09-11 10:20:42: Sending Identity to client "Kame*******" failed. Retrying in 10m... (returned "failed")
2020-09-11 10:20:42: Sending Identity to client "Temp*******" failed. Retrying soon...
2020-09-11 10:20:42: Sending Identity to client "Temp*******" failed. Retrying in 10m... (returned "failed")
2020-09-11 10:21:56: HTTP: No available slots... starting new Worker
2020-09-11 10:40:42: Sending Identity to client "Kame*******" failed. Retrying soon...
2020-09-11 10:40:42: Sending Identity to client "Kame*******" failed. Retrying in 10m... (returned "failed")
2020-09-11 10:40:42: Sending Identity to client "Temp*******" failed. Retrying soon...
2020-09-11 10:40:42: Sending Identity to client "Temp*******" failed. Retrying in 10m... (returned "failed")
2020-09-11 10:50:12: Looking for old Sessions... 2 sessions
2020-09-11 10:50:42: Sending Identity to client "Kame*******" failed. Retrying soon...
2020-09-11 10:50:42: Sending Identity to client "Kame*******" failed. Retrying in 10m... (returned "failed")
2020-09-11 10:50:42: Sending Identity to client "Temp*******" failed. Retrying soon...
2020-09-11 10:50:42: Sending Identity to client "Temp*******" failed. Retrying in 10m... (returned "failed")
2020-09-11 11:00:42: Sending Identity to client "Kame*******" failed. Retrying soon...
2020-09-11 11:00:42: Sending Identity to client "Kame*******" failed. Retrying in 10m... (returned "failed")
2020-09-11 11:00:42: Sending Identity to client "Temp*******" failed. Retrying soon...
2020-09-11 11:00:42: Sending Identity to client "Temp*******" failed. Retrying in 10m... (returned "failed")
2020-09-11 11:10:42: Sending Identity to client "Kame*******" failed. Retrying soon...
2020-09-11 11:10:42: Sending Identity to client "Temp*******" failed. Retrying soon...
2020-09-11 11:10:42: Sending Identity to client "Temp*******" failed. Retrying in 10m... (returned "failed")
2020-09-11 11:10:42: Sending Identity to client "Kame*******" failed. Retrying in 10m... (returned "failed")
2020-09-11 11:13:37: Looking for old Sessions... 3 sessions
2020-09-11 11:13:37: Session timeout: Session sPH4dhnsyM8PVIM6s53BtB82gDUNpW
2020-09-11 11:14:37: New Backupclient: Ad*******
2020-09-11 11:14:37: Getting client settings...
2020-09-11 11:14:37: Channel message: UPDATE ACCESS KEY
2020-09-11 11:14:37: Sending backup incr interval...
2020-09-11 11:14:38: msg=UPDATE ACCESS KEY
2020-09-11 11:14:38: Reflink copying is enabled
2020-09-11 11:14:38: Reflink copying is enabled
2020-09-11 11:14:38: Starting scheduled full file backup...
2020-09-11 11:14:38: Ad*******: Connecting for filelist...
2020-09-11 11:14:38: Ad*******: Waiting for filelist
2020-09-11 11:14:38: Ad*******: Connecting for filelist (async)...
2020-09-11 11:15:37: Settings changed. Capabilities may have changed. Reconnecting channel...
2020-09-11 11:17:19: Selected no components to backup
2020-09-11 11:17:19: Indexing of "Users" done. 16579 filesystem lookups 0 db lookups and 0 db updates
2020-09-11 11:17:19: Ad*******: Doing backup with hashed transfer...
2020-09-11 11:17:19: Ad*******: Loading file list...
2020-09-11 11:17:19: Flushing FileClient...
2020-09-11 11:17:19: Flushing FileClient...
2020-09-11 11:17:19: Flushing FileClient...
2020-09-11 11:17:19: Reflink copying is enabled

The list of auto discovery client was presented all day, there are two pcs which had urbackup connected on another server so please ignore these warnings about “Kame*******” and “Temp*******”.
I have removed all of computers from list and added “Ad*******” manually at 11:13 and as you can see at 11:14:37 it was discovered. The same computer was on discovery list all day but somehow it was not being discovered.

Do you have any ideas why it’s not being discovered?

I guess the computers are shown on the status page? Any extra whitespace characters in them? (Use line.strip() ?)

Adding line.strip() fixed everything
Thank you very much :slight_smile: