→ 🚀What's New? Join Us for the Fall Product Launch! Register Now !

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Jsabanskis
Engaged Sweeper
I have noticed, that LansweeperAgentService constantly uses to rewrite it's configuration file C:\Program Files (x86)\LansweeperAgent\LsAgent.ini. It does even no needed, i. e. no rescaning or resending of collected data server is done.

Sometimes this rewriting leads to ini file becomes empty. I don't know why, but this makes LansweeperAgentService useless, as it can't perform it's tasks anymore. Service tries to read ini file, but always ends up with an error.

Logging of operation every time ends with this:

2020-03-03 08:15:24,191 [7] DEBUG Reading ini file...
2020-03-03 08:15:24,222 [7] ERROR An unexpected exception was caused
System.NullReferenceException: Object reference not set to an instance of an object.
at Lansweeper.Echo.Client.BL.IniFileManagerCore.GetConfig()
at Lansweeper.Echo.Client.WindowsService.ServiceStart.StartCore()


This already happened to about 1% of our computers.

What should be the reason?
Is here some other option other than reinstall to repair Lansweeper Agent?
6 REPLIES 6
nkellytarsus
Engaged Sweeper
We are still seeing this on v9.1.0.8 in March 2022.

Is there a bug report we can follow?


2022-02-22 10:36:34,019 [7] DEBUG Created RelayCommunicationSender to URL https://lsagentrelay.lansweeper.com/EchoService.svc
2022-02-22 10:36:34,026 [7] DEBUG Getting asset status
2022-02-22 10:36:34,772 [7] DEBUG ServicePointManager.ServerCertificateValidationCallback
2022-02-22 10:36:35,379 [7] DEBUG Asset is enabled
2022-02-22 10:36:35,394 [7] DEBUG Retrieving configuration
2022-02-22 10:36:36,742 [7] DEBUG Updating local config
2022-02-22 10:36:36,763 [7] DEBUG Checking version. Latest Version: 9.1.0.8. Current Version: 9.1.0.8
2022-02-22 10:36:36,769 [7] DEBUG Waiting for schedule...
2022-02-22 10:36:36,776 [7] DEBUG Schedule triggered
2022-02-22 10:36:36,782 [7] DEBUG Starting scan
2022-02-22 10:36:36,788 [7] DEBUG Detected OS: Windows
2022-02-22 10:36:36,926 [7] DEBUG OS version found in ReleaseId: 2009.
2022-02-22 10:36:36,938 [7] DEBUG OS version 2009 needs to be updated with the value from DisplayVersion as ReleaseId is deprecated.
2022-02-22 10:36:36,945 [7] DEBUG OS version found in DisplayVersion: 20H2.
2022-02-22 10:36:36,951 [7] DEBUG OS build number found in UBR: 1348.
2022-02-22 10:37:05,512 [7] DEBUG User found in eventlog login data.
2022-02-22 10:37:05,527 [7] DEBUG Matching user found in registry for ssid: S-1-5-21-2025429265-764733703-725345543-9087. Using registry value. Userdomain: XX, Username:XXX
2022-02-22 10:37:05,543 [7] DEBUG Scanning computer...
2022-02-22 10:37:12,937 [7] DEBUG Computer scan completed
2022-02-22 10:37:12,949 [7] DEBUG Serializing ScanResult
2022-02-22 10:37:12,998 [7] DEBUG Compressing scan file
2022-02-22 10:37:13,023 [7] DEBUG Sending scan
2022-02-22 10:37:14,393 [7] DEBUG Scan has been sent
2022-02-22 10:37:14,405 [7] DEBUG Saving ini settings
2022-02-22 10:37:14,413 [7] DEBUG Creating ini backup.
2022-02-22 10:37:14,424 [7] DEBUG Waiting 60 minutes until next iteration
2022-02-22 13:58:23,807 [7] DEBUG Detected OS: Windows
2022-02-22 13:58:23,846 [7] DEBUG Reading ini file.
2022-02-22 13:58:23,856 [7] DEBUG Loading LS Agent Configuration File.
2022-02-22 13:58:23,874 [7] DEBUG Getting asset id
2022-02-22 13:58:23,881 [7] DEBUG Existing asset id found: 9346ee0f-4d16-4a2b-9188-bd41e384e6a6
2022-02-22 13:58:23,888 [7] DEBUG Creating communication channel
2022-02-22 13:58:23,895 [7] INFO CreateReachableEndPoint for 9346ee0f-4d16-4a2b-9188-bd41e384e6a6
2022-02-22 13:58:23,994 [7] INFO Url Check with address failed. Endpoint with address 'https://adminserver.uk:9524/lsagent' was not reachable: The remote name could not be resolved: 'adminserver.uk'
2022-02-22 13:58:24,007 [7] WARN Connection to url https://adminserver.uk:9524/lsagent failed
2022-02-22 13:58:44,041 [7] INFO Url Check with address failed. Endpoint with address 'https://193.X.X.X:9524/lsagent' was not reachable: The operation has timed out
2022-02-22 13:58:44,057 [7] WARN Connection to url https://193.X.X.X:9524/lsagent failed
2022-02-22 13:58:44,074 [7] INFO Url Check with address failed. Endpoint with address 'http://adminserver.uk:9524/lsagent' was not reachable: The remote name could not be resolved: 'adminserver.uk'
2022-02-22 13:58:44,082 [7] WARN Connection to url http://adminserver.uk:9524/lsagent failed
2022-02-22 13:59:04,110 [7] INFO Url Check with address failed. Endpoint with address 'http://193.X.X.X:9524/lsagent' was not reachable: The operation has timed out
2022-02-22 13:59:04,125 [7] WARN Connection to url http://193.X.X.X:9524/lsagent failed
2022-02-22 13:59:04,132 [7] DEBUG Created RelayCommunicationSender to URL https://lsagentrelay.lansweeper.com/EchoService.svc
2022-02-22 13:59:04,139 [7] DEBUG Getting asset status
2022-02-22 13:59:04,779 [7] DEBUG ServicePointManager.ServerCertificateValidationCallback
2022-02-22 13:59:05,801 [7] DEBUG Asset is enabled
2022-02-22 13:59:05,816 [7] DEBUG Retrieving configuration
2022-02-22 13:59:28,742 [7] DEBUG Updating local config
2022-02-22 13:59:28,766 [7] DEBUG Checking version. Latest Version: 9.1.0.8. Current Version: 9.1.0.8
2022-02-22 13:59:28,775 [7] DEBUG Waiting for schedule...
2022-02-22 13:59:28,782 [7] DEBUG Saving ini settings
2022-02-22 13:59:28,790 [7] DEBUG Creating ini backup.
2022-02-22 13:59:28,800 [7] DEBUG Waiting 60 minutes until next iteration
2022-02-22 22:35:47,164 [1] INFO Starting Lansweeper Agent Service
2022-02-22 22:35:47,213 [6] INFO === Service started ===
2022-02-22 22:35:47,508 [7] DEBUG Client Version: 9.1.0.8
2022-02-22 22:35:47,508 [7] DEBUG Cleaning up older versions...
2022-02-22 22:35:47,510 [7] DEBUG Checking OS
2022-02-22 22:35:47,510 [7] DEBUG 64bit detected: checking registry (64bit)
2022-02-22 22:35:47,535 [7] DEBUG Detected OS: Windows
2022-02-22 22:35:47,557 [7] DEBUG Reading ini file.
2022-02-22 22:35:47,567 [7] DEBUG Something went wrong while reading ini file: Object reference not set to an instance of an object.
2022-02-22 22:35:47,567 [7] DEBUG Restoring ini backup.
2022-02-22 22:35:47,568 [7] DEBUG Reading ini file.
2022-02-22 22:35:47,570 [7] ERROR An unexpected exception occurred
System.NullReferenceException: Object reference not set to an instance of an object.
at Lansweeper.Echo.Client.BL.IniFileManagerCore.ReadConfig(ININode iniNode)
at Lansweeper.Echo.Client.BL.IniFileManagerCore.GetConfig()
at Lansweeper.Echo.Client.BL.EchoClient.RunLsAgentProcess()
2022-02-22 22:35:47,600 [7] DEBUG Waiting 60 minutes until next iteration
2022-02-24 07:32:23,718 [7] DEBUG Detected OS: Windows
2022-02-24 07:32:23,731 [7] DEBUG Reading ini file.
2022-02-24 07:32:23,738 [7] DEBUG Something went wrong while reading ini file: Object reference not set to an instance of an object.
2022-02-24 07:32:23,744 [7] DEBUG Restoring ini backup.
2022-02-24 07:32:23,751 [7] DEBUG Reading ini file.
2022-02-24 07:32:23,756 [7] ERROR An unexpected exception occurred
System.NullReferenceException: Object reference not set to an instance of an object.
at Lansweeper.Echo.Client.BL.IniFileManagerCore.ReadConfig(ININode iniNode)
at Lansweeper.Echo.Client.BL.IniFileManagerCore.GetConfig()
at Lansweeper.Echo.Client.BL.EchoClient.RunLsAgentProcess()
2022-02-24 07:32:23,761 [7] DEBUG Waiting 60 minutes until next iteration
laurin1
Engaged Sweeper III
We are on 7.2.110.18 and it still happens. Is there a version newer than that?
tomscott2340
Engaged Sweeper III
We have seen this same issue.. We are currently running 7.2.110.5.. Anyone know if this has been fixed in later version(s)?
Caleb
Engaged Sweeper III
We noticed this behavior once the affected Lsagents don't upgrade to the latest release after Lansweeper is upgraded. The LsAgent.ini becomes corrupted as a binary file and causes the LsAgent service to give errors.

There is no easy method to reinstall or upgrade to a newer version without first uninstalling (or removing) the corrupted LsAgent install.
laurin1
Engaged Sweeper III
I'm having this problem as well, with just one machine that is at a remote site. However, the INI is not empty, the INI is now a binary file. If I try to reinstall, I get an error about no such AgentKey. I have to delete the program files (probably just the INI file, but I delete them all), then reinstall.
ErikT
Lansweeper Tech Support
Lansweeper Tech Support
Hi Jaunius S.
A case is currently open for our developers as there have been a few other similar reports. Until the root cause is found, unfortunately, reinstalling the agent would be the only solution.