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

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.

Related

Supervisor "spawn error" : I'm stuck... how can I know the reason for the error?

I have a Django REST API running on an UBUNTU 20.04 server, with a sqlite database.
Everything has been working for weeks with no issue.
Today, after pulling small changes to my code (changes in my settings.py file), I've tried to restart the GUNICORN server with SUPERVISOR as usual with:
sudo supervisorctl restart <MyAppName>
but I get an error message :
<MyAppName>-gunicorn: ERROR (spawn error)
In /var/log/supervisor.supervisor.log, I can only see that error message :
exited: <MyApp>-gunicorn (exit status 3; not expected)
I can find no way to have it working again (I've even tried to restart the server).
The strange thing is that when I manually launch gunicorn with :
/home/<myname>/env/bin/gunicorn <MyApp>.wsgi
I have no error message and my server works perfectly(requests are served to my app).
How can I know the reason for the supervisor spawn error ?

What can I do if I can't save in vs code & I can't submit things in vs code?

On this morning when I open my vs code I found this suddenly pop out. I ignore it and start coding. Afterward I found that I can save my codes, so I code it in notepad and I save it to vs code using Nano in the terminal. It saved successfully. But it comes to the second issue, I can't handin my work it shows
bash: submit50: command not found
bash: style50: command not found
bash: check50: command not found
when I input check50 cs50/problems/2022/x/cash style50 cash.c check50 cs50/problems/2022/x/cash .
The error I saw when I start the vs code is as follow:
This codespace is currently running in recovery mode due to a
container error. Review the creation logs, update your devcontainer
configuration as needed, and run the "Rebuild Container" command to
retry.
After I click view creation log it shows the following things in the coding area.
2022-04-19 03:34:20.311Z: Configuration starting...
2022-04-19 03:34:20.440Z: Entering recovery mode after failing to start. Reason: System.Threading.Tasks.Task`1[System.String]
2022-04-19 03:34:20.461Z: Found a recovery marker flag. Validate the reason.
2022-04-19 03:34:20.477Z: Container creation failed.
2022-04-19 03:34:21.673Z:
2022-04-19 03:34:21.737Z: Creating recovery container.
Please tell me what can I do to solve this issue. Thanks a lot.

Manage to connect through the terminal, but not through the remote explorer

I am coming from notepad, and am learning how to work with VS Code.
I am now trying to access my online repertory on the webserver.
I followed up the guide here: https://code.visualstudio.com/docs/remote/ssh
I did manage to access my server through the terminal window.
(ssh user#domain + password).
When connecting, this shows in the log:
"Linux infong-eu27 4.4.246-icpu-061 #2 SMP Thu Nov 26 10:58:41 UTC 2020 x86_64"
This tells me that it is working on Linux.
If I type "Ls", I can see my folders and navigate among them.
So far, so good!
Second phase: Connecting through the remote explorer.
Step 1:
I configured the ssh with the same credentials I used with the terminal.
Step 2:
I am opening the remote explorer, I can see my server's name. I right click on it and select "connect".
Step 3:
I am then asking to choose the system. I am picking Linux as shown earlier when connecting through the terminal.
Step 4: I am entering the same password I used before to connect in the terminal.
Step 5: Infinite loading, or a very long one till I get 2 notifications / errors:
Could not fetch remote environment
Failed to connect to the remote extension host (error time limit..)
That being said, it also says in the bottom left corner, in the "remote window", that I am connected. This does not seems right.
Any chance someone could help?
I am frustrated because it connects in 1s using the terminal, but not in the remote explorer.
UPDATE:
I found this article on medium that paraphrases the official documentation.
https://medium.com/#sujaypillai/connect-to-your-remote-servers-from-visual-studio-code-eb5a5875e348
I managed, through Git bash, to create a ssh pair key, and managed to copy one on my server.
I then followed the instructions on how to set it up on VS Code successfully!
Now, when I try to connect, I am asked for my key pass:
But, when I do: super long loading, and the same error message.
When I looked on my server with a sftp software, I see that VS did manage to connect as files were installed in a VS folder it created:
This is reported in issue 4415 (no answer) and issue 4204
The last one includes:
This might be caused by our new automatic port forwarding feature which scans the remote OS for available ports in order to forward them locally (microsoft/vscode#112843)
This is fixed by PR 113342, for the next 1.54 Feb. 2021 release. That bug is about setting remote.autoForwardPorts to false and... still seeing VSCode auto-forward ports!
Check on your server (while VSCode attempts to connect) if:
the CPU is high
if there are any services running on public port on said server
I solved a similar issue by following the error logs from the remote ssh extension. I had to install libatomic1 on the remote server with
sudo apt-get install libatomic1

runtime error due to sock_open failure TPM-Emulator

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.

Munin not generating graphs

My clean munin install is not generating graphs, i did everything listed in this URL to debug
http://munin-monitoring.org/wiki/FAQ_no_graphs#Ijustreadtheaboveanswerandtherestillarentanygraphs
i can successfully connect via telnet to the node.
-The nodes comand display the node correctly
-The list command shows the list of plugins correctly.
-The fetch command provides an empty output!!!
i opened the munin-node.log file to see what's going on, and every entry logs (i think 1 entry for every plugin) show one of this 2 error messages (when i restart the node the error switch from one to another)
1-
Error output from threads:
2013/08/08-07:38:04 [2659] Insecure directory in $ENV{PATH} while running with -T switch at /usr/share/perl5/Munin/Node/Service.pm line 241.
2013/08/08-07:38:04 [2659] Service 'threads' exited with status 255/0.
2-
Error output from vmstat:
2013/08/08-07:35:02 [1096] 2013/08/08-07:35:02 [1186] Died at /usr/share/perl5/Munin/Common/Timeout.pm line 66, line 74.
i have no clue, of how to solve this.
Im using Ubuntu 12.04 and the installed munin version is the 1.4 ... since the 2.x are not available for ubuntu 12.04
Maybe someone with experience with pearl could orient me on how to edit the source to get rid of the error!!!