cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
joshmaline
Engaged Sweeper
Running out of ideas for this one. We have VPN users who we would like to be able to deploy software to as they are rarely in the office. LS Deployments for LAN users work just fine and dandy, but when we try to deploy to a user on VPN we get the following error...

Unexpected failure while connecting to Asset. Object reference not set to an instance of an object.

I don't know exactly what that means as it seems pretty vague. I've ran through the following documents (https://www.lansweeper.com/kb/107/deployment-requirements.html). We do have a gpo managing the client firewall settings, which seems to work fine on the LAN, and now I'm working with my Firewall Admin, and I guess I just need some specifics as to how to approach this from FW admin perspective. As a test I had him open that network to any/any and I still get the above error.

-I can run the test connection to the vpn client (works)
-I can ping and dns works great (works)
-I've uninstalled AV and Disable Windows FW
-I've tried the default package share location as well as a specific package share

Any suggestions would be helpful
TIA



7 REPLIES 7
borebere
Engaged Sweeper
Hey, but you still can add VPN with bestvpnrating.com to get things done.
cnielsen
Engaged Sweeper II
I also am not able to get my scan server to scan my VPN computers. However, I ended up writing a script that checks to see if the PC has an IP given by our VPN, it then pings our lansweeper server, if successful it'll run LSPush once per day.
Esben_D
Lansweeper Employee
Lansweeper Employee
Example 1:
WMI Access is usually firewall related. I'd recommend going over this article: https://www.lansweeper.com/kb/3/WMI-Access-is-denied.html

Example 2:
I recommend checking that the scanning credentials submitted under Scanning\Scanning Credentials in the Lansweeper web console have access to C$ on the target machines, as Lansweeper uses this folder to store an executable called RemoteDeployment that will run the deployment. If access to C$ is denied, your deployments will fail. You can test this by browsing to \\hostname\c$ from the Lansweeper server to the target computer with a failed deployment using the same credentials as you are using to deploy (which is the credential used to scan the asset).
joshmaline
Engaged Sweeper
Thanks for the reply. This did resolve one of my issues.

Initially I was running the connection test from my workstation, tried it from the server and found that there was no reverse dns configured for our vpn network. Fixed that and now all is green in the connection test from the server.

We are still getting the...

Unexpected failure while connecting to Asset. Object reference not set to an instance of an object.

So I began to attempt the next suggestions of trying to run the command on the client with the exact path, and found that perhaps now it's a matter of connection speed. The error on the client command is 'XYZ.exe is not a valid Win32 application' which indicates the file is not getting downloaded completely (according to a quick Lougle search). I don't believe there is an issue with the command in the package because it works fine on LAN Networks.

The reason I suspect a connection speed issue is because I've been testing on an LTE hotspot and I don't trust the service provider in this area, 400+ ms on most pings... More testing, hopefully will give me a definitive answer. Thanks again, I'll update when I get a better connection for testing.

Update...
It's looking less like a connection speed issue as I have tested on clients with under 30ms and I am getting the same error. It's looking more like a permissions issue. When I run the connection test with the 'Share Username' I get


EXAMPLE #1
Scanning WMI..
Access is denied, please check your credentials.

Access is denied, please check your credentials.

Access is denied, please check your credentials.

Checking C$ Access
Connection Failure. Error: Access is denied

Checking Task Scheduler
Access is denied, please check your credentials.

Could not edit Registry to scan Kerberos errors

Done.




On a different pc, using the same credentials for the connection test I get...


EXAMPLE #2
Scanning WMI..
Computername: HOSTNAME
If this is not correct, please check for DNS problems

Operating system: Microsoft Windows 7 Professional Service Pack 1
\root\cimv2 Remote WMI access test OK

Operating system: Windows 7 Professional Service Pack 1
\root\default Remote WMI access test OK

Checking C$ Access
Deployment Folder: FAILURE
Access to the path '\\HOSTNAME\C$\LSDeployment' is denied.
Access Rights: FAILURE
Could not find a part of the path '\\HOSTNAME\C$\LSDeployment\test.txt'.

Checking Task Scheduler
Task was successfully scheduled
Task ran successfully

Task Deleted

Done.


These are both machines that should be using the 'Default Share Package' with the 'Default Share User'. Successful deployments run on the Example #2 above... I searched around but was unable to find setup documents on configuring permissions on the user accounts. I am thinking I am missing something on that front. Can anyone point in that direction?

TIA
joshmaline wrote:
Update...
It's looking less like a connection speed issue as I have tested on clients with under 30ms and I am getting the same error. It's looking more like a permissions issue. When I run the connection test with the 'Share Username' I get



Just some quick input here:

  • The deployment module uses scanning credentials for transmitting all deployment package data to to the computer you're deploying on.
  • Package share credentials are used exclusively for accessing the package share (read-execute) if a command contains {packageshare}
  • Your run mode credentials are used to execute the deployment package on the computer you're deploying on.


Therefore, the tests that should be performed are as follows:
  • Testconnection.exe with your scanning credentials
  • Testing of commands locally with the run mode credentials. Eg. run CMD as administrator when using the system account.
  • Check connectivity towards your package share from the local computer using your package share credentials


If you haven't yet, setting up your package to copy over any files the deployment needs locally prior to running any commands that use these files may solve bandwidth/connectivity issues. Eg. add an xcopy step to copy over the dependencies locally, modify your command step to reference the files locally and finally add a step to remove the files locally.
Esben_D
Lansweeper Employee
Lansweeper Employee


Was everything in the connection test green?
Was the connection test executed on the server running the scanning service?

Try and run the commands on the machine locally and see what that gives you.

For testing the commands:
  • Copy the Result command of the failed deployment package.
  • Use the exact path defined under Deployment\Security options.
  • Paste the command into the command prompt of a machine where the deployment failed.
  • This should help you identify the cause of the issue. Only when the command works in Command Prompt will it work in Lansweeper as well.
  • If the command worked then we recommend that you check that the command has been added correctly to your package and the parameter are also correctly added to the parameter field.
If a step works in the Command Prompt, it should work in the deployment package.