runtime error due to sock_open failure TPM-Emulator - ubuntu-16.04

I've recently setup and installed (after much finicking around to get around the seemingly common SSL error) the Mario Strasser TPM emulator.
Setting it up to run with modprobe tpmd_dev and then tpmd worked fine, however, once it was running I wanted to begin working on some code to interact with it and ran the test_tddl file, only to find that it fails to open the /dev/tpm file. after a little digging around I've found that it's a failure due to a sock_connect() call fails. Have I gone wrong with setting up the emulator somewhere? I'm running on ubuntu 16.04 on a virtual box VM
The error given upon running test_tddl is Error: Tddli_Open() failed: operation failed (0002)
and the error given in dmesg isError: sock_connect() failed: -2

Im an idiot, if anyone else runs into this problem, ensure that your running both tpmd and test_tddl as root, or else the programs will be unable to open the socket required.

Related

Microk8s on Window11 not install/uninstalling correctly

I am having problems after uninstalling microk8s and reinstalling the software. The first time, it was able to find and establish a connection to Hyper-V which was configured and working nicely. I accidentally uninstalled the software thinking that it was a different machine. After reinstalling the application, I am not able to get the microk8s to start:
C:\Users\xxxx>microk8s start
start failed: The following errors occurred:
microk8s-vm: timed out waiting for response
An error occurred with the instance when trying to start with 'multipass': returned exit code 2.
Ensure that 'multipass' is setup correctly and try again.
Actions taken:
Uninstalled MicroK8s
Uninstalled Multipass (v1.7.3)
Deleted microk8s-vm from Hyper-V
Installed microk8s using "microk8s-installer.exe"
I am pretty sure that I am missing a clean up step somewhere.

ptyHost was unable to resolve shell environment Error

So I've been having a lot of issues with VS Code Remote-SSH. I just started using it in September, previously using Atom, and this month I've been running into a ton of issues. I wound up uninstalling VS Code twice to try and resolve it, as well as delete the .vscode-server folder in the home directory on my linux machine.
Now, I can't even use VS Code to ssh into my environment. It keeps giving this error. This is from the .vscode-server/.log file.
*
* Visual Studio Code Server
*
* Reminder: You may only use this software with Visual Studio family products,
* as described in the license https://aka.ms/vscode-remote/license
*
Extension host agent listening on 35175
[02:21:35] Extension host agent started.
[02:21:46] No ptyHost heartbeat after 6 seconds
[02:21:47] ptyHost was unable to resolve shell environment Error: Unable to resolve your shell environment in a reasonable time. Please review your shell configuration.
at Timeout.<anonymous> (/home/kbree/.vscode-server/bin/ccbaa2d27e38e5afa3e5c21c1c7bef4657064247/out/vs/server/remoteExtensionHostAgent.js:85:55472)
at listOnTimeout (internal/timers.js:554:17)
at processTimers (internal/timers.js:497:7)
I was using a Bash shell. However, I got it to work, actually. I had to reboot the server to do it. Not exactly sure why. For future reference, I ran
sudo systemctl reboot
and that fixed the problem.

System crashed after creation of service: How can I reboot it?

for a lab, I was asked to created a python file that would be run as a service. After creating that file and entering the code provided, my system suddenly crashed. I tried rebooting it on multiple occasions, but it still won't work. (I will try to link images on the error message.)
Example of error message: [Failed] Failed to start Network Time Synchronization
I tried booting the system on recovery mode, but after entering my root password, it only displays this message ("Debian GNU/Linux 10 Velvet ttyl \n Velvet login: ") and I don't know what to do after. I try asking the teacher, but we couldn't figure it out either.

raspberry pi openvpn: ERROR: Cannot open TUN/TAP

I'm getting the above error when trying to connect to vpn given a .ovpn file. Usually this bug happens after an upgrade occurs and you haven't restarted yet. But I already did and the error still exists. I have tried reinstalling the openvpn (I'm using 2.4.7 on debian) and would not like to use this on docker.
Since getting this error when executing the command sudo openvpn file.ovpn often returns vague errors such as the one above, you can produce a more specific error when trying to import the ovpn file into NetworkManager instead.
After installing network-manager of course:
nmcli con import type openvpn vpn file.ovpn
Connect to the profile:
nmcli con up id vpn
Running this command would immediately show you a clearer error that is something along the lines of the org freedesktop networkmanager vpn plugin being unknown. Which is then solvable by installing the said plugin.
sudo apt install network-manager-openvpn
And that should do it.

swift server side server socket error

I'm suffering from server problem on both perfect and vapor ..
The server working for only one time , and once after i update the project and rebuild it, the server response does not update any more.
I got this error ... from vapor in Xcode
No command supplied, defaulting to serve...
Starting server on 0.0.0.0:8080
Serve error: Sockets Error: Failed trying to bind to the address
Identifier: Sockets.SocketsError.bindFailed
Program ended with exit code: 0
I googled alot , but did not figure out the problem
Finally : when i restart the mac , the server worked good only for one time , and the problem returned the same .
Seems like a process is using port 8080. Try running lsof -i :8080 from the terminal and kill it's PID with kill -9 PID
My problem solved after 2 days of searching by removing Xcode and reinstalling it .. Although Xcode was working well and i have just installed it one month before , but after i tested everything i tried hopelessly to do that and it worked .. seems frustrating , but it worth mentioning that for anyone who would facing that thing .