In my dev environment I have (all 7.1 enterprise running on RHEL6.5)
1 x Master server 2 x Peer (index servers / cluster) 2 x Search heads
I'm trying to upgrade them to 7.2.
I have followed the upgrade documentation, everything was ok on all the other nodes in terms of upgrade steps, but one of the peer nodes failed with the below search. So I was wondering if anyone else has seen this or come across the same problem?
splunk start --accept-license --answer-yes
This appears to be an upgrade of Splunk.
Splunk has detected an older version of Splunk installed on this machine. To
finish upgrading to the new version, Splunk's installer will automatically
update and alter your current configuration files. Deprecated configuration
files will be renamed with a .deprecated extension.
You can choose to preview the changes that will be made to your configuration
files before proceeding with the migration and upgrade:
If you want to migrate and upgrade without previewing the changes that will be
made to your existing configuration files, choose 'y'.
If you want to see what changes will be made before you proceed with the
upgrade, choose 'n'.
Perform migration and upgrade without previewing configuration changes? [y/n] y
-- Migration information is being logged to '/opt/splunk/var/log/splunk/migratio n.log.2018-02-05.17-41-23' -- Migrating to: VERSION=7.0.2 BUILD=03bbabbd5c0f PRODUCT=splunk PLATFORM=Linux-x86_64 Copying '/opt/splunk/etc/myinstall/splunkd.xml' to '/opt/splunk/etc/myinstall/sp lunkd.xml-migrate.bak'. An unforeseen error occurred: Exception: <type 'exceptions.IOError'>, Value: [Errno 13] Permission den ied: '/opt/splunk/etc/myinstall/splunkd.xml-migrate.bak' Traceback (most recent call last): File "/opt/splunk/lib/python2.7/site-packages/splunk/clilib/cli.py", line 1290 , in sys.exit(main(sys.argv)) File "/opt/splunk/lib/python2.7/site-packages/splunk/clilib/cli.py", line 1143 , in main parseAndRun(argsList) File "/opt/splunk/lib/python2.7/site-packages/splunk/clilib/cli.py", line 998, in parseAndRun retVal = cList.getCmd(command, subCmd).call(argList, fromCLI = True) File "/opt/splunk/lib/python2.7/site-packages/splunk/clilib/cli.py", line 280, in call return self.func(args, fromCLI) File "/opt/splunk/lib/python2.7/site-packages/splunk/clilib/control_api.py", l ine 30, in wrapperFunc return func(dictCopy, fromCLI) File "/opt/splunk/lib/python2.7/site-packages/splunk/clilib/_internal.py", lin e 183, in firstTimeRun migration.autoMigrate(args[ARG_LOGFILE], isDryRun) File "/opt/splunk/lib/python2.7/site-packages/splunk/clilib/migration.py", lin e 3091, in autoMigrate comm.copyItem(PATH_SPLUNKD_XML, PATH_SPLUNKD_XML_BAK, dryRun) File "/opt/splunk/lib/python2.7/site-packages/splunk/clilib/cli_common.py", li ne 1008, in copyItem shutil.copy(src, dst) File "/opt/splunk/lib/python2.7/shutil.py", line 119, in copy copyfile(src, dst) File "/opt/splunk/lib/python2.7/shutil.py", line 83, in copyfile with open(dst, 'wb') as fdst: IOError: [Errno 13] Permission denied: '/opt/splunk/etc/myinstall/splunkd.xml-mi grate.bak' Please file a case online at http://www.splunk.com/page/submit_issue
Any thoughts on this would be great.
Its seems user you are logging with don't have permission to upgrade splunk directory. Could you please check the existing splunk directory permission, if you used root to install splunk, you must use root to upgrade it.
Thanks for the tip.
For some reason and after the overwrite of the files, the owner and group would show 506, the actual folder permissions looked the same when I compared them to the other peer node, so I ran chown (splunkuser) on the folders and and this time it went through.
Again thanks 🙂