Unable to remote to VM instance with Oracle Linux 8.6 and XRDP using Remote Desktop Connection - remote-desktop

I created a VM instance on Oracle Cloud, using Oracle Linux 8.6. I added TCP 3389 port in VCN on OCI before installing GUI.
I want to install GUI and allow RDP connection to VM instance, so I installed GNome GUI and XRDP with the following commands (# is I use root user):
# dnf groupinstall "Server with GUI" -y
# systemctl set-default graphical
# reboot
Then uncomment the following line in the /etc/gdm/custom.conf file to ensure that VNC uses X.org instead of Wayland:
WaylandEnable=False
After that, I installed TigerVNC Server and XRDP:
# yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm -y
# yum install tigervnc-server xrdp -y
# systemctl start xrdp
# systemctl enable xrdp
# firewall-cmd --permanent --add-port=3389/tcp
# firewall-cmd --reload
Then, I proceeded to set the VNC password, configure VNC service and set up the VNC service as instructed on Oracle's document page.
Finally, I proceeded to connect to VM Instance via Remote Desktop Connection, but I received An authentication error has occurred. The function requested is not supportted:
After that, I revised the port field in the /etc/xrdp/xrdp.ini file into port=tcp://:3389 and then restarted the XRDP service via service xrdp restart command, then check the status of XRDP service through systemctl status xrdp command:
But when I tried to reconnect, the above error still happened. I conducted a check of XRDP service, and it appeared the following errors:
After that, I tried to change the ssl_protocols field in /etc/xrdp/xrdp.ini from ssl_protocols=TLSv1.2, TLSv1.3 to ssl_protocols=TLSv1, TLSv1.1 and then restart the XRDP service. Nothing changes, the same error still happens and the situation of XRDP service is the same!
Something is not right here, maybe I did something missing or was wrongly configured?

Related

Redis Server Command Line

I installed Redis server on ubuntu 20.04 with this article step by step. After setting password and other configuration, I run sudo systemctl restart redis.service but changes not be applied. Also, while Redis server was running, I got status with this command sudo systemctl status redis and It said me below message:
What's the problem?!
I searched a lot and found that I should use below commands (using systemctl or service):
with systemctl:
sudo systemctl start redis-server.service to start Redis server
sudo systemctl status redis-server.service to get status of Redis server
sudo systemctl stop redis-server.service to stop Redis server
sudo systemctl restart redis-server.service to apply the changes of config file (sudo nano /etc/redis/redis.conf)
with service:
sudo service redis-server start to start Redis server
sudo service redis-server status to get status
active status:
stop status:
sudo service redis-server stop to stop Redis server
sudo service redis-server restart to apply the changes of config file (sudo nano /etc/redis/redis.conf)

Apache disabling mpm_prefork error: The following modules depend on mpm_prefork and need to be disabled first: php7.3

I have a 8GB droplet on digitalocean. We launched our site today and we got intense traffic, we have about 3000 concurrent users.
I tried to raise the amount of concurrent connections (with the advice of apache2buddy) but the suggested MaxRequestWorkers to be 482. Here is the file:
<IfModule mpm_prefork_module>
ServerLimit 482
StartServers 5
MinSpareServers 5
MaxSpareServers 10
MaxRequestWorkers 482
MaxConnectionsPerChild 0
</IfModule>
Apache2 uses mdm_prefork and we have read that it's better if we use mdm_worker.
So i tried to disable mdm_prefork, so that I can enable mdm_worker:
a2dismod mpm_prefork
And I got the following error:
ERROR: The following modules depend on mpm_prefork and need to be disabled first: php7.3
What do I have to do to enable mpm_worker?
I found the possible solution to resolve this on my ubuntu server, dont know whether you are running ubuntu as well on your side, but I feel that the steps that I have taken will be the same for almost all distros with change in 1 step where you need to install a new package and the command for that may change based on the distro that you are using.
so the first step is
$ sudo a2dismod php7.3 mpm_prefork
This will disable the prefork module but before that it will disable the php7.3 module to stop the dependency error from occurring.
Next, we enable the worker module
$ sudo a2enmod mpm_worker
Now, the output would suggest that you restart the apache web-server. So, we do the same
$ sudo systemctl restart apache2
Now, if you go to check your website homepage, it may either throw an error or may load a blank page.
So, how do we resolve that; I scoured multiple community forums and found a solution related to the same but it was for freebsd platform so tried the same on ubuntu with some tweaks required to be made on ubuntu side for the steps to work.
The Solution based on ubuntu OS :
First of all, we enable the proxy, proxy_fcgi and setenvif module followed with a php-fpm package installation corresponding to your php version
$ sudo a2enmod proxy
$ sudo a2enmod proxy_fcgi
$ sudo a2enmod setenvif
$ sudo apt-get install php7.3-fpm -y
the php7.3-fpm installation command is the one where you may need to check the installation steps based on the Distro you are using.
Once, php-fpm service is installed you need to make sure that it gets enabled and then start it, so for that
$ sudo a2enconf php7.3-fpm
$ sudo systemctl enable php7.3-fpm.service
$ sudo systemctl start php7.3-fpm.service
Once, the php-fpm service starts successfully, just restart apache service to make sure all the made changes take effect properly
$ sudo systemctl restart apache2
After these steps are taken, please check/refresh your website homepage and the error page or the blank page will change to the proper website page.
The End-Result; your website has shifted from using prefork module to worker module to handle requests.
Also, if you want to switch to event module instead of worker module; just enable event module in place of worker module in the second step; the one that you will take after disabling php7.3 and prefork module
replace
$ sudo a2enmod mpm_worker
with
$ sudo a2enmod mpm_event
rest all steps after that remain the same irrespective of enabling worker or event module.
These steps helped me switch from prefork module to worker module on my server so hoping it may help you as well as help others who stumble on this issue.

VMware Player-15 install vmware tools

Installed a new vmware player 15.5.1 on win10 pro, using guest linux/unbuntu 18.04 server
Trying to get to install the vmware tools (not sure what options I may have selected when I installed the work station). But the install vmware tools menu is disabled. When I run my VM get the re-install menu that too is disabled.
Tried manual install of vmware tools - but that also did not do the trick:
apt-get install open-vm-tools
apt-get install open-vm-tools-desktapop
systemctl status open-vm-tools
sudo shutdown -r now
ps | grep vmtoolsd
How do I fix this. (just start over with fresh install and all that or try use some other player (!?))
I did not get any response here and could not figure it out - tried many options. (same problem with VirtualBox)
But the good news, at least from cut-n-paste perspective- use alternate client. You can use ssh to login into the machine using your favorite tool - putty or even cmd will work. This actually is a better solution - no need to muck with mouse capture and all that.
So just setup a ssh server
sudo apt update
sudo apt install openssh-server
sudo systemctl status ssh
Active: active (running)
Open firewall
sudo ufw allow ssh
Check IP address
ip a
SSH in with PUtty or Cmd or ..
ssh username#ip_address
You are Done - will work like a charm
Note: This ssh works only from local host as the VM only has Pvt IP. If you can create public IP on VM (that is another arduous adventure - still working on it) - you will be able to remote ssh

Cannot connect to SQL Server Instance anymore after enabling UFW on Ubuntu 16.04 with webmin already installed

I enabled UFW on a ubuntu server setup by someone else following the documentation on digitalocean. This server already had virtualmin/webmin installed.
Enabling the UFW had no effect on traffic with only OpenSSH allowed, and defaults set to incoming (deny), outgoing (allow). I was still able to visit the website even when Apache as not added to the UFW rule.
I had to reboot the server to see if the UFW will kick in, but the status of the firewall was "inactive" and now I cannot connect to the SQL Server Instance via the application or SSMS even after disabling the firewall.
The application has been down for hours, the world is on my neck and am almost at the end of my rope.
Going on guesswork here after multiple comments.
Sounds like you have updated the version of mssql-server but haven't updated the msodbcsql17 package. The latest CU needs the latest version of msodbcsql17 (unsure why, but not having it installed causes the connection failures).
Firstly update your packages:
sudo apt update
Then install the latest version of msodbcsql17:
sudo apt install msodbcsql17
This should install version 17.4.2.1-1.
If this, for some reason fails. You could roll back the update to mssql-server:
sudo apt install mssql-server=14.0.3223.3-15

MongoDB couldn't start because have error

I recently installed mongodb on my vps, but it returned an error for me:
Jan 31 01:35:47 servidor-1 mongod[6960]: Error reading config file: No
such file or directory Jan 31 01:35:47 servidor-1 mongod[6960]: try
'/usr/bin/mongod --help' for more information
service mongodb status
I'm using Ubuntu 18.04
Please do check or create this file.
/etc/systemd/system/mongodb.service
It specifies the location of the configuration file. It should either be /etc/mongodb.conf or /etc/mongod.conf depending on your machine.
#Unit contains the dependencies to be satisfied before the service is started.
[Unit]
Description=MongoDB Database
After=network.target
Documentation=https://docs.mongodb.org/manual
# Service tells systemd, how the service should be started.
# Key `User` specifies that the server will run under the mongodb user and
# `ExecStart` defines the startup command for MongoDB server.
[Service]
User=mongodb
Group=mongodb
ExecStart=/usr/bin/mongod --quiet --config /etc/mongodb.conf
# Install tells systemd when the service should be automatically started.
# `multi-user.target` means the server will be automatically started during boot.
[Install]
WantedBy=multi-user.target
After this run basic commands to check.
sudo systemctl enable mongodb.service
sudo systemctl start mongodb
sudo systemctl stop mongodb
sudo systemctl status mongodb
sudo systemctl restart mongodb

Resources