Symantec agent error


#1

Greetings professionals,

i am trying to install symantec agent on my windows node through linux workstation. i also has the setup.exe file copied to the location directory cookbook/symantic-agent/files/symantec.exe.

this is the recipe i am using under file default.rb
##########################
windows_package ‘Symantec’ do
action :install
source '/opt/chef-ws/cookbooks/Symantec-agent/files/default/Symantec’
end
#################################

Attributes=> default.rb
default[‘symantec’][‘install_source’] = ‘/opt/chef-ws/cookbooks/symantec-agent/files/default/symantec.exe’
#################
Metadata.rb => depends on ‘windows’
#################################

When i am trying to bootstrap this recipe to my windows node i get the below error

# Declared in c:/chef/cache/cookbooks/symantec-agent/recipes/default.rb:10:in `from_file’
10.0.108.104
10.0.108.104 windows_package(“symantec”) do
10.0.108.104 provider Chef::Provider::package::Windows
10.0.108.104 action [:install]
10.0.108.104 retries 0
10.0.108.104 retry_delay 2
10.0.108.104 default_guard_interpreter :default
10.0.108.104 declared_type :windows_package
10.0.108.104 cookbook_name "symantec-agent"
10.0.108.104 recipe_name "default"
10.0.108.104 source "/opt/chef-ws/cookbooks/symantec-agent/files/default/symantec.exe"
10.0.108.104 options "-ms"
10.0.108.104 installer_type :custom
10.0.108.104 package_name "symantec"
10.0.108.104 success_codes [0, 42, 127]
10.0.108.104 end
10.0.108.104
10.0.108.104 Platform:
10.0.108.104 ---------
10.0.108.104 x64-mingw32
10.0.108.104
10.0.108.104
10.0.108.104 [2017-03-02T19:20:20+00:00] INFO: Running queued delayed notifications before re-raising exception
10.0.108.104 [2017-03-02T19:20:20+00:00] ERROR: Running exception handlers
10.0.108.104 [2017-03-02T19:20:20+00:00] ERROR: Exception handlers complete
10.0.108.104 [2017-03-02T19:20:20+00:00] FATAL: Stacktrace dumped to c:/chef/cache/chef-stacktrace.out
10.0.108.104 [2017-03-02T19:20:20+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
10.0.108.104 [2017-03-02T19:20:20+00:00] FATAL: Mixlib::ShellOut::CommandTimeout: windows_package[symantec] (symantec-agent::default line 10) had an error: Mixlib::ShellOut::CommandTimeout: command timed out:
10.0.108.104 ---- Begin output of start “” /wait “” -ms & exit %%%%ERRORLEVEL%%%% ----
10.0.108.104 STDOUT:
10.0.108.104 STDERR:
10.0.108.104 ---- End output of start “” /wait “” -ms & exit %%%%ERRORLEVEL%%%% ----
10.0.108.104
10.0.108.104 ProcessId: 3536
10.0.108.104 app_name: C:\Windows\system32\cmd.exe
10.0.108.104 command_line: cmd /c "start “” /wait “” -ms & exit %%%%ERRORLEVEL%%%%"
10.0.108.104 timeout: 600
ERROR: Failed to execute command on 10.0.108.104 return code 1

Can any one help me in figuring out what exactly the problem is?

Thanks
Prash


#2

We use a customized version of:

windows_package ‘Symantec Endpoint Protection’ do
source "http://#{chef_file_server}/repo/sep/chef_sep_12.1.7004.6500_x64.exe"
installer_type :custom
options '/s’
action :install
end

which works for us. We host install files on a web server.


#3

is there any possibility to deploy the install files with out webserver or http links / by giving the absolute path where the install file is place from the workstation itself?

Thanks
Prash


#4

and i am using linux machine as workstation and i want this agent to get installed in windows node will that be possible.?

please guide me

thanks
Prash


#5

cookbook_file resource? or share the directory the install files are in on the Linux workstation and use the remote_file resource to download the files before installing them with windows_package.


#6

yes cookbook file source…!

im sorry to say but i did not follow and i guess we are pretty close to solve this let me explain you sir

i have copied install file to path /cookbooks/symantec-agent/files/default-setup.exe ### i don’t have web server to host the install files on web through HTTP###

Now can i deploy the cookbook file source by writing the recipe as you shown above my removing the source url and replace it to cookbook path as shown below will this work?

windows_package ‘Symantec Endpoint Protection’ do
source " /cookbooks/symantec-agent/files/default-setup.exe /
installer_type :custom
options '/s’
action :install
end

Thanks
Prash


#7

I understand you put the installer on your local Linux workstation. You can’t use the windows_package resource to grab that file from that location as is like you’re trying to do. The way I see it, you have 3 options:

1 - Share the folder it’s in, and use the remote_file resource first to copy the installer to the Windows node, THEN use the windows_package resource to install it:

remote_file ‘C:/chef/cache/default-setup.exe’ do
source '///share/default-setup.exe’
action :create
end

windows_package ‘Symantec Endpoint Protection’ do
source 'C:/chef/cache/default-setup.exe’
installer_type :custom
options '/qn’
action :install
end

2 - Put the installer on a web server, then you can call it directly via the windows_package resource:

windows_package ‘Symantec Endpoint Protection’ do
source 'http:///default-setup.exe’
installer_type :custom
options '/s’
action :install
end

3 - Use the cookbook_file resource which will put the installer.exe on the Chef server. Then use windows_package to install:

cookbook_file ‘C:/chef/cache/default-setup.exe’ do
source 'default-setup.exe’
action :create
end

windows_package ‘Symantec Endpoint Protection’ do
source 'C:/chef/cache/default-setup.exe’
installer_type :custom
options '/qn’
action :install
end


#8

i tried doing the third way but still i am getting this error

================================================================================
10.0.108.104 Error executing action install on resource 'windows_package[Symantec Endpoint Protection]'
10.0.108.104 ================================================================================
10.0.108.104
10.0.108.104 Mixlib::ShellOut::CommandTimeout
10.0.108.104 --------------------------------
10.0.108.104 command timed out:
10.0.108.104 ---- Begin output of start “” /wait “” /s & exit %%%%ERRORLEVEL%%%% ----
10.0.108.104 STDOUT:
10.0.108.104 STDERR:
10.0.108.104 ---- End output of start “” /wait “” /s & exit %%%%ERRORLEVEL%%%% ----
10.0.108.104
10.0.108.104 ProcessId: 5064
10.0.108.104 app_name: C:\Windows\system32\cmd.exe
10.0.108.104 command_line: cmd /c "start “” /wait “” /s & exit %%%%ERRORLEVEL%%%%"
10.0.108.104 timeout: 600
10.0.108.104
10.0.108.104 Resource Declaration:
10.0.108.104 ---------------------
10.0.108.104 # In c:/chef/cache/cookbooks/symantec14/recipes/default.rb
10.0.108.104
10.0.108.104 20: windows_package ‘Symantec Endpoint Protection’ do
10.0.108.104 21: source 'C:\chef\cache\package-setup.exe’
10.0.108.104 22: installer_type :custom
10.0.108.104 23: options '/s’
10.0.108.104 24: action :install
10.0.108.104 25: end
10.0.108.104 26:
10.0.108.104
10.0.108.104 Compiled Resource:
10.0.108.104 ------------------
10.0.108.104 # Declared in c:/chef/cache/cookbooks/symantec14/recipes/default.rb:20:in `from_file’
10.0.108.104
10.0.108.104 windows_package(“Symantec Endpoint Protection”) do
10.0.108.104 package_name "Symantec Endpoint Protection"
10.0.108.104 action [:install]
10.0.108.104 retries 0
10.0.108.104 retry_delay 2
10.0.108.104 default_guard_interpreter :default
10.0.108.104 declared_type :windows_package
10.0.108.104 cookbook_name "symantec14"
10.0.108.104 recipe_name "default"
10.0.108.104 source "c:\chef\cache\package-setup.exe"
10.0.108.104 installer_type :custom
10.0.108.104 options "/s"
10.0.108.104 returns [0]
10.0.108.104 end
10.0.108.104
10.0.108.104 Platform:
10.0.108.104 ---------
10.0.108.104 x64-mingw32
10.0.108.104
10.0.108.104
10.0.108.104 [2017-03-03T20:02:40+00:00] INFO: Running queued delayed notifications before re-raising exception
10.0.108.104 [2017-03-03T20:02:40+00:00] ERROR: Running exception handlers
10.0.108.104 [2017-03-03T20:02:40+00:00] ERROR: Exception handlers complete
10.0.108.104 [2017-03-03T20:02:40+00:00] FATAL: Stacktrace dumped to c:/chef/cache/chef-stacktrace.out
10.0.108.104 [2017-03-03T20:02:40+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
10.0.108.104 [2017-03-03T20:02:40+00:00] FATAL: Mixlib::ShellOut::CommandTimeout: windows_package[Symantec Endpoint Protection] (symantec14::default line 20) had an error: Mixlib::ShellOut::CommandTimeout: command timed out:
10.0.108.104 ---- Begin output of start “” /wait “” /s & exit %%%%ERRORLEVEL%%%% ----
10.0.108.104 STDOUT:
10.0.108.104 STDERR:
10.0.108.104 ---- End output of start “” /wait “” /s & exit %%%%ERRORLEVEL%%%% ----
10.0.108.104
10.0.108.104 ProcessId: 5064
10.0.108.104 app_name: C:\Windows\system32\cmd.exe
10.0.108.104 command_line: cmd /c "start “” /wait “” /s & exit %%%%ERRORLEVEL%%%%"
10.0.108.104 timeout: 600


#9

I’m having a similar issue however my options are a bit different.

options "/s /v /qn RUNLIVEUPDATE=0 SYMREBOOT=REALLYSUPPRESS"

I believe the “=” are screwing up my recipe, I tried “=” and it didn’t work any one know how to escape this?