JMeter-Taurus Docker Image Error - "No personal config found, creating one at /.bzt-rc" - jmeter

I am trying to run a performance test within a Drone pipeline using JMeter-Taurus. I am pulling the latest (stable) image for blazemeter-taurus. However, when running the test in a pipeline the following error is returned.
This is the contents of the Dockerfile:
FROM blazemeter/taurus
RUN apt-get update && \
python3 -m pip install s3cmd
COPY . /bzt/
COPY config/90-artifacts-dir.json /etc/bzt.d/
COPY config/90-no-console.json /etc/bzt.d/
COPY .bzt-rc /root/.bzt-rc
RUN chown -R 1000:1000 /bzt && \
sed -i -e '/^assistive_technologies=/s/^/#/' /etc/java-*-openjdk/accessibility.properties
USER 1000
VOLUME ["/bzt"]
WORKDIR /bzt
UPDATE:
The "USER 1000" part has been removed. And the following line was added:
RUN chmod +x /bzt
But this is the error message returned:
Traceback (most recent call last):
File "/usr/local/bin/bzt", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.9/dist-packages/bzt/cli.py", line 676, in main
executor = CLI(parsed_options)
File "/usr/local/lib/python3.9/dist-packages/bzt/cli.py", line 56, in __init__
self.setup_logging(options)
File "/usr/local/lib/python3.9/dist-packages/bzt/cli.py", line 111, in setup_logging
file_handler = logging.FileHandler(options.log, encoding="utf-8")
File "/usr/lib/python3.9/logging/__init__.py", line 1146, in __init__
StreamHandler.__init__(self, self._open())
File "/usr/lib/python3.9/logging/__init__.py", line 1175, in _open
return open(self.baseFilename, self.mode, encoding=self.encoding,
PermissionError: [Errno 13] Permission denied: '/bzt/bzt.log'
######## TEST RUN STATUS : 1 #######
cat: /bzt/bzt_artifacts/bzt.log: No such file or directory
cat: /bzt/bzt_artifacts/error.jtl: No such file or directory
ls: cannot access '/bzt/bzt_artifacts/': No such file or directory

Taurus Docker image is root-oriented, here is the Dockerfile
I fail to see why Taurus is trying to create its config under /.bzt-rc, it may be some this "Drone pipeline" specifics, my expectation is that your test will fail because your user 1000 doesn't have write permissions to /tmp folder where Taurus stores its Artifacts

Related

Seems Ansible failed to get the temp files

Ansible failed while running the tasks and referring file/folder not exists in the ansible temp folder of a target machine. It has been working fine and not sure why all of sudden it stopped working
changed : false
module_stderr : Shared connection to 10.131.132.11 closed.\r\n
module_stdout : Traceback (most recent call last):\r\n File \"/root/.ansible/tmp/ansible-tmp-1662460628.845051-105063944436404/AnsiballZ_setup.py\", line 113, in <module>\r\n try:\r\n File \"/root/.ansible/tmp/ansible-tmp-1662460628.845051-105063944436404/AnsiballZ_setup.py\", line 98, in _ansiballz_main\r\n json_params = f.read()\r\n File \"/usr/lib64/python2.7/tempfile.py\", line 321, in mkdtemp\r\n dir = gettempdir()\r\n File \"/usr/lib64/python2.7/tempfile.py\", line 265, in gettempdir\r\n tempdir = _get_default_tempdir()\r\n File \"/usr/lib64/python2.7/tempfile.py\", line 212, in _get_default_tempdir\r\n (\"No usable temporary directory found in %s\" % dirlist))\r\nIOError: [Errno 2] No usable temporary directory found in ['/tmp', '/var/tmp', '/usr/tmp', '/root']\r\n
msg : MODULE FAILURE\nSee stdout/stderr for the exact error
rc : 1
You can start by checking the permissions if they changed.
I think the disk is probably full. I had the same issue and it was the case.
You can type df -h
Also you can verify the inode.
You can type df -i

Error while downloading PETSc and SLEPc with cygwin

I try to install PETSc and SLEPc with cygwin on Windows following a manual. It says:
mkdir petsc
mkdir slepc
git clone -b maint https://bitbucket.org/petsc/petsc petsc
git clone -b maint https://bitbucket.org/slepc/slepc slepc
cd petsc
export CYGWIN=winsymlinks:native
export PETSC_DIR=~/petsc
export PETSC_ARCH=win64-cygwin-debug
./configure -–with-fc=0 --download-superlu --download-metis \--download-parmetis --download-ptscotch
But when I execute the last step there is an error which says:
UNABLE to CONFIGURE with GIVEN OPTIONS (see configure.log for details):
----------------------------------------------------------
Error running make on PARMETIS
Looking into configure.log didn't help me. An excerpt of the document:
********************************************************
UNABLE to CONFIGURE with GIVEN OPTIONS (see configure.log for details):
--------------------------------------------------------
Error running make on PARMETIS
********************************************************
File "/home/Salih/petsc/config/configure.py", line 447, in petsc_configure
framework.configure(out = sys.stdout)
File "/home/Salih/petsc/config/BuildSystem/config/framework.py", line 1195, in configure
self.processChildren()
File "/home/Salih/petsc/config/BuildSystem/config/framework.py", line 1184, in processChildren
self.serialEvaluation(self.childGraph)
File "/home/Salih/petsc/config/BuildSystem/config/framework.py", line 1159, in serialEvaluation
child.configure()
File "/home/Salih/petsc/config/BuildSystem/config/package.py", line 1088, in configure
self.executeTest(self.configureLibrary)
File "/home/Salih/petsc/config/BuildSystem/config/base.py", line 139, in executeTest
ret = test(*args,**kargs)
File "/home/Salih/petsc/config/BuildSystem/config/packages/parmetis.py", line 42, in configureLibrary
config.package.Package.configureLibrary(self)
File "/home/Salih/petsc/config/BuildSystem/config/package.py", line 866, in configureLibrary
for location, directory, lib, incl in self.generateGuesses():
File "/home/Salih/petsc/config/BuildSystem/config/package.py", line 444, in generateGuesses
d = self.checkDownload()
File "/home/Salih/petsc/config/BuildSystem/config/package.py", line 578, in checkDownload
return self.getInstallDir()
File "/home/Salih/petsc/config/BuildSystem/config/package.py", line 340, in getInstallDir
installDir = self.Install()
File "/home/Salih/petsc/config/BuildSystem/config/package.py", line 1718, in Install
raise RuntimeError('Error running make on '+self.PACKAGE)
========================================================
Finishing configure run at Wed, 12 Jan 2022 22:45:42 +0300
========================================================
What could be the reason for this error?

AssertionError when cloning Anaconda base environment

I'm trying to create a clone of my base anaconda environment for a specific application. I want to use the clone as the base off of which to install application-specific packages. I used the following command to start the clone:
C:\Users\Liam>conda create -n retrievals --clone base
It made it a long way through the cloning process, and had just reach 100% on cloning anaconda-5.2.0, when it threw the assertion error below:
# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<
Traceback (most recent call last):
File "C:\Users\Liam\Anaconda3\lib\site-packages\conda\exceptions.py", line 819, in __call__
return func(*args, **kwargs)
File "C:\Users\Liam\Anaconda3\lib\site-packages\conda\cli\main.py", line 78, in _main
exit_code = do_call(args, p)
File "C:\Users\Liam\Anaconda3\lib\site-packages\conda\cli\conda_argparse.py", line 77, in do_call
exit_code = getattr(module, func_name)(args, parser)
File "C:\Users\Liam\Anaconda3\lib\site-packages\conda\cli\main_create.py", line 11, in execute
install(args, parser, 'create')
File "C:\Users\Liam\Anaconda3\lib\site-packages\conda\cli\install.py", line 211, in install
clone(args.clone, prefix, json=context.json, quiet=context.quiet, index_args=index_args)
File "C:\Users\Liam\Anaconda3\lib\site-packages\conda\cli\install.py", line 72, in clone
index_args=index_args)
File "C:\Users\Liam\Anaconda3\lib\site-packages\conda\misc.py", line 277, in clone_env
force_extract=False, index_args=index_args)
File "C:\Users\Liam\Anaconda3\lib\site-packages\conda\misc.py", line 78, in explicit
assert not any(spec_pcrec[1] is None for spec_pcrec in specs_pcrecs)
AssertionError
$ C:\Users\Liam\Anaconda3\Scripts\conda create -n retrievals --clone base
Can anybody explain why this is happening and what I could try to fix it?
P.S. I'm doing this on Windows 10 if that helps at all.
I found workaround for it. You can just copy environment with base name.
cp -r /opt/conda/envs/base_env /opt/conda/envs/new_env
After that you can activate or update environment.
conda activate new_env
conda env update --name new_env --file environment.yaml --prune

Ansible ad hoc commands only work as sudo unless i'm in the hosts directory

I'm trying to work through getting started with ansible. When I try to run ad hoc commands with ansible, such as ansible all -m ping I have to either be in the same folder as my hosts file ~/Development/ansible/ or use sudo. I'm getting ready to move forward with learning playbooks but I feel like this is going to come back as a problem at some point.
If I try to run the command outside of that folder without sudo I get this message
<XXX.XXX.XXX.XXX> ESTABLISH CONNECTION FOR USER: Joe
<XXX.XXX.XXX.XXX> REMOTE_MODULE ping
server | FAILED => Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/ansible/runner/__init__.py", line 586, in _executor
exec_rc = self._executor_internal(host, new_stdin)
File "/Library/Python/2.7/site-packages/ansible/runner/__init__.py", line 789, in _executor_internal
return self._executor_internal_inner(host, self.module_name, self.module_args, inject, port, complex_args=complex_args)
File "/Library/Python/2.7/site-packages/ansible/runner/__init__.py", line 1036, in _executor_internal_inner
result = handler.run(conn, tmp, module_name, module_args, inject, complex_args)
File "/Library/Python/2.7/site-packages/ansible/runner/action_plugins/normal.py", line 62, in run
return self.runner._execute_module(conn, tmp, module_name, module_args, inject=inject, complex_args=complex_args)
File "/Library/Python/2.7/site-packages/ansible/runner/__init__.py", line 470, in _execute_module
) = self._configure_module(conn, module_name, args, inject, complex_args)
File "/Library/Python/2.7/site-packages/ansible/runner/__init__.py", line 1351, in _configure_module
module_path = utils.plugins.module_finder.find_plugin(module_name, module_suffixes)
File "/Library/Python/2.7/site-packages/ansible/utils/plugins.py", line 176, in find_plugin
full_paths = (os.path.join(path, f) for f in os.listdir(path))
OSError: [Errno 13] Permission denied: '/Users/Joe/library/Saved Application State/jp.co.trendy.sdformatter.savedState'
I've done a lot of searching around but haven't had much luck finding a solution.
Here is my ~/.ansible.cfg file
# config file for ansible -- http://ansible.com/
# ==============================================
# nearly all parameters can be overridden in ansible-playbook
# or with command line flags. ansible will read ANSIBLE_CONFIG,
# ansible.cfg in the current working directory, .ansible.cfg in
# the home directory or /etc/ansible/ansible.cfg, whichever it
# finds first
[defaults]
# some basic default values...
inventory = ~/Development/ansible/hosts
And, here is my hosts file
server ansible_ssh_host=XXX.XXX.XXX.XXX ansible_ssh_user=Joe ansible_ssh_private_key_file=~/.ssh/id_rsa
This appears to be not an Ansible problem but a permission issue with a software called SD Card Formatter from Trendy Corp. I don't know why this would be triggered when you run Ansible though.
The permissions of all the files in your library should get fixed by "repair permissions" in the Disk Utility Tool. Alternatively make sure the files and folders in /Users/Joe/library/Saved Application State/jp.co.trendy.sdformatter.savedState belong to user Joe: chown -R Joe:Joe /Users/Joe/library/Saved Application State/jp.co.trendy.sdformatter.savedState. If you don't care about this application, deleting the mentioned folder completely should do it too.

cloud-init per-boot script on ubuntu ec2-instance

I am trying to start a script with cloud-init on a ubuntu 11.10 ec2 instance.
I put the script script.sh in the folder /var/lib/cloud/scripts/per-boot.
Content of script.sh is simple:
#/!/bin/sh
echo "test"
After a reboot, I get the following error:
run-parts: failed to exec /var/lib/cloud/scripts/per-boot/script.sh: Exec format error
run-parts: /var/lib/cloud/scripts/per-boot/script.sh exited with return code 1
2012-04-14 19:10:52,642 - cc_scripts_per_boot.py[WARNING]: failed to run-parts in /var/lib/cloud/scripts/per-boot
2012-04-14 19:10:52,648 - __init__.py[WARNING]: Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/cloudinit/CloudConfig/__init__.py", line 108, in run_cc_modules
cc.handle(name, run_args, freq=freq)
File "/usr/lib/python2.7/dist-packages/cloudinit/CloudConfig/__init__.py", line 72, in handle
[ name, self.cfg, self.cloud, cloudinit.log, args ])
File "/usr/lib/python2.7/dist-packages/cloudinit/__init__.py", line 309, in sem_and_run
func(*args)
File "/usr/lib/python2.7/dist-packages/cloudinit/CloudConfig/cc_scripts_per_boot.py", line 27, in handle
util.runparts(runparts_path)
File "/usr/lib/python2.7/dist-packages/cloudinit/util.py", line 140, in runparts
raise subprocess.CalledProcessError(sp.returncode,cmd)
CalledProcessError: Command '['run-parts', '--regex', '.*', '/var/lib/cloud/scripts/per-boot']' returned non-zero exit status 1
2012-04-14 19:10:52,648 - __init__.py[ERROR]: config handling of scripts-per-boot, None, [] failed
cloud-init boot finished at Sat, 14 Apr 2012 19:10:52 +0000. Up 3.70 seconds
2012-04-14 19:10:52,672 - cloud-init-cfg[ERROR]: errors running cloud_config [final]: ['scripts-per-boot']
errors running cloud_config [final]: ['scripts-per-boot']
Any ideas how to fix it?
I believe your problem is related to the fact that #/!/bin/sh is not a valid input type. Need to remove the / after the #.
#!/bin/sh
echo "test"
Let me know if you still see the problems after this.

Resources