chef-client permission denied on root user - linux

running the chef client like so:
root#chef-production-server:~# chef-client -j /etc/chef/first-boot.json
output :
Starting Chef Client, version 12.8.1
[2016-04-10T14:11:12+00:00] INFO: *** Chef 12.8.1 ***
[2016-04-10T14:11:12+00:00] INFO: Chef-client pid: 8556
[2016-04-10T14:11:13+00:00] INFO: Setting the run_list to ["recipe[sensu_client::default#0.1.0]", "recipe[simple_server::application_server_recipe#0.1.2]", "recipe[mongodb::default#0.16.2]"] from CLI options
[2016-04-10T14:11:13+00:00] INFO: Run List is [recipe[sensu_client::default#0.1.0], recipe[simple_server::application_server_recipe#0.1.2], recipe[mongodb::default#0.16.2]]
ERROR: ld.so: object '/usr/local/lib/libsnoopy.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored.
bla bla bla
cannot create directory ‘/home/jenkins/.rvm’: Permission denied
it has worked before, not anymore. also tried
sudo chef-client -j /etc/chef/first-boot.json

You have an ld preload set to force-open "libsnoopy" in all processes. From github the appears to be some kind of simplistic audit tool. For whatever reason, that file isn't loading so that would be something to check on. Try removing it from the preload config. Also check that /home exists and is mounted correctly.

Related

Opensips-cli -x command not working in opensips 3.3

Recently I am working on upgrading my opensips version manually from 2.2 to 3.3.
Upgradation is done from my side but in old opensips(2.2) I was able to show registered user(SIP) using opensipsctl ul show command but in new version 3.3 opensipsctl is deprecated(I guess not sure).
So I am trying to get details using opensips-cli but I didn't find out correct command for show register and show dump list, I try to follow below link but did not find correct command.
https://www.opensips.org/Documentation/Interface-CoreMI-3-0
Also, my opensips-cli -x command not working giving the below error. (mi_fifo module loaded correctly)
# opensips-cli -o output_type=yaml -x mi uptime
ERROR: cannot access fifo file /tmp/opensips_fifo: [Errno 13] Permission denied: '/tmp/opensips_fifo'
ERROR: starting with Linux kernel 4.19, processes can no longer read from FIFO files
ERROR: that are saved in directories with sticky bits (such as /tmp)
ERROR: and are not owned by the same user the process runs with.
ERROR: To fix this, either store the file in a non-sticky bit directory (such as /var/run/opensips),
ERROR: or disable fifo file protection using 'sysctl fs.protected_fifos=0' (NOT RECOMMENDED)
/tmp/opensips_fifo file also created correctly.
# ls -l /tmp/opensips_fifo
prw-rw-rw- 1 opensips opensips 0 Dec 29 06:52 /tmp/opensips_fifo
Using opensips-cli command I am able to create database and add table but not able to perform -x command.
Can anyone help me to find out a command for show register and show dump list also any suggestion related -x command not working on opensips-cli.
I had a similar error and i found the following:
if you state in the opensips-cli.cfg file that the fifo_file is located at /tmp/opensips_fifo, it will produce this error, try changing this setting to /var/run/opensips/opensips_fifo

Start minikube with Docker driver in rootless not working because of fuse-overlay unit

I have an issue using Minikube with rootless docker.
I recently upgraded my Debian 10 to a Debian 11 with a 5.10.0-16-amd64 kernel version.
Then I have set up a rootless Docker, and its currently working well.
I have followed the documentation of Kubernetes about rootless docker.
But I am facing an error :
🤦 StartHost failed, but will try again: creating host: create: creating: create kic node: container name "minikube": log: 2022-08-03T16:19:15.374997860Z + echo 'INFO: enabling containerd-fuse-overlayfs service'
2022-08-03T16:19:15.375006741Z INFO: enabling containerd-fuse-overlayfs service
2022-08-03T16:19:15.375013843Z + systemctl enable containerd-fuse-overlayfs
2022-08-03T16:19:15.398783149Z Failed to enable unit, unit containerd-fuse-overlayfs.service does not exist.: container exited unexpectedly
So I search on the Internet and found this Github repository explaining how to install containerd-fuse-overlayfs.service that should resolve my problem.
I did not understand well the first option, so I have chosen to use the second option.
When I run the containerd-rootless-setuptool.sh install command (after installed them into /usr/bin). But I got an error too:
mount: /tmp/tmp.aecGG0JEwg/m: permission denied.
[rootlesskit:child ] error: command [mount -t overlay -o lowerdir=/tmp/tmp.aecGG0JEwg/l,upperdir=/tmp/tmp.aecGG0JEwg/u,workdir=/tmp/tmp.aecGG0JEwg/w overlay /tmp/tmp.aecGG0JEwg/m] exited: exit status 32
[rootlesskit:parent] error: child exited: exit status 32
[WARNING] Overlayfs is not enabled, consider installing fuse-overlayfs snapshotter (`/usr/bin/containerd-rootless-setuptool.sh install-fuse-overlayfs`), or see https://rootlesscontaine.rs/how-it-works/overlayfs/ to enable overlayfs.
So I decided to execute the next command anyway :
$ containerd-rootless-setuptool.sh install-fuse-overlayfs
containerd-fuse-overlayfs-grpc (https://github.com/containerd/fuse-overlayfs-snapshotter) needs to be present under $PATH
But I do not understand the error.
Anyone got an idea ? Thank you :)

Azure CustomScript Extension not executed in Centos 7.2

I want to kick of below script after VM gets deployed, followed instruction provided in below URL and uploaded script and command to execute in Portal
https://azure.microsoft.com/en-us/blog/automate-linux-vm-customization-tasks-using-customscript-extension/
Here is my command in shell script
{
cd /tmp && wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-9.noarch.rpm
rpm -ivh epel-release-7-9.noarch.rpm
yum install ansible -y
{
After VM ins deployed, i cant see the script inside the VM also not font the script inside the VM
Then i added command mkdir /tmp/test to create folder as part of deployment, with this deployment taking more than 5 minute and i cant see the folder /tmp/test created inside the VM,
Also observed this error in boot log
2017/02/06 22:55:49.085043 INFO Gateway:None
2017/02/06 22:55:49.089684 INFO Routes:None
2017/02/06 22:56:11.662445 WARNING Exception retrieving extension handlers: (000008)/var/lib/waagent/ExtensionsConfig.2.xml is missing.
2017/02/06 22:56:11.678998 ERROR Event: name=WALinuxAgent, op=, message=Exception retrieving extension handlers: (000008)/var/lib/waagent/ExtensionsConfig.2.xml is missing.
2017/02/06 22:56:37.728636 WARNING Exception retrieving extension handlers: (000008)/var/lib/waagent/ExtensionsConfig.2.xml is missing.
2017/02/06 22:56:37.745898 ERROR Event: name=WALinuxAgent, op=, message=Exception retrieving extension handlers: (000008)/var/lib/waagent/ExtensionsConfig.2.xml is missing.
2017/02/06 22:57:02.794418 WARNING Exception retrieving extension handlers: (000008)/var/lib/waagent/ExtensionsConfig.2.xml is missing.
2017/02/06 22:57:02.810250 ERROR Event: name=WALinuxAgent, op=, message=Exception retrieving extension handlers: (000008)/var/lib/waagent/ExtensionsConfig.2.xml is missing.
Seeing this error under extension
According to your description, I test in my lab. You had better adjust the script format. The following script is mine, it works for me.
cd /tmp
wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-9.noarch.rpm
rpm -ivh epel-release-7-9.noarch.rpm
yum install ansible -y
When you don't get expected outcome, you could check /var/log/waagent.log, you will get log as below:
2017/02/07 01:49:53 CustomScriptForLinux started to handle.
2017/02/07 01:49:53 [Microsoft.OSTCExtensions.CustomScriptForLinux-1.5.2.1] cwd is /var/lib/waagent/Microsoft.OSTCExtensions.CustomScriptForLinux-1.5.2.1
2017/02/07 01:49:53 [Microsoft.OSTCExtensions.CustomScriptForLinux-1.5.2.1] Change log file to /var/log/azure/Microsoft.OSTCExtensions.CustomScriptForLinux/1.5.2.1/extension.log
2017/02/07 01:49:54.508725 INFO Event: name=Microsoft.OSTCExtensions.CustomScriptForLinux, op=Install, message=Launch command succeeded: customscript.py -install
2017/02/07 01:49:54.518685 INFO [Microsoft.OSTCExtensions.CustomScriptForLinux-1.5.2.1] Enable extension.
2017/02/07 01:49:54.541244 INFO [Microsoft.OSTCExtensions.CustomScriptForLinux-1.5.2.1] Launch command:customscript.py -enable
Now, you could check log /var/log/azure/Microsoft.OSTCExtensions.CustomScriptForLinux/1.5.2.1/extension.log
Update: If you lost some file, you could try to uninstall the extension and install it again.

Error opening zip file or JAR manifest missing : jrebel.jar

When configuring JRebel on my remote server (JBoss on linux) I have configured the JVM arg as
-javaagent:/home/user/jrebel.jar" -Drebel.remoting_plugin=true
The jrebel.jar is absolutely definitely in that location, yet the server fails to start with the error:
Error opening zip
file or JAR manifest missing : /home/user/jrebel.jar Error occurred
during initialization of VM agent library failed to init: instrument
So the arg is oviously being passed to the JVM correctly, but for the life of me I can't work out why it can't find the jar. I've been through every Zero Turnaround article I can find + looked at the solutions that have resolved it for other people, but no luck. Any ideas?
Turned out to be a permissions problem - the JBoss user didn't have the permissions to access the directory that I had placed jrebel.jar into.
Would have been nice to have a more meaningfull error - e.g. 'permissions denied'. Shows my lack of Linux knowledge though I guess.
After the jar was moved to a directory within the JBoss installation + the jar owner was changed to the JBoss user and Read/Write/Execute permissions added, all is well.
Yes , the permission is the reason that this error happens to me when I tried to open PHPSTORM and that error was :
Error opening zip file or JAR manifest missing : ${JetbrainsIdesCrackPath}
Error occurred during initialization of VM
agent library failed to init: instrument
so before running PHPSTORM I had to run the command : sudo -i to get the root permission to run the program.

Puppet Dashboard permissions: Permission denied - /var/lib/puppet/reports/

I'm setting up the Puppet Dashboard for the first time. I have it running with the passenger module in Apache.
sudo rake RAILS_ENV=production reports:import
When I run this command, the tasks appear in the dashboard as failed.
630 new failed tasks
The details for each failure look something like this:
Importing report 201212270754.yaml at 2012-12-27 09:21 UTC
Permission denied - /var/lib/puppet/reports/rb-db1/201212270754.yaml
Backtrace
/usr/share/puppet-dashboard/app/models/report.rb:86:in `read'
/usr/share/puppet-dashboard/app/models/report.rb:86:in `create_from_yaml_file'
The report files were owned by puppet:puppet with a 640 permission by default.
I ran chmod a+rw on the reports directory, but I still get the same errors.
Any ideas on what I might be doing wrong here?
If you are running the puppet-dashboard server as root instead of as the puppet-dashboard user, you will see this error. My system is using /usr/share/puppet-dashboard/script/server on centos 6.4 using the puppet-dashboard-1.2.23-1.el6.noarch rpm from puppetlabs.
[root#hadoop01 puppet-dashboard]# cat /etc/sysconfig/puppet-dashboard
#
# path to where you installed puppet dashboard
#
DASHBOARD_HOME=/usr/share/puppet-dashboard
#DASHBOARD_USER=puppet-dashboard
DASHBOARD_USER=root
DASHBOARD_RUBY=/usr/bin/ruby
DASHBOARD_ENVIRONMENT=production
DASHBOARD_IFACE=0.0.0.0
DASHBOARD_PORT=3000
edit the file like above and then run the command
/etc/init.d/puppet-dashboard restart && /etc/init.d/puppet-dashboard-workers restart
my puppet-dashboard version is 1.2.23

Resources