Join the community today
Become a Member

Redis Tried to reinstall redis - server not working anymore, need fast help.

Discussion in 'Other Centmin Mod Installed software' started by hazehs, Aug 12, 2020.

  1. hazehs

    hazehs New Member

    25
    1
    3
    Jul 18, 2020
    Ratings:
    +5
    Local Time:
    1:46 AM
    NGINX 1.18
    MariaDB 10.4
    Please fill in any relevant information that applies to you:
    • CentOS Version: CentOS 7 64 BIt
    • Centmin Mod Version Installed:123.09beta01
    • Nginx Version Installed: 1.9.2
    • PHP Version Installed: 7.4.9
    • MariaDB MySQL Version Installed: 10.3
    • When was last time updated Centmin Mod code base ?
      today

    • Persistent Config: Do you have any persistent config file options set in /etc/centminmod/custom_config.inc ? You can check via this command:
      Code (Text):
      cat /etc/centminmod/custom_config.inc
      

      Post output in CODE tags.


    Hello,

    ive tried to reinstall redis. Done with yum history, yum undo 69.
    after that i installed like its on github.
    Code:
    yum -y install redis --enablerepo=remi --disableplugin=priorities
    sed -i 's|LimitNOFILE=.*|LimitNOFILE=262144|' /etc/systemd/system/redis.service.d/limit.conf
    echo "d      /var/run/redis/         0755 redis redis" > /etc/tmpfiles.d/redis.conf
    mkdir -p /var/run/redis
    chown redis:redis /var/run/redis
    chmod 755 /var/run/redis
    systemctl daemon-reload
    systemctl start redis
    systemctl enable redis
    echo "vm.overcommit_memory = 1" >> /etc/sysctl.conf
    echo never > /sys/kernel/mm/transparent_hugepage/enabled
    echo "echo never > /sys/kernel/mm/transparent_hugepage/enabled" >> /etc/rc.local
    sysctl -p
    then i tried to restart the server, cant connect.
    Going through Hosting VNC Console and try systemctl daemon reload following error:
    [​IMG]

    I think there is a problem because the redis.conf but im not sure and dont want to destory more the server....
    Before removing redis, ive installed it with the github installer also and create it with multi cache 2

    Hope someone can help me.
     
  2. eva2000

    eva2000 Administrator Staff Member

    45,459
    10,315
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,000
    Local Time:
    11:46 AM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    manual instructions are outdated compared to redis installer on github at centminmod/centminmod-redis so /etc/tmpfiles.d/redis.conf is no longer used and other changes have been made - commit history at centminmod/centminmod-redis and outlined changes for redis 6.x at centminmod/centminmod-redis

    also what's contents of /etc/fstab by posting output for this command
    Code (Text):
    cat /etc/fstab

    for posting code or output from commands to keep the formatting, you might want to use CODE tags for code How to use forum BBCODE code tags :)

    centmin mod redis installer and redis-generator.sh are provided as is without support generally.

    But if you created 2 separate standalone redis servers with ondisk persistence disabled via
    Code (Text):
    ./redis-generator.sh multi-cache 2
    

    to delete them just use delete command instead of totally removing redis server
    Code (Text):
    ./redis-generator.sh delete 2
    


    redis-generator.sh usage help as outlined at centminmod/centminmod-redis
    Code (Text):
    /redis-generator.sh
    
    * Usage: where X equal postive integer for number of redis
    servers to create with incrementing TCP redis ports
    starting at STARTPORT=6479.
    * prep - standalone prep command installs redis-cluster-tool
    * prepupdate - standalone prep update command updates redis-cluster-tool
    * multi X - no. of standalone redis instances to create
    * multi-cache X - no. of standalone redis instances + disable ondisk persistence
    * clusterprep X - no. of cluster enabled config instances
    * clustermake 6 - to enable cluster mode + create cluster
    * clustermake 9 - flag to enable cluster mode + create cluster
    * replication X - create redis replication
    * replication X 6579 - create replication with custom start port 6579
    * replication-cache X - create redis replication + disable ondisk persistence
    * replication-cache X 6579 - create replication with custom start port 6579
    * delete X - no. of redis instances to delete
    * delete X 6579 - no. of redis instances to delete + custom start port 6579
    
    ./redis-generator.sh prep
    ./redis-generator.sh prepupdate
    ./redis-generator.sh multi X
    ./redis-generator.sh multi-cache X
    ./redis-generator.sh clusterprep X
    ./redis-generator.sh clustermake 6
    ./redis-generator.sh clustermake 9
    ./redis-generator.sh replication X
    ./redis-generator.sh replication X 6579
    ./redis-generator.sh replication-cache X
    ./redis-generator.sh replication-cache X 6579
    ./redis-generator.sh delete X
    ./redis-generator.sh delete X 6579
    
     
  3. hazehs

    hazehs New Member

    25
    1
    3
    Jul 18, 2020
    Ratings:
    +5
    Local Time:
    1:46 AM
    NGINX 1.18
    MariaDB 10.4
    Thanks again for your fast response.
    I cant copy and paste via web browser vnc. So i need to provide screenshots - im sorry.
    Screenshot at 23:35:04.jpg

    Deleted the 2 redis instances sucesfully deleted the symlinks. needed to reinstall via yum redis.
    after deleted the 2 redis instances ive restarted the server. but still nothing seems to work.
    i think its a problem by csf. nginx started sucessfully when i type "systemctl status nginx".

    error from csf:
    https://imgur.com/HrJdyOB
     
  4. hazehs

    hazehs New Member

    25
    1
    3
    Jul 18, 2020
    Ratings:
    +5
    Local Time:
    1:46 AM
    NGINX 1.18
    MariaDB 10.4
    Okay, so my site is working now again. But csf is not starting.

    Do i need to reinstall csf ?
     
  5. eva2000

    eva2000 Administrator Staff Member

    45,459
    10,315
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,000
    Local Time:
    11:46 AM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    no don't reinstall csf

    need to figure out why csf isn't restarting - please don't use a reinstall as a way of fixing issues, as you can end up messing it up further. i.e. redis issues ! ;)

    the output for
    Code (Text):
    cat /etc/fstab
    

    is exactly same as screenshot or are you missing some lines in screenshot ?

    for redis restart issue probably causing server reboot issue too in that /etc/tmpfiles.d/redis.conf is no longer required
    Code (Text):
    rm -f /etc/tmpfiles.d/redis.conf
    systemctl daemon-reload
    systemctl start redis
    systemctl enable redis
    


    csf error suggests to remove the file at /etc/csf/csf.error right ? so try removing it and restarting csf firewall
    Code (Text):
    rm -f /etc/csf/csf.error
    csf -ra
    
     
  6. hazehs

    hazehs New Member

    25
    1
    3
    Jul 18, 2020
    Ratings:
    +5
    Local Time:
    1:46 AM
    NGINX 1.18
    MariaDB 10.4
    Hello,
    ive rebooted the server and can connect via ssh, dont know why.
    it is exactly as the screenshot:
    Code:
    #
    # /etc/fstab
    # Created by anaconda on Wed Jul 29 22:26:44 2020
    #
    # Accessible filesystems, by reference, are maintained under '/dev/disk'
    # See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
    #
    /dev/mapper/vg-root     /                       ext4    discard,noatime 1 1
    UUID=39c57fb2-5222-4b9d-86ae-01666ae387e7 /boot                   ext2    defaults        1 2
    /dev/mapper/vg-tmp      /tmp                    ext4    discard,noatime 1 2
    /dev/mapper/vg-swap     swap                    swap    defaults        0 0
    /home/usertmp_donotdelete /tmp ext4 loop,rw,noexec,nosuid 0 0
    
    Ive disabled IPv6 via Grub because there come some errors in xenforo. since i removed ipv6 completely there no errors anymore. so because there where some errors cause ipv6 i have disabled it to in csf.

    I also stop working with redis right now. Ive got to many problems with it and the configuration.

    Thank you!
    Ive tried csf -r but that not worked.
    csf -ra is working great!

    Im go reboot now the server and watch the console via vnc if there is still the fstab error.
     
  7. hazehs

    hazehs New Member

    25
    1
    3
    Jul 18, 2020
    Ratings:
    +5
    Local Time:
    1:46 AM
    NGINX 1.18
    MariaDB 10.4
    So, at booting there is the error with duplicate entry in fstab.
    But i can only see this if im watching the console via vnc. So i dont know if this error was before.

    After rbooting all services are running but i got 522 error from cloudflare.
     
  8. eva2000

    eva2000 Administrator Staff Member

    45,459
    10,315
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,000
    Local Time:
    11:46 AM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    is this the first time after installing Centmin Mod that you rebooted the server ? it maybe due to your /etc/fstab entry for
    Code (Text):
    /dev/mapper/vg-tmp      /tmp                    ext4    discard,noatime 1 2
    

    try putting a comment in front of it
    Code (Text):
    #/dev/mapper/vg-tmp      /tmp                    ext4    discard,noatime 1 2
    

    to disable it and then reboot server
     
  9. hazehs

    hazehs New Member

    25
    1
    3
    Jul 18, 2020
    Ratings:
    +5
    Local Time:
    1:46 AM
    NGINX 1.18
    MariaDB 10.4
    I just backuped my DB and FTP and gonna reinstall the complete system.

    i dont want a broken install or something else.
    But thanks for your help.

    No it wasnt the first time. i have rebooted the server severeal times.
    I go directly after centminmod install rebooting the system and then configure the vhost.
     
  10. eva2000

    eva2000 Administrator Staff Member

    45,459
    10,315
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,000
    Local Time:
    11:46 AM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    Ok I see but try the commented out /etc/fstab entry i suggested and do reboot just to confirm if that is the issue so you don't replicate the issue on reinstall
     
  11. hazehs

    hazehs New Member

    25
    1
    3
    Jul 18, 2020
    Ratings:
    +5
    Local Time:
    1:46 AM
    NGINX 1.18
    MariaDB 10.4
    hey @eva2000 ,

    after reinstalling and using redis with another config.php, updated the kernel from 3.1 to 5.8, disabling ipv6 completly, and dont using auditd the page seems to be 5 times faster.
    dont know why. maybe it is because the kernel. got an 2gb ram and 2 core kvm.

    regards.