tpm2 tools fail because /dev/tpm0 missing although the tpm server is running - simulator

I'm following this guide to use tpm2.0 simulator.
This is my situation:
Firstly, I ran:
$ ./tpm_server
TPM command server listening on port 2321
Platform server listening on port 2322
Then, I opened a new terminal and ran:
sudo tpm2-abrmd --allow-root --tcti=mssim
Nothing happened but in the previous terminal, there were:
$ ./tpm_server
TPM command server listening on port 2321
Platform server listening on port 2322
Command IPv6 client accepted
Platform IPv6 client accepted
I opened a new terminal more and ran command as the guide showed and there was some errors:
$ tpm2_pcrlist
ERROR:tcti:src/tss2-tcti/tcti-device.c:319:Tss2_Tcti_Device_Init() Failed to open device file /dev/tpm0: No such file or directory
ERROR: tcti init allocation routine failed for library: "device" options: "(null)"
ERROR: Could not load tcti, got: "device"
How should I do to fix it?

I got some error like you while running tpm2 command as you did.
You could try to run with "sudo". it works for me.

Same Issue!
Any answers. It was working but now it is not.

Related

Rabbitmq: Node down

I am getting node down error on rabbitmq, this is happening sometimes.
Able to see the below error when I execute: sudo rabbitmqctl status or sudo rabbitmqctl list_queues
Error: unable to connect to node : nodedown
connected to epmd (port 4369) on host-name
epmd reports node 'rabbit' running on port 25672
can't establish TCP connection, reason: timeout
suggestion: blocked by firewall?
version: {rabbit,"RabbitMQ","3.6.9"}
os: Ubuntu 16.04
I have checked hostname which is ok with me, not changed since the installation
Also able to telnet localhost 25672
What could be the reason behind this error and possible solution?
And one more question, I am checking node status using below API
curl -s GET http://edx:edx#127.0.0.1:15672/api/healthchecks/node/
Is above API ok or not to check the health status of the node? Please suggest if there is anything else. I have set up one shell script which will call this API and if status is not ok then it will restart rabbitmq-server service. Script is executed from cron every minute.
Looks like your rabbitmq node is... down. rabbitmqctl needs a running node to perform these commands.
If you're using systemd, you can check the service status:
service rabbitmq-server status
Or just try to restart the node:
rabbitmqctl start_app
Telnet on port 25672 tells you the rabbitmqctl is running, but RabbitMQ itself does not run on that port (by default, it's listening on 5672).

How to resolve RSelenium error message "Failed to connect to localhost port 4444: Connection refused"?

I am trying to use RSelenium with Dockerto crawl a website. However, I have some issues trying to get RSelenium/Docker to work.
Specifically, I installed Docker on my computer, which appears to be running fine (I see the image of the whale below when I open it).
In R, I then run the following code with no problems and see the expected output.
shell('docker run -d -p 4445:4444 selenium/standalone-chrome')
shell('docker ps')
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
d7de815ce644 selenium/standalone-chrome "/opt/bin/entry_poin…" 13 minutes ago Up 13 minutes 0.0.0.0:4445->4444/tcp zen_mclean
But when I then run the following code, I always receive the following error message:
remDr <- RSelenium::remoteDriver(remoteServerAddr = "localhost",
port = 4444,
browserName = "chrome")
remDr$open()
[1] "Connecting to remote server"
Error in checkError(res) :
Undefined error in httr call. httr output: Failed to connect to localhost port 4444: Connection refused
I am not sure what is going on here (I'm new to scraping). Can anybody help me figure out what to do here?
If it helps, I am running Windows 10.
In docker, you've binded your hosts port 4445 to the selenium-driver port 4444.
Which means if you run R in your host, you need to specify port = 4445
Does that solve it?
I managed to solve the problem by uninstalling Docker Toolbox and VMBox, which I was using, and installing the latest version of Docker from their website instead.

Issue in oozie installation: Error: IO_ERROR : java.net.UnknownHostException: master

I tried to install oozie on my pc and looks like successfully installed
oozie admin -oozie http://localhost:11000/oozie -status
System mode: NORMAL
But when running an oozie job it is showing below error
Error: IO_ERROR : java.net.UnknownHostException: master
Can you please suggest what could be the reason?
The reason for this failure could be further examined in oozie.log, which usually located in /var/log/oozie folder for CDH distribution. Or the log location could be examined with command:
ps -ef | grep oozie
and look for "-Doozie.log.dir=..."
And the oozie host needs to be reachable from the host where the command line is invoked. Try telnet to oozie port to make sure connection is good. An example session is like this:
[cloudera#localhost hadoop-yarn]$ telnet master 11000
Trying 127.0.0.1...
Connected to master.
Escape character is '^]'.

Strange Vagrant error message: 'Unable to create a host network interface'

I have a Vagrant machine based on VirtualBox that has some problems (see Vagrant crashes depending on physical network). Now I tried running it on another piece of hardware (with OS X Mavericks), and got the following error message:
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.
Command: ["hostonlyif", "create"]
Stderr: VBoxManage: error: Unable to create a host network interface
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component Host,
interface IHost, callee nsISupports
Context: "CreateHostOnlyNetworkInterface (hif.asOutParam(),
progress.asOutParam())" at line 64 of file VBoxManageHostonly.cpp
What does this mean?
For the error to appear I run
$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
[default] Clearing any previously set forwarded ports...
[default] Creating shared folders metadata...
[default] Clearing any previously set network interfaces...
… and then it crashes. Any ideas?
Oh, by the way: It's Vagrant 1.3.5 and VirtualBox 4.1.18.
sudo /Library/StartupItems/VirtualBox/VirtualBox restart
worked for me, see https://coderwall.com/p/ydma0q
The popular answer seems to be modprobe vboxnetadp (for Linux) or /Library/StartupItems/VirtualBox/VirtualBox restart (for Mac).
However, the fix for me was to add myself to the vboxusers group and relogin.

Arch Linux on VirtualBox network problems

I've installed ArchLinux with VB on MacOS. I have network problems, I cannot resolve addresses. When trying pacman -S htop for example I get the following error :
:: Retrieving packages from extra...
error: failed retrieving file 'htop-1.0-1-x86_64.pkg.tar.xz' from mir1.archlinux.fr : Could not resolve host: mir1.archlinux.fr; Name or service not known
warning: failed to retrieve some files from extra
error: failed to commit transaction (download library error)
Errors occurred, no packages were upgraded.
If I ping mir1.archlinux.fr I get a response. I'm running Network in Nat Mode.
PS: If I run In Bridge Mode I have no problems.
Can someone help me fixing this problem?
Nevermind... disabling ipv6 fixed the problem.!
Check your /etc/resolve.conf or even change for opendns/google DNS.
Then check any domain like:
dig http://stackoverflow.com
finally:
pacman -Syu

Resources