Regular fonts for git-gui and gitk have disappeared - git-gui

I'm on Ubuntu 16.04.
Recently, the fonts in my git-gui and gitk have suddenly changed.
I have tried the other fonts proposed but none of them correspond to the previous one that I was used to.
This is what it looked before the bug (taken from the web) :
This is what it looks like now :
The current fonts for git gui are :
Main : gothic 11pt
diff/console : gothic 11pt
The current fonts for gitk are :
Main : courrier 10 pitch
diff : monospace
user interface : gothic
The fonts I can choose from are :
bitstream charter, clean, clearlyu alternate glyphs, clearlyu arabic, clearlyu arabic extra, clearlyu devanagari, clearlyu devangari extra, clearlyu pua, courrier 10 pitch, fangsong ti, fixed, gothic, mincho, newspaper, nil, open look cursor, open look glyph, song ti
Can someone check what is the normal default font for git-gui and gitk on Ubuntu 16.04, and maybe explain why they have changed in my case ? Maybe I incidentally removed a package...
I tried to reinstall gitk and git gui, but I still get that font... The difference is that at the beginning, the default fonts in gitk are Helvetica, Courier and Helvetica, and when I click on the button to choose the font, they don't appear in the list.
Could that be a Tcl/Tk problem ?

UPDATE
I finally figured out where this is coming from, and it's because of the Anaconda environment.
git-gui and gitk use Tcl/Tk and tkinter as a GUI library, and as mentionned in this answer:
tkinter works linking to a Tk/Tcl interpreter that, loosely
speaking, is contained in a couple of DLL, in particular the graphical
library is libtk6.0.so.
Most of the extra fonts not seen by tkinter are managed by the
Freetype library and Anaconda's libtk6.0.so is not built against
Freetype...
I have made the test, and I can conclude that it is very well coming from this :
$ conda deactivate
$ gitk # fonts are okay
$ conda activate base
$ (base) gitk # fonts are weird
$ (base) conda deactivate
$ gitk # fonts are okay again
One workaround is the one mentionned here:
I resolved this issue by removing wish files in ANACONDA_PATH/bin and
related virtual environments
Except that I renamed the files instead of removing them, e.g. wish -> wish-i-renamed-it.
Sources :
Make Anaconda's tkinter aware of system fonts or install new fonts for Anaconda
https://github.com/ContinuumIO/anaconda-issues/issues/6833
This old answer doesn't apply anymore
I just restarted my computer this morning, and the fonts are back !
They are all here !
I really don't know why though...
Here is my update log :
$ less /var/log/apt/history.log
Start-Date: 2018-06-05 09:36:17
Commandline: aptdaemon role='role-commit-packages' sender=':1.127'
Upgrade: liblouis9:amd64 (2.6.4-2ubuntu0.1, 2.6.4-2ubuntu0.2), snapd:amd64 (2.32.3.2, 2.32.9), python3-louis:amd64 (2.6.4-2ubuntu0.1, 2.6.4-2ubuntu0.2), libexempi3:amd64 (2.2.2-2, 2.2.2-2ubuntu0.1), liblouis-data:amd64 (2.6.4-2ubuntu0.1, 2.6.4-2ubuntu0.2)
End-Date: 2018-06-05 09:36:36
Start-Date: 2018-06-06 08:31:53
Commandline: aptdaemon role='role-commit-packages' sender=':1.100'
Upgrade: libelf1:amd64 (0.165-3ubuntu1, 0.165-3ubuntu1.1), libelf1:i386 (0.165-3ubuntu1, 0.165-3ubuntu1.1)
End-Date: 2018-06-06 08:31:57
Start-Date: 2018-06-06 08:32:51
Commandline: aptdaemon role='role-commit-packages' sender=':1.100'
Upgrade: git-gui:amd64 (1:2.7.4-0ubuntu1.3, 1:2.7.4-0ubuntu1.4), git-man:amd64 (1:2.7.4-0ubuntu1.3, 1:2.7.4-0ubuntu1.4), git:amd64 (1:2.7.4-0ubuntu1.3, 1:2.7.4-0ubuntu1.4), gitk:amd64 (1:2.7.4-0ubuntu1.3, 1:2.7.4-0ubuntu1.4)
End-Date: 2018-06-06 08:33:03
Start-Date: 2018-06-07 10:39:47
Commandline: aptdaemon role='role-commit-packages' sender=':1.124'
Upgrade: liblouis9:amd64 (2.6.4-2ubuntu0.2, 2.6.4-2ubuntu0.3), google-chrome-stable:amd64 (67.0.3396.62-1, 67.0.3396.79-1), python3-louis:amd64 (2.6.4-2ubuntu0.2, 2.6.4-2ubuntu0.3), liblouis-data:amd64 (2.6.4-2ubuntu0.2, 2.6.4-2ubuntu0.3)
End-Date: 2018-06-07 10:40:04
Start-Date: 2018-06-13 08:46:19
Commandline: aptdaemon role='role-commit-packages' sender=':1.107'
Install: linux-headers-4.4.0-128:amd64 (4.4.0-128.154, automatic), linux-headers-4.4.0-128-generic:amd64 (4.4.0-128.154, automatic), linux-image-4.4.0-128-generic:amd64 (4.4.0-128.154, automatic), linux-signed-image-4.4.0-128-generic:amd64 (4.4.0-128.154, automatic), linux-image-extra-4.4.0-128-generic:amd64 (4.4.0-128.154, automatic)
Upgrade: libimage-magick-perl:amd64 (8:6.8.9.9-7ubuntu5.9, 8:6.8.9.9-7ubuntu5.11), linux-headers-generic:amd64 (4.4.0.127.133, 4.4.0.128.134), linux-libc-dev:amd64 (4.4.0-127.153, 4.4.0-128.154), libldap-2.4-2:amd64 (2.4.42+dfsg-2ubuntu3.2, 2.4.42+dfsg-2ubuntu3.3), libldap-2.4-2:i386 (2.4.42+dfsg-2ubuntu3.2, 2.4.42+dfsg-2ubuntu3.3), libimage-magick-q16-perl:amd64 (8:6.8.9.9-7ubuntu5.9, 8:6.8.9.9-7ubuntu5.11), imagemagick:amd64 (8:6.8.9.9-7ubuntu5.9, 8:6.8.9.9-7ubuntu5.11), adobe-flash-properties-gtk:amd64 (1:20180508.1-0ubuntu0.16.04.1, 1:20180607.1-0ubuntu0.16.04.1), linux-image-generic:amd64 (4.4.0.127.133, 4.4.0.128.134), libmagickwand-6.q16-2:amd64 (8:6.8.9.9-7ubuntu5.9, 8:6.8.9.9-7ubuntu5.11), linux-signed-image-generic:amd64 (4.4.0.127.133, 4.4.0.128.134), slack-desktop:amd64 (3.2.0-beta25a7a50e, 3.2.1), google-chrome-stable:amd64 (67.0.3396.79-1, 67.0.3396.87-1), linux-signed-generic:amd64 (4.4.0.127.133, 4.4.0.128.134), adobe-flashplugin:amd64 (1:20180508.1-0ubuntu0.16.04.1, 1:20180607.1-0ubuntu0.16.04.1), imagemagick-6.q16:amd64 (8:6.8.9.9-7ubuntu5.9, 8:6.8.9.9-7ubuntu5.11), libmagickcore-6.q16-2-extra:amd64 (8:6.8.9.9-7ubuntu5.9, 8:6.8.9.9-7ubuntu5.11), firefox-locale-en:amd64 (60.0.1+build2-0ubuntu0.16.04.1, 60.0.2+build1-0ubuntu0.16.04.1), firefox-locale-fr:amd64 (60.0.1+build2-0ubuntu0.16.04.1, 60.0.2+build1-0ubuntu0.16.04.1), gpgv:amd64 (1.4.20-1ubuntu3.1, 1.4.20-1ubuntu3.2), libmagickcore-6.q16-2:amd64 (8:6.8.9.9-7ubuntu5.9, 8:6.8.9.9-7ubuntu5.11), firefox:amd64 (60.0.1+build2-0ubuntu0.16.04.1, 60.0.2+build1-0ubuntu0.16.04.1), imagemagick-common:amd64 (8:6.8.9.9-7ubuntu5.9, 8:6.8.9.9-7ubuntu5.11), libmagick++-6.q16-5v5:amd64 (8:6.8.9.9-7ubuntu5.9, 8:6.8.9.9-7ubuntu5.11), gnupg:amd64 (1.4.20-1ubuntu3.1, 1.4.20-1ubuntu3.2), linux-generic:amd64 (4.4.0.127.133, 4.4.0.128.134), spotify-client:amd64 (1:1.0.77.338.g758ebd78-41, 1:1.0.80.480.g51b03ac3-13)
End-Date: 2018-06-13 08:49:26
Start-Date: 2018-06-14 15:36:26
Commandline: aptdaemon role='role-commit-packages' sender=':1.128'
Upgrade: perl-base:amd64 (5.22.1-9ubuntu0.3, 5.22.1-9ubuntu0.5), perl-modules-5.22:amd64 (5.22.1-9ubuntu0.3, 5.22.1-9ubuntu0.5), console-setup-linux:amd64 (1.108ubuntu15.3, 1.108ubuntu15.4), console-setup:amd64 (1.108ubuntu15.3, 1.108ubuntu15.4), libperl5.22:amd64 (5.22.1-9ubuntu0.3, 5.22.1-9ubuntu0.5), keyboard-configuration:amd64 (1.108ubuntu15.3, 1.108ubuntu15.4), perl:amd64 (5.22.1-9ubuntu0.3, 5.22.1-9ubuntu0.5)
End-Date: 2018-06-14 15:37:04
Start-Date: 2018-06-15 10:36:50
Commandline: aptdaemon role='role-commit-packages' sender=':1.152'
Upgrade: gnupg-agent:amd64 (2.1.11-6ubuntu2, 2.1.11-6ubuntu2.1), ruby2.3:amd64 (2.3.1-2~16.04.9, 2.3.1-2~16.04.10), libmagic1:amd64 (1:5.25-2ubuntu1, 1:5.25-2ubuntu1.1), ruby2.3-dev:amd64 (2.3.1-2~16.04.9, 2.3.1-2~16.04.10), dirmngr:amd64 (2.1.11-6ubuntu2, 2.1.11-6ubuntu2.1), libruby2.3:amd64 (2.3.1-2~16.04.9, 2.3.1-2~16.04.10), gnupg2:amd64 (2.1.11-6ubuntu2, 2.1.11-6ubuntu2.1), file:amd64 (1:5.25-2ubuntu1, 1:5.25-2ubuntu1.1)
End-Date: 2018-06-15 10:37:08
Start-Date: 2018-06-19 09:04:17
Commandline: aptdaemon role='role-commit-packages' sender=':1.168'
Upgrade: libwebkit2gtk-4.0-37:amd64 (2.20.2-0ubuntu0.16.04.1, 2.20.3-0ubuntu0.16.04.1), gir1.2-webkit2-4.0:amd64 (2.20.2-0ubuntu0.16.04.1, 2.20.3-0ubuntu0.16.04.1), desktop-file-utils:amd64 (0.22-1ubuntu5.1, 0.22-1ubuntu5.2), libjavascriptcoregtk-4.0-18:amd64 (2.20.2-0ubuntu0.16.04.1, 2.20.3-0ubuntu0.16.04.1), wireless-regdb:amd64 (2015.07.20-1ubuntu1, 2018.05.09-0ubuntu1~16.04.1), libwebkit2gtk-4.0-37-gtk2:amd64 (2.20.2-0ubuntu0.16.04.1, 2.20.3-0ubuntu0.16.04.1), gir1.2-javascriptcoregtk-4.0:amd64 (2.20.2-0ubuntu0.16.04.1, 2.20.3-0ubuntu0.16.04.1)
End-Date: 2018-06-19 09:04:32
Start-Date: 2018-06-20 10:39:10
Commandline: aptdaemon role='role-commit-packages' sender=':1.182'
Upgrade: libgcrypt20:amd64 (1.6.5-2ubuntu0.4, 1.6.5-2ubuntu0.5), libgcrypt20:i386 (1.6.5-2ubuntu0.4, 1.6.5-2ubuntu0.5)
End-Date: 2018-06-20 10:39:15
Start-Date: 2018-06-21 16:30:24
Commandline: aptdaemon role='role-commit-packages' sender=':1.214'
Upgrade: amd64-microcode:amd64 (2.20160316.1, 3.20180524.1~ubuntu0.16.04.1)
End-Date: 2018-06-21 16:30:48
And this is my reboot log :
$ last -x | grep reboot
reboot system boot 4.4.0-128-generi Tue Jun 26 09:08 still running
reboot system boot 4.4.0-128-generi Fri Jun 15 10:38 - 18:33 (10+07:55)
reboot system boot 4.4.0-127-generi Tue Jun 12 09:26 - 18:33 (13+09:06)
reboot system boot 4.4.0-127-generi Tue Jun 12 09:21 - 09:25 (00:03)
reboot system boot 4.4.0-127-generi Tue Jun 5 16:43 - 09:20 (6+16:37)
reboot system boot 4.4.0-127-generi Mon Jun 4 12:54 - 09:20 (7+20:26)
The only way I could see why is the fact that I upgraded git-gui and gitk on June 6th.
But why did only work when rebooting on the 26th ?
There is no Tcl/Tk upgrade, but there are gtk upgrades, so I don't know if that has something to do with it...
Maybe someone can figure it out ?

Related

httpd won't start with custom conf files and mod_wsgi built with Python 3.9

I am working on a RedHat Centos 7 box. I have installed python 3.9.2 into a folder under /opt/python3.9. I am in the midst of moving my Django server to production, and have chosen to use Apache (I have installed httpd-devel) with mod_wsgi. I was in the midst of following their instructions to make sure it gets configured correctly.
I installed Apache:
sudo yum install httpd
sudo yum install httpd-devel
then
wget https://github.com/GrahamDumpleton/mod_wsgi/archive/refs/tags/4.9.2.tar.gz
mv 4.9.2.tar.gz ./mod_wsgi_4.9.2.tar.gz
tar xvfz mod_wsgi-4.9.2.tar.gz
cd mod_wsgi*
./configure --with-python=/opt/python3.9/bin/python39
make
sudo make install
all with no errors.
sudo systemctl enable httpd
sudo systemctl start httpd
But as soon as I try to use the demo here (which basically entails adding a conf file to /etc/httpd/conf.d/, called wsgi.conf, and a response file to /var/www/html/, called test_wsgi.py, then restarting Apache), it throws an error and tells me to check journalctl -xe.
Jun 08 21:04:01 ip-172-31-18-8.ec2.internal httpd[11893]: AH00526: Syntax error on line 2 of /etc/httpd/conf.d/wsgi.conf:
Jun 08 21:04:01 ip-172-31-18-8.ec2.internal httpd[11893]: Invalid command 'WSGIScriptAlias', perhaps misspelled or defined by a module not included in the server configuration
Jun 08 21:04:01 ip-172-31-18-8.ec2.internal systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Jun 08 21:04:01 ip-172-31-18-8.ec2.internal systemd[1]: Failed to start The Apache HTTP Server.
-- Subject: Unit httpd.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit httpd.service has failed.
--
-- The result is failed.
Jun 08 21:04:01 ip-172-31-18-8.ec2.internal systemd[1]: Unit httpd.service entered failed state.
Jun 08 21:04:01 ip-172-31-18-8.ec2.internal systemd[1]: httpd.service failed.
Jun 08 21:04:01 ip-172-31-18-8.ec2.internal sudo[11888]: pam_unix(sudo:session): session closed for user root
I am 95% certain that if I did what was suggested here that it would compile mod_wsgi for Python 2.7 and I don't want to use python2.7... that's why I compiled mod_wsgi for python 3.9.2.
If I try to use my django.conf file instead of the one I linked in the demo, I get a different error that might be more helpful for the slue:
httpd.conf: Syntax error on line 3 of /etc/httpd/conf.d/django.conf: Cannot load /usr/lib64/httpd/modules/mod_wsgi.so into server: libpython3.9.so.1.0: cannot open shared object file: No such file or directory
Line 3 is:
LoadModule wsgi_module /usr/lib64/httpd/modules/mod_wsgi.so
Output of ldd /usr/lib64/httpd/modules/mod_wsgi.so:
[ec2-user#ip-172-31-18-8 ~]$ ldd /usr/lib64/httpd/modules/mod_wsgi.so
linux-vdso.so.1 (0x00007ffd7b50d000)
libpython3.9.so.1.0 => /opt/python39/lib/libpython3.9.so.1.0 (0x00007ff0ebf85000)
libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007ff0ebd4e000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007ff0ebb30000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007ff0eb92c000)
libutil.so.1 => /lib64/libutil.so.1 (0x00007ff0eb729000)
libm.so.6 => /lib64/libm.so.6 (0x00007ff0eb3e9000)
libc.so.6 => /lib64/libc.so.6 (0x00007ff0eb03e000)
/lib64/ld-linux-x86-64.so.2 (0x00007ff0ec781000)
I can verify that /opt/python39/lib/libpython3.9.so.1.0 exists and I have it in my LD_RUN_PATH and LD_LIBRARY_PATH variables
Output of sudo apachectl -V:
Server version: Apache/2.4.53 ()
Server built: Apr 12 2022 12:00:44
Server's Module Magic Number: 20120211:124
Server loaded: APR 1.7.0, APR-UTIL 1.6.1, PCRE 8.32 2012-11-30
Compiled using: APR 1.7.0, APR-UTIL 1.6.1, PCRE 8.32 2012-11-30
Architecture: 64-bit
Server MPM: prefork
threaded: no
forked: yes (variable process count)
Server compiled with....
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_PROC_PTHREAD_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D DYNAMIC_MODULE_LIMIT=256
-D HTTPD_ROOT="/etc/httpd"
-D SUEXEC_BIN="/usr/sbin/suexec"
-D DEFAULT_PIDLOG="/run/httpd/httpd.pid"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="conf/mime.types"
-D SERVER_CONFIG_FILE="conf/httpd.conf"
You are seeing this error...
libpython3.9.so.1.0: cannot open shared object file: No such file or directory
...because httpd has no idea it's supposed to look in /opt/python3.9/lib to find the necessary shared library. There are several ways of resolving this problem:
Set -rpath when linking the module.
This embeds a path to the library in the compiled binary. You would set it by running make like this inside the mod_wsgi-4.9.2 directory:
make LDFLAGS='-L/opt/python3.9/lib -Wl,-rpath,/opt/python3.9/lib'
Set LD_LIBRARY_PATH in httpd's environment. This provides
httpd with an additional list of directories to search for shared
libraries. We can test it like this:
LD_LIBRARY_PATH=/opt/python3.9/lib httpd -DFOREGROUND
To set it persistently, you'd want to customize the httpd
service unit:
Run systemctl edit httpd
In the editor that comes up, add the following content:
[Service]
Environment=LD_LIBRARY_PATH=/opt/python3.9/lib
This creates
/etc/systemd/system/httpd.service.d/override.conf.
Run systemctl daemon-reload to refresh the cached version of the unit file.
Restart your httpd service.
Edit the global library search path by creating
/etc/ld.so.conf.d/python3.9.conf with the following content:
/opt/python3.9/lib
Then run:
ldconfig
Any of the above options should get things running for you.

Postgres not responding after reboot - needs /usr/lib/postgresql/12/bin/pg_ctl restart -D /var/lib/postgresql/12/main

I'm having problems with PostgreSQL on Ubuntu 20.04. After server is rebooted, the database doesn't work and I need to switch the user to postgres and call /usr/lib/postgresql/12/bin/pg_ctl restart -D /var/lib/postgresql/12/main to restart it.
EDIT
So it looks like that the night this started, these upgrades have been automatically installed:
tart-Date: 2021-11-12 06:35:51
Commandline: /usr/bin/unattended-upgrade
Upgrade: libtdb1:amd64 (1.4.2-3build1, 1.4.3-0ubuntu0.20.04.1)
End-Date: 2021-11-12 06:35:51
Start-Date: 2021-11-12 06:35:59
Commandline: /usr/bin/unattended-upgrade
Upgrade: libpq5:amd64 (12.8-0ubuntu0.20.04.1, 12.9-0ubuntu0.20.04.1), libpq-dev:amd64 (12.8-0ubuntu0.20.04.1, 12.9-0ubuntu0.20.04.1)
End-Date: 2021-11-12 06:35:59
Start-Date: 2021-11-12 06:36:07
Commandline: /usr/bin/unattended-upgrade
Upgrade: postgresql-client-12:amd64 (12.8-0ubuntu0.20.04.1, 12.9-0ubuntu0.20.04.1)
End-Date: 2021-11-12 06:36:08
Start-Date: 2021-11-12 06:36:16
Commandline: /usr/bin/unattended-upgrade
Upgrade: postgresql-12:amd64 (12.8-0ubuntu0.20.04.1, 12.9-0ubuntu0.20.04.1)
End-Date: 2021-11-12 06:36:19
----------------------------------------------------------------------------------------------------------
I absolutely don't know where the problem is, can you take a look at it? These are steps:
(Step 4 - postgresql not working, step 8 - it works)
*1 REBOOT
*2
master#myproject-ubuntu:~$ sudo service postgresql status
● postgresql.service - PostgreSQL RDBMS
Loaded: loaded (/lib/systemd/system/postgresql.service; enabled; vendor preset: enabled)
Active: active (exited) since Tue 2021-11-16 15:16:22 CST; 29s ago
Process: 713 ExecStart=/bin/true (code=exited, status=0/SUCCESS)
Main PID: 713 (code=exited, status=0/SUCCESS)
Nov 16 15:16:22 myproject-ubuntu systemd[1]: Starting PostgreSQL RDBMS...
Nov 16 15:16:22 myproject-ubuntu systemd[1]: Finished PostgreSQL RDBMS.
*3
sudo grep "postgres" /var/log/syslog
Nov 16 15:16:22 myproject-ubuntu kernel: [ 3.939501] systemd[1]: Created slice system-postgresql.slice.
Nov 16 15:16:22 myproject-ubuntu postgresql#12-main[712]: Error: Could not open logfile /var/log/postgresql/postgresql-12-main.log
Nov 16 15:16:22 myproject-ubuntu postgresql#12-main[638]: Error: /usr/lib/postgresql/12/bin/pg_ctl /usr/lib/postgresql/12/bin/pg_ctl start -D /var/lib/postgresql/12/main -l /var/log/postgresql/postgresql-12-main.log -s -o -c config_file="/etc/postgresql/12/main/postgresql.conf" exited with status 1:
Nov 16 15:16:22 myproject-ubuntu systemd[1]: postgresql#12-main.service: Can't open PID file /run/postgresql/12-main.pid (yet?) after start: Operation not permitted
Nov 16 15:16:22 myproject-ubuntu systemd[1]: postgresql#12-main.service: Failed with result 'protocol'.
Nov 16 15:16:49 myproject-ubuntu gunicorn[984]: File "/home/master/.virtualenvs/arcounty_django/lib/python3.8/site-packages/django/db/backends/postgresql/base.py", line 187, in get_new_connection
*4
pg_lsclusters
Ver Cluster Port Status Owner Data directory Log file
12 main 5432 down <unknown> /var/lib/postgresql/12/main /var/log/postgresql/postgresql-12-main.log
*5
CMD: sudo service postgresql restart
CMD: pg_lsclusters
Ver Cluster Port Status Owner Data directory Log file
12 main 5432 down <unknown> /var/lib/postgresql/12/main /var/log/postgresql/postgresql-12-main.log
*6
CMD: sudo su - postgres
CMD: /usr/lib/postgresql/12/bin/pg_ctl restart -D /var/lib/postgresql/12/main
pg_ctl: PID file "/var/lib/postgresql/12/main/postmaster.pid" does not exist
Is server running?
trying to start server anyway
waiting for server to start....2021-11-16 21:21:55.805 UTC [1158] LOG: starting PostgreSQL 12.9 (Ubuntu 12.9-0ubuntu0.20.04.1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0, 64-bit
2021-11-16 21:21:55.806 UTC [1158] LOG: listening on IPv4 address "127.0.0.1", port 5432
2021-11-16 21:21:55.808 UTC [1158] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2021-11-16 21:21:55.847 UTC [1163] LOG: database system was shut down at 2021-11-16 21:13:45 UTC
2021-11-16 21:21:55.865 UTC [1158] LOG: database system is ready to accept connections
done
server started
*7 exit
*8 (as normal user)
`CMD:pg_lsclusters`
Ver Cluster Port Status Owner Data directory Log file 12 main 5432 online <unknown> /var/lib/postgresql/12/main /var/log/postgresql/postgresql-12-main.log
EDIT:
permissions & ownerships after reboot (when it's not working)
sudo ls -la /var/lib/postgresql/12/main/
master#myproject-ubuntu:~$ sudo ls -la /var/lib/postgresql/12/main/
[sudo] password for master:
total 88
drwx------ 19 postgres postgres 4096 Nov 16 15:39 .
drwx------ 3 postgres postgres 4096 Oct 6 2020 ..
-rwx------ 1 postgres postgres 3 Oct 6 2020 PG_VERSION
drwx------ 7 postgres postgres 4096 Jan 12 2021 base
drwx------ 2 postgres postgres 4096 Nov 16 15:22 global
drwx------ 2 postgres postgres 4096 Oct 6 2020 pg_commit_ts
drwx------ 2 postgres postgres 4096 Oct 6 2020 pg_dynshmem
drwx------ 4 postgres postgres 4096 Nov 16 15:39 pg_logical
drwx------ 4 postgres postgres 4096 Oct 6 2020 pg_multixact
drwx------ 2 postgres postgres 4096 Nov 16 15:21 pg_notify
drwx------ 2 postgres postgres 4096 Oct 6 2020 pg_replslot
drwx------ 2 postgres postgres 4096 Oct 6 2020 pg_serial
drwx------ 2 postgres postgres 4096 Oct 6 2020 pg_snapshots
drwx------ 2 postgres postgres 4096 Nov 16 15:39 pg_stat
drwx------ 2 postgres postgres 4096 Oct 6 2020 pg_stat_tmp
drwx------ 2 postgres postgres 4096 Nov 1 14:55 pg_subtrans
drwx------ 2 postgres postgres 4096 Oct 6 2020 pg_tblspc
drwx------ 2 postgres postgres 4096 Oct 6 2020 pg_twophase
drwx------ 3 postgres postgres 4096 Nov 11 22:20 pg_wal
drwx------ 2 postgres postgres 4096 Oct 27 09:13 pg_xact
-rwx------ 1 postgres postgres 88 Oct 6 2020 postgresql.auto.conf
-rwx------ 1 postgres postgres 130 Nov 16 15:21 postmaster.opts
sudo ls -la /var/lib/postgresql/12/
master#myproject-ubuntu:~$ sudo ls -la /var/lib/postgresql/12/
total 12
drwx------ 3 postgres postgres 4096 Oct 6 2020 .
drwxr-xr-x 3 postgres postgres 4096 Dec 22 2020 ..
drwx------ 19 postgres postgres 4096 Nov 16 15:39 main
sudo cat etc/postgresql/12/main/start.conf
# Automatic startup configuration
# auto: automatically start the cluster
# manual: manual startup with pg_ctlcluster/postgresql#.service only
# disabled: refuse to start cluster
# See pg_createcluster(1) for details. When running from systemd,
# invoke 'systemctl daemon-reload' after editing this file.
auto
cat /var/log/apt/history.log
Start-Date: 2021-11-09 06:34:56
Commandline: apt-get -o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confold -qq install -y --only-upgrade do-agent
Upgrade: do-agent:amd64 (3.11.0, 3.12.0)
End-Date: 2021-11-09 06:34:57
Start-Date: 2021-11-10 06:49:20
Commandline: /usr/bin/unattended-upgrade
Install: linux-image-5.4.0-90-generic:amd64 (5.4.0-90.101, automatic), linux-headers-5.4.0-90-generic:amd64 (5.4.0-90.101, automatic), linux-headers-5.4.0-90:amd64 (5.4.0-90.101, automatic), linux-modules-5.4.0-90-generic:amd64 (5.4.0-90.101, automatic)
Upgrade: linux-headers-generic:amd64 (5.4.0.89.93, 5.4.0.90.94), linux-virtual:amd64 (5.4.0.89.93, 5.4.0.90.94), linux-headers-virtual:amd64 (5.4.0.89.93, 5.4.0.90.94), linux-image-virtual:amd64 (5.4.0.89.93, 5.4.0.90.94)
End-Date: 2021-11-10 06:49:40
Start-Date: 2021-11-10 06:49:48
Commandline: /usr/bin/unattended-upgrade
Upgrade: linux-libc-dev:amd64 (5.4.0-89.100, 5.4.0-90.101)
End-Date: 2021-11-10 06:49:49
Start-Date: 2021-11-11 06:44:31
Commandline: /usr/bin/unattended-upgrade
Remove: linux-headers-5.4.0-88-generic:amd64 (5.4.0-88.99), linux-headers-5.4.0-88:amd64 (5.4.0-88.99)
End-Date: 2021-11-11 06:44:34
Start-Date: 2021-11-11 06:44:41
Commandline: /usr/bin/unattended-upgrade
Remove: linux-image-5.4.0-88-generic:amd64 (5.4.0-88.99)
End-Date: 2021-11-11 06:44:43
Start-Date: 2021-11-11 06:44:50
Commandline: /usr/bin/unattended-upgrade
Remove: linux-modules-5.4.0-88-generic:amd64 (5.4.0-88.99)
End-Date: 2021-11-11 06:44:50
Start-Date: 2021-11-12 06:35:51
Commandline: /usr/bin/unattended-upgrade
Upgrade: libtdb1:amd64 (1.4.2-3build1, 1.4.3-0ubuntu0.20.04.1)
End-Date: 2021-11-12 06:35:51
Start-Date: 2021-11-12 06:35:59
Commandline: /usr/bin/unattended-upgrade
Upgrade: libpq5:amd64 (12.8-0ubuntu0.20.04.1, 12.9-0ubuntu0.20.04.1), libpq-dev:amd64 (12.8-0ubuntu0.20.04.1, 12.9-0ubuntu0.20.04.1)
End-Date: 2021-11-12 06:35:59
Start-Date: 2021-11-12 06:36:07
Commandline: /usr/bin/unattended-upgrade
Upgrade: postgresql-client-12:amd64 (12.8-0ubuntu0.20.04.1, 12.9-0ubuntu0.20.04.1)
End-Date: 2021-11-12 06:36:08
Start-Date: 2021-11-12 06:36:16
Commandline: /usr/bin/unattended-upgrade
Upgrade: postgresql-12:amd64 (12.8-0ubuntu0.20.04.1, 12.9-0ubuntu0.20.04.1)
End-Date: 2021-11-12 06:36:19
Start-Date: 2021-11-16 06:29:53
Commandline: /usr/bin/unattended-upgrade
Upgrade: xxd:amd64 (2:8.1.2269-1ubuntu5.3, 2:8.1.2269-1ubuntu5.4)
End-Date: 2021-11-16 06:29:54
Start-Date: 2021-11-16 06:30:01
Commandline: /usr/bin/unattended-upgrade
Upgrade: vim-common:amd64 (2:8.1.2269-1ubuntu5.3, 2:8.1.2269-1ubuntu5.4), vim-runtime:amd64 (2:8.1.2269-1ubuntu5.3, 2:8.1.2269-1ubuntu5.4), vim:amd64 (2:8.1.2269-1ubuntu5.3, 2:8.1.2269-1ubuntu5.4), vim-tiny:amd64 (2:8.1.2269-1ubuntu5.3, 2:8.1.2269-1ubuntu5.4)
End-Date: 2021-11-16 06:30:05
Start-Date: 2021-11-17 06:57:29
Commandline: /usr/bin/unattended-upgrade
Upgrade: accountsservice:amd64 (0.6.55-0ubuntu12~20.04.4, 0.6.55-0ubuntu12~20.04.5), libaccountsservice0:amd64 (0.6.55-0ubuntu12~20.04.4, 0.6.55-0ubuntu12~20.04.5)
End-Date: 2021-11-17 06:57:30
Start-Date: 2021-11-17 07:07:27
Commandline: apt-get purge --auto-remove redis-server
Requested-By: master (1000)
Purge: lua-bitop:amd64 (1.0.2-5), libhiredis0.14:amd64 (0.14.0-6), lua-cjson:amd64 (2.1.0+dfsg-2.1), redis:amd64 (5:5.0.7-2), redis-tools:amd64 (5:5.0.7-2), liblua5.1-0:amd64 (5.1.5-8.1build4), libjemalloc2:amd64 (5.2.1-1ubuntu1), redis-server:amd64 (5:5.0.7-2)
End-Date: 2021-11-17 07:07:30
Start-Date: 2021-11-17 07:07:49
Commandline: apt-get install redis-server
Requested-By: master (1000)
Install: lua-bitop:amd64 (1.0.2-5, automatic), libhiredis0.14:amd64 (0.14.0-6, automatic), lua-cjson:amd64 (2.1.0+dfsg-2.1, automatic), redis-tools:amd64 (5:5.0.7-2, automatic), liblua5.1-0:amd64 (5.1.5-8.1build4, automatic), libjemalloc2:amd64 (5.2.1-1ubuntu1, automatic), redis-server:amd64 (5:5.0.7-2)
End-Date: 2021-11-17 07:07:52

MONGODB-ORG not running on UBUNTU 20.04

I used to have mongodb (the unofficial package) installed on Ubuntu 20.04.
I decided to change to the official one.(version 4.4)
First, both packages got confilcted, but after wiping the old one, the install succeeded.
But, when I try to run the mongod service,it fails, and shows this:
myubuntu:~$ sudo systemctl start mongod
myubuntu:~$ (no prompts, all is ok so far)
myubuntu:~$ sudo systemctl status mongod
● mongod.service - MongoDB Database Server
Loaded: loaded (/lib/systemd/system/mongod.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Fri 2021-06-04 01:11:27 EDT; 14s ago
Docs: https://docs.mongodb.org/manual
Process: 21446 ExecStart=/usr/bin/mongod --config /etc/mongod.conf (code=exited, status=14)
Main PID: 21446 (code=exited, status=14)
jun 04 01:11:27 robb systemd[1]: Started MongoDB Database Server.
jun 04 01:11:27 robb systemd[1]: mongod.service: Main process exited, code=exited, status=14/n/a
jun 04 01:11:27 robb systemd[1]: mongod.service: Failed with result 'exit-code'.
and :
myubuntu:~$ mongod
{"t":{"$date":"2021-06-04T01:18:08.279-04:00"},"s":"I", "c":"CONTROL", "id":23285, "ctx":"main","msg":"Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'"}
{"t":{"$date":"2021-06-04T01:18:08.283-04:00"},"s":"W", "c":"ASIO", "id":22601, "ctx":"main","msg":"No TransportLayer configured during NetworkInterface startup"}
{"t":{"$date":"2021-06-04T01:18:08.283-04:00"},"s":"I", "c":"NETWORK", "id":4648601, "ctx":"main","msg":"Implicit TCP FastOpen unavailable. If TCP FastOpen is required, set tcpFastOpenServer, tcpFastOpenClient, and tcpFastOpenQueueSize."}
{"t":{"$date":"2021-06-04T01:18:08.284-04:00"},"s":"I", "c":"STORAGE", "id":4615611, "ctx":"initandlisten","msg":"MongoDB starting","attr":{"pid":21483,"port":27017,"dbPath":"/data/db","architecture":"64-bit","host":"robb"}}
{"t":{"$date":"2021-06-04T01:18:08.284-04:00"},"s":"I", "c":"CONTROL", "id":23403, "ctx":"initandlisten","msg":"Build Info","attr":{"buildInfo":{"version":"4.4.6","gitVersion":"72e66213c2c3eab37d9358d5e78ad7f5c1d0d0d7","openSSLVersion":"OpenSSL 1.1.1f 31 Mar 2020","modules":[],"allocator":"tcmalloc","environment":{"distmod":"ubuntu2004","distarch":"x86_64","target_arch":"x86_64"}}}}
{"t":{"$date":"2021-06-04T01:18:08.284-04:00"},"s":"I", "c":"CONTROL", "id":51765, "ctx":"initandlisten","msg":"Operating System","attr":{"os":{"name":"Ubuntu","version":"20.04"}}}
{"t":{"$date":"2021-06-04T01:18:08.284-04:00"},"s":"I", "c":"CONTROL", "id":21951, "ctx":"initandlisten","msg":"Options set by command line","attr":{"options":{}}}
{"t":{"$date":"2021-06-04T01:18:08.285-04:00"},"s":"E", "c":"NETWORK", "id":23024, "ctx":"initandlisten","msg":"Failed to unlink socket file","attr":{"path":"/tmp/mongodb-27017.sock","error":"Operation not permitted"}}
{"t":{"$date":"2021-06-04T01:18:08.285-04:00"},"s":"F", "c":"-", "id":23091, "ctx":"initandlisten","msg":"Fatal assertion","attr":{"msgid":40486,"file":"src/mongo/transport/transport_layer_asio.cpp","line":919}}
{"t":{"$date":"2021-06-04T01:18:08.285-04:00"},"s":"F", "c":"-", "id":23092, "ctx":"initandlisten","msg":"\n\n***aborting after fassert() failure\n\n"}
I'd also like to mention that I've followed the steps carefully, and repeatedly have wiped and reinstalled packages, and updated with (sudo apt-get update) as recommended in solutions (see mongodb official solutions)
I've found a related question where the same author found the solution, please click here to see:
As a side note, if you have the same error, and provided solutions does not work, please, follow the link and try this answer,but paying special attention to remove both lib and log files created by mongodb,
sudo rm -r /var/log/mongodb
sudo rm -r /var/lib/mongodb
it's extremely important to get these files erased.
also, try to use sudo service command instead sudo systemctl command for starting mongod
the troubleshooting from mongodb does not cover these steps, and they made the real difference for me.

uWSGI: implicit plugin requested nolang

Problem
We are using different Python versions with uWSGI since a few days. We managed to make it work. (The websites are running again.) But we get an error in our logs (systemctl status uwsgi-emperor.service):
Loaded: loaded (/etc/uwsgi/uwsgi-emperor.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2019-03-08 06:55:08 CET; 8min ago
Process: 28501 ExecStart=/usr/local/bin/uwsgi_nolang --ini /etc/uwsgi/emperor.ini --emperor-pidfile /run/uwsgi/emperor.pid --plugins-dir /usr/lib/uwsgi/plugins (code=exited, st
Process: 28497 ExecStartPre=/bin/bash -c mkdir -p /run/uwsgi; chown www-data:root /run/uwsgi (code=exited, status=0/SUCCESS)
Main PID: 28505 (uwsgi_nolang)
Status: "The Emperor is governing 5 vassals"
Tasks: 19 (limit: 4915)
Memory: 586.2M
CPU: 1min 1.165s
CGroup: /system.slice/uwsgi-emperor.service
├─28504 /usr/local/bin/uwsgi_nolang --ini /etc/uwsgi/emperor.ini --emperor-pidfile /run/uwsgi/emperor.pid --plugins-dir /usr/lib/uwsgi/plugins
├─28505 /usr/local/bin/uwsgi_nolang --ini /etc/uwsgi/emperor.ini --emperor-pidfile /run/uwsgi/emperor.pid --plugins-dir /usr/lib/uwsgi/plugins
├─28506 /usr/local/bin/uwsgi_nolang --ini /etc/uwsgi/vassals/site1.ini --include /etc/uwsgi/vassals-common.ini
...
systemd[1]: Starting uWSGI Emperor service...
uwsgi_nolang[28501]: [uwsgi] implicit plugin requested nolang
uwsgi_nolang[28501]: open("./nolang_plugin.so"): No such file or directory [core/utils.c line 3724]
uwsgi_nolang[28501]: !!! UNABLE to load uWSGI plugin: ./nolang_plugin.so: cannot open shared object file: No such file or directory !!!
uwsgi_nolang[28501]: [uWSGI] getting INI configuration from /etc/uwsgi/emperor.ini
I couldn't find a nolang_plugin.so anywhere. If you google for it, you get a hand full results only that didn't help.
I also checked that we don't require a plugin = nolang or something similar in our config files. (But in the logs it says that this plugin is requested implicit anyway.)
Installation
Our system Python version is 3.5. I've installed Python 3.6 with pyenv: env CONFIGURE_OPTS="--enable-shared" pyenv install 3.6.8. The --enable-shared is necessary to be able to build a uWSGI plugin with it. (Should I have installed it with env PYTHON_CFLAGS=-fPIC pyenv install 3.6.8 instead as this answer says? Because the error message told me to re-compile Python with these flags but I didn't know about PYTHON_CFLAGS back then.)
Then we followed these official instructions to compile uWSGI and the plugins for Python 3.5 and 3.6.
I.e. compile uWSGI with make PROFILE=nolang and then build the plugins:
./uwsgi --build-plugin "plugins/python python35"
pyenv local 3.6.8
./uwsgi --build-plugin "plugins/python python36"
(We renamed the compiled uwsgi executable to uwsgi_nolang.)
Environment
Debian 4.9.130-2
pyenv 1.2.9
uWSGI 2.0.18
nginx

Auto-start service for systemd: Invalid Argument

I am trying to start service at startup. My service should start .exe file with mono.
When I try to just run it with:
sudo systemctl start myservice.service
Everything goes okay and my app is running. However when i run status for service i get "bad;" for Systemd Unit files status.
sudo systemctl status myservice.service
● myservice.service
Loaded: loaded (/etc/systemd/system/myservice.service; bad; vendor preset: enabled)
Active: active (running) since Ut 2017-03-21 12:01:05 CET; 2s ago
Main PID: 3892 (mono)
CGroup: /system.slice/myservice
└─3892 /usr/bin/mono /opt/myapp/myapp.exe
When i run enable command i get:
sudo systemctl enable myservice.service
Failed to execute operation: Invalid argument
My unit file /etc/systemd/system/myservice.service contains:
[Unit]
Description=myservice
After=network.target
[Service]
ExecStart=/usr/bin/mono /opt/myapp/myapp.exe
WorkingDirectory=/opt/myapp
Restart=on-failure
[Install]
WantedBy=multi-user.target
Can anyone help me with this?.. thank you..
I working on Ubuntu:
Distributor ID: Ubuntu
Description: Ubuntu 16.04.2 LTS
Release: 16.04
Codename: xenial
Mono:
sudo mono --version
Mono JIT compiler version 4.8.0 (Stable 4.8.0.495/e4a3cf3 Wed Feb 22 18:25:42 UTC 2017)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: __thread
SIGSEGV: altstack
Notifications: epoll
Architecture: x86
Disabled: none
Misc: softdebug
LLVM: supported, not enabled.
GC: sgen

Resources