Showing posts with label Issues. Show all posts
Showing posts with label Issues. Show all posts

Tuesday, March 24, 2020

How to change the Docker default bridge (docker0) network subnet?

You can configure the default bridge network by providing the bip option along with the desired subnet in the daemon.json (default location at /etc/docker/daemon.json on Linux) file as follows:
{
  "bip": "172.26.0.1/16"
}
Then restart the docker daemon:
sudo systemctl restart docker

Refer "https://docs.docker.com/network/bridge/" for more details.

Sunday, March 15, 2020

Connect to Tomcat Manager and Host Manager from a remote machine


For security reasons, Tomcat Manager and Tomcat Host Manager cannot be accessed over a public IP address. Both applications only work from localhost by default but you can allow remote connections by changing their configuration.

Connect to Tomcat Host Manager from a different remote machine
In order to allow remote connections to the Tomcat Host Manager, follow the instructions below:
  • Create the file$CATALINA_HOME/conf/Catalina/localhost/host-manager.xml with the following content:
    <Context privileged="true" antiResourceLocking="false"
            docBase="${catalina.home}/webapps/host-manager">
        <Valve className="org.apache.catalina.valves.RemoteAddrValve" allow="^.*$" />
    </Context>
  • Start Tomcat:
    $CATALINA_HOME/bin/startup.sh

Connect to Tomcat Manager from a different remote machine
 
In order to allow remote connections to the Tomcat Manager, follow the instructions below:
  • Create the file $CATALINA_HOME/conf/Catalina/localhost/manager.xml with the following content:
    <Context privileged="true" antiResourceLocking="false"
            docBase="${catalina.home}/webapps/manager">
        <Valve className="org.apache.catalina.valves.RemoteAddrValve" allow="^.*$" />
    </Context>
  • Start Tomcat:
    $CATALINA_HOME/bin/startup.sh

ModuleNotFoundError: No module named 'base64'

Error:

└─> $  sudo dnf update
Traceback (most recent call last):
  File "/bin/dnf", line 57, in <module>
    from dnf.cli import main
  File "/usr/lib/python3.6/site-packages/dnf/__init__.py", line 23, in <module>
    import dnf.pycomp
  File "/usr/lib/python3.6/site-packages/dnf/pycomp.py", line 23, in <module>
    import base64
ModuleNotFoundError: No module named 'base64'


Solution:

Download the base64.py from the "https://github.com/python/cpython/blob/3.8/Lib/base64.py" and copied it into the /usr/lib64/python3.6/".

Thursday, December 19, 2019

Install missingnet-tools (fconfig, netstat, dig, hostname, route, arp, iptunnel) on Linux

Ubuntu:
sudo apt install net-tools -y

CentOS/RHEL:
sudo yum install net-tools -y

Enable Internet on CentOS 7 Minimal ISO Image on VirtualBox

Add the below entries to /etc/sysconfig/network-scripts/ifcfg-enp0s3 and restart the VM.

DNS1=8.8.8.8
DNS2=8.8.4.4
# Bydefault it is 'no'
ONBOOT=yes 

Sunday, October 13, 2019

DOCKER - Cannot create an item in a locked collection

Error:
 
** Message: 22:08:41.658: Remote error from secret service: org.freedesktop.Secret.Error.IsLocked: Cannot create an item in a locked collection
Error saving credentials: error storing credentials - err: exit status 1, out: `Cannot create an item in a locked collection`


Solution:
sudo apt install gnupg2 pass

Sunday, September 29, 2019

[DEPRECATION WARNING]: Invoking "pip" only once while using a loop via squash_actions is deprecated.

[DEPRECATION WARNING]: Invoking "pip" only once while using a loop via squash_actions is deprecated. Instead of using a loop to supply
multiple items and specifying `name: "{{ item }}"`, please use `name: '{{ pip_pkgs }}'` and remove the loop. This feature will be
removed in version 2.11. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.


I was trying to install the Python Packages suing the with_items with Ansible-2.8 version, but as per the above  this feature will be deprecatated from Ansible-2.11.

- name: "Ansible PIP {{ state }}: {{ pip_pkgs }}"
  become: yes
  pip:
    name: "{{ item }}"
    state: "{{ state }}"

  with_items: "{{ pip_pkgs }}"
 later, I have updated the code like below and after the changes "DEPRECATION WARNING" not showed in execution.
- name: "Ansible PIP {{ state }}: {{ pip_pkgs }}"
  become: yes
  pip:
    name: "{{ pip_pkgs }}"
    state: "{{ state }}"

 


 

modprobe: FATAL: Module aufs not found /lib/modules/4.4.0-36-generic

modprobe: FATAL: Module aufs not found /lib/modules/4.4.0-36-generic
+ sh -c 'sleep 3; yum -y -q install docker-engine'
<Snip>

If you would like to use Docker as a non-root user, you should now consider adding your user to the "docker" group with something like:

sudo usermod -aG docker your-user

Remember that you will have to log out and back in...

Sunday, July 28, 2019

libssl.so.1.0.0: cannot open shared object file:

Issue: while starting apache will through below error

load modules/mod_ssl.so into server: libssl.so.1.0.0: cannot open shared object file: No such file or directory

Solution:

Since OpenSSL is installed on custom directory  (/usr/local/ssl) ,

Copy /u01/openssl-1.0.2g/libcrypto.so.1.0.0 & libssl.so.1.0.0  to /usr/lib64/
Create symbolic link
    # ln -s libssl.so.1.0.0 libssl.so
    # ln -s libcrypto.so.1.0.0 libcrypto.so
Test using ldd

# ldd mod_ssl.so

linux-vdso.so.1 =>  (0x00007fff5c39b000)
libssl.so.1.0.0 => /lib64/libssl.so.1.0.0 (0x00007f5ef492d000)
libcrypto.so.1.0.0 => /lib64/libcrypto.so.1.0.0 (0x00007f5ef44f7000)
librt.so.1 => /lib64/librt.so.1 (0x00007f5ef42ee000)
libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007f5ef40b7000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f5ef3e9a000)
libc.so.6 => /lib64/libc.so.6 (0x00007f5ef3b05000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f5ef3901000)
/lib64/ld-linux-x86-64.so.2 (0x0000003a23e00000)
libfreebl3.so => /lib64/libfreebl3.so (0x00007f5ef36fe000)

Start the apache httpd server now.

checking whether to enable mod_ssl... configure: error: mod_ssl has been requested but cannot be built due to prerequisite failures

I am getting the below error while installing the Apache with SSL Module.

Issue:

checking whether to enable mod_slotmem_shm... shared (all)
checking whether to enable mod_slotmem_plain... shared (all)
checking whether to enable mod_ssl... checking dependencies
checking for OpenSSL... checking for user-provided OpenSSL base directory... none
checking for OpenSSL version >= 0.9.8a... FAILED

configure: WARNING: OpenSSL version is too old 
no
checking whether to enable mod_ssl... configure: error: mod_ssl has been requested but cannot be built due to prerequisite failures 

Solution: Upgrade OPEN SSL

Download the updated version of OpenSSL Unzip and run

$ mv /usr/bin/openssl /usr/bin/openssl_bkp
$ env LDFLAGS="-ldl" 

$ ./config -fPIC --prefix=/usr/local --openssldir=/usr/local/ssl shared

$ make depend
$ make
$ make test

$ make install

Reinstall Apache again


While running (configure) rm: cannot remove `libtoolT'

Issue: while running (configure) rm: cannot remove `libtoolT'

Solution:   

Edit your configure file

Change the line

$RM "$cfgfile"

to

$RM -f "$cfgfile"

This will resolve the error

rm: cannot remove `libtoolT': No such file or directory

Then try run configure.