Azure / Azure/azure-quickstart-templates

Splunk on Ubuntu template is failing

Open
#7,126 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Bicep
Stars
14.9k
Forks
16.2k
Avg merge
6d 21h
Merged PRs (30d)
6

Description

splunk-on-ubuntu https://github.com/Azure/azure-quickstart-templates/tree/master/splunk-on-ubuntu/

### Issue Details

Azure ARM Template is failing to deploy. I tried the standalone option. It gives me a 'Conflict' error. Here is the output

{
"status": "Failed",
"error": {
"code": "ResourceDeploymentFailure",
"message": "The resource operation completed with terminal provisioning state 'Failed'.",
"details": [
{
"code": "DeploymentFailed",
"message": "At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.",
"details": [
{
"code": "Conflict",
"message": "{\r\n \"status\": \"Failed\",\r\n \"error\": {\r\n \"code\": \"ResourceDeploymentFailure\",\r\n \"message\": \"The resource operation completed with terminal provisioning state 'Failed'.\",\r\n \"details\": [\r\n {\r\n \"code\": \"VMExtensionProvisioningError\",\r\n \"message\": \"VM has reported a failure when processing extension 'node-setup'. Error message: \\\"Enable failed: failed to execute command: command terminated with exit status=1\\n[stdout]\\n\\u001b[0m \\n\\u001b[0m execute(\\\"update-splunk-mgmt-port\\\") do\\n\\u001b[0m action [:run]\\n\\u001b[0m default_guard_interpreter :execute\\n\\u001b[0m command \\\"/opt/splunk/bin/splunk set splunkd-port 8089 -auth 'admin:P@ssw0rd123$'\\\"\\n\\u001b[0m backup 5\\n\\u001b[0m environment {\\\"HOME\\\"=>\\\"/opt/splunk\\\", \\\"USER\\\"=>\\\"splunk\\\"}\\n\\u001b[0m group \\\"splunk\\\"\\n\\u001b[0m returns 0\\n\\u001b[0m user \\\"splunk\\\"\\n\\u001b[0m declared_type :execute\\n\\u001b[0m cookbook_name \\\"chef-splunk\\\"\\n\\u001b[0m recipe_name \\\"server\\\"\\n\\u001b[0m domain nil\\n\\u001b[0m not_if \\\"/opt/splunk/bin/splunk show splunkd-port -auth 'admin:P@ssw0rd123$' | grep ': 8089'\\\"\\n\\u001b[0m end\\n\\u001b[0m \\n\\u001b[0m System Info:\\u001b[0m\\n ------------\\u001b[0m\\n chef_version=13.0.118\\n\\u001b[0m platform=ubuntu\\n\\u001b[0m platform_version=14.04\\n\\u001b[0m ruby=ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-linux]\\n\\u001b[0m program_name=chef-client worker: ppid=2716;start=16:27:09;\\n\\u001b[0m executable=/opt/chef/bin/chef-client\\u001b[0m\\n \\n\\u001b[0m[2020-01-21T16:28:01+00:00] INFO: Running queued delayed notifications before re-raising exception\\n[2020-01-21T16:28:01+00:00] INFO: execute[update-datastore-dir] sending restart action to service[splunk] (delayed)\\nRecipe: chef-splunk::service\\u001b[0m\\n * service[splunk] action restart[2020-01-21T16:28:01+00:00] INFO: Processing service[splunk] action restart (chef-splunk::service line 104)\\n\\n \\u001b[0m\\n ================================================================================\\u001b[0m\\n \\u001b[31mError executing action `restart` on resource 'service[splunk]'\\u001b[0m\\n ================================================================================\\u001b[0m\\n \\n\\u001b[0m Mixlib::ShellOut::ShellCommandFailed\\u001b[0m\\n ------------------------------------\\u001b[0m\\n Expected process to exit with [0], but received '8'\\n\\u001b[0m ---- Begin output of /etc/init.d/splunk restart ----\\n\\u001b[0m STDOUT: Restarting Splunk...\\n\\u001b[0m ERROR: Couldn't determine $SPLUNK_HOME or $SPLUNK_ETC; perhaps one should be set in environment\\n\\u001b[0m STDERR: \\n\\u001b[0m ---- End output of /etc/init.d/splunk restart ----\\n\\u001b[0m Ran /etc/init.d/splunk restart returned 8\\u001b[0m\\n \\n\\u001b[0m Resource Declaration:\\u001b[0m\\n ---------------------\\u001b[0m\\n # In /etc/chef/local-mode-cache/cache/cookbooks/chef-splunk/recipes/service.rb\\n\\u001b[0m \\n\\u001b[0m 104: service 'splunk' do\\n\\u001b[0m 105: supports status: true, restart: true\\n\\u001b[0m 106: provider Chef::Provider::Service::Init\\n\\u001b[0m 107: action :start\\n\\u001b[0m 108: end\\n\\u001b[0m 109: end\\n\\u001b[0m \\n\\u001b[0m Compiled Resource:\\u001b[0m\\n ------------------\\u001b[0m\\n # Declared in /etc/chef/local-mode-cache/cache/cookbooks/chef-splunk/recipes/service.rb:104:in `from_file'\\n\\u001b[0m \\n\\u001b[0m service(\\\"splunk\\\") do\\n\\u001b[0m provider Chef::Provider::Service::Init\\n\\u001b[0m action [:start]\\n\\u001b[0m updated true\\n\\u001b[0m default_guard_interpreter :default\\n\\u001b[0m service_name \\\"splunk\\\"\\n\\u001b[0m enabled nil\\n\\u001b[0m running false\\n\\u001b[0m masked nil\\n\\u001b[0m pattern \\\"splunk\\\"\\n\\u001b[0m declared_type :service\\n\\u001b[0m cookbook_name \\\"chef-splunk\\\"\\n\\u001b[0m recipe_name \\\"service\\\"\\n\\u001b[0m supports {:status=>true, :restart=>true}\\n\\u001b[0m end\\n\\u001b[0m \\n\\u001b[0m System Info:\\u001b[0m\\n ------------\\u001b[0m\\n chef_version=13.0.118\\n\\u001b[0m platform=ubuntu\\n\\u001b[0m platform_version=14.04\\n\\u001b[0m ruby=ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-linux]\\n\\u001b[0m program_name=chef-client worker: ppid=2716;start=16:27:09;\\n\\u001b[0m executable=/opt/chef/bin/chef-client\\u001b[0m\\n \\n\\u001b[0m\\u001b[0m\\nRunning handlers:\\u001b[0m\\n[2020-01-21T16:28:01+00:00] ERROR: Running exception handlers\\nRunning handlers complete\\n\\u001b[0m[2020-01-21T16:28:01+00:00] ERROR: Exception handlers complete\\nChef Client failed. 14 resources updated in 52 seconds\\u001b[0m\\n[2020-01-21T16:28:01+00:00] FATAL: Stacktrace dumped to /etc/chef/local-mode-cache/cache/chef-stacktrace.out\\n[2020-01-21T16:28:01+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report\\n[2020-01-21T16:28:01+00:00] ERROR: Chef::Exceptions::MultipleFailures\\n[2020-01-21T16:28:01+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)\\n\\n[stderr]\\ncal sector (or optimal\\nI/O) size boundary is recommended, or performance may be impacted.\\nDevice contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel\\nBuilding a new DOS disklabel with disk identifier 0xd58b5e74.\\nChanges will remain in memory only, until you decide to write them.\\nAfter that, of course, the previous content won't be recoverable.\\n\\nWarning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)\\n\\nThe device presents a logical sector size that is smaller than\\nthe physical sector size. Aligning to a physical sector (or optimal\\nI/O) size boundary is recommended, or performance may be impacted.\\nDevice contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel\\nBuilding a new DOS disklabel with disk identifier 0xe4da2f46.\\nChanges will remain in memory only, until you decide to write them.\\nAfter that, of course, the previous content won't be recoverable.\\n\\nWarning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)\\n\\nThe device presents a logical sector size that is smaller than\\nthe physical sector size. Aligning to a physical sector (or optimal\\nI/O) size boundary is recommended, or performance may be impacted.\\nDevice contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel\\nBuilding a new DOS disklabel with disk identifier 0x14ceee55.\\nChanges will remain in memory only, until you decide to write them.\\nAfter that, of course, the previous content won't be recoverable.\\n\\nWarning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)\\n\\nThe device presents a logical sector size that is smaller than\\nthe physical sector size. Aligning to a physical sector (or optimal\\nI/O) size boundary is recommended, or performance may be impacted.\\nDevice contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel\\nBuilding a new DOS disklabel with disk identifier 0xce7f3c0b.\\nChanges will remain in memory only, until you decide to write them.\\nAfter that, of course, the previous content won't be recoverable.\\n\\nWarning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)\\n\\nThe device presents a logical sector size that is smaller than\\nthe physical sector size. Aligning to a physical sector (or optimal\\nI/O) size boundary is recommended, or performance may be impacted.\\nDevice contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel\\nBuilding a new DOS disklabel with disk identifier 0xd85f58e6.\\nChanges will remain in memory only, until you decide to write them.\\nAfter that, of course, the previous content won't be recoverable.\\n\\nWarning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)\\n\\nThe device presents a logical sector size that is smaller than\\nthe physical sector size. Aligning to a physical sector (or optimal\\nI/O) size boundary is recommended, or performance may be impacted.\\nDevice contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel\\nBuilding a new DOS disklabel with disk identifier 0xea6b0248.\\nChanges will remain in memory only, until you decide to write them.\\nAfter that, of course, the previous content won't be recoverable.\\n\\nWarning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)\\n\\nThe device presents a logical sector size that is smaller than\\nthe physical sector size. Aligning to a physical sector (or optimal\\nI/O) size boundary is recommended, or performance may be impacted.\\nDevice contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel\\nBuilding a new DOS disklabel with disk identifier 0x456f14da.\\nChanges will remain in memory only, until you decide to write them.\\nAfter that, of course, the previous content won't be recoverable.\\n\\nWarning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)\\n\\nThe device presents a logical sector size that is smaller than\\nthe physical sector size. Aligning to a physical sector (or optimal\\nI/O) size boundary is recommended, or performance may be impacted.\\nmdadm: Defaulting to version 1.2 metadata\\nmdadm: array /dev/md0 started.\\nmke2fs 1.42.9 (4-Feb-2014)\\n\\\"\\r\\n\\r\\nMore information on troubleshooting is available at https://aka.ms/VMExtensionCSELinuxTroubleshoot \"\r\n }\r\n ]\r\n }\r\n}"
}
]
}
]
}
}
### Repro steps (*if necessary, delete otherwise*)
1. Deploy ARM Template provided

Contributor guide

No contributing guide indexed for this repository

Research direction

The entry point is the linked splunk-on-ubuntu/ template; begin by reproducing its standalone deployment and inspect the node-setup extension output, especially the chef-splunk service restart and update-splunk-mgmt-port failures. Done means the template deploys successfully on Ubuntu without the reported Conflict or VMExtensionProvisioningError.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, linux, ubuntu
Domain
cloud, devops, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.