Welcome to the PufferPanel community forums! If you need help please register an account and post in the Support category.

An unofficial FAQ/Tutorial



  • An unofficial FAQ/Tutorial:

    1. SFTP connection drops upon login

    This occurs due to the following reasons:

    a. PAM restriction

    Ensure /etc/shells contains /bin/false
    # echo /bin/false >> /etc/shells

    b. Incorrect permissions

    openssh's chroot requirements are rather strict.
    Ensure /home and individual homes are owned by root.
    # chown root:root /home; chown root:root /home/*
    Ensure permission modes are set correctly.
    # chmod 755 /home
    And do this for each <pp-XXXX>:
    e.g. # chmod 755 /home/pp-aeonia_c4avw

    Note: every file "inside" the various /home/pp-XXXX/ should be owned by their respective pp-XXXX user and 'scalesuser' group.
    e.g. # chown -R pp-aeonia_c4avw:scalesuser /home/pp-aeonia_c4avw/*

    c. The auto-deploy script failed to modify sshd_config

    Edit the file: /etc/ssh/sshd_config
    Scroll to the bottom and add this if it doesn't exist.

    Match group scalesuser
        ChrootDirectory %h
        X11Forwarding no
        AllowTcpForwarding no
        ForceCommand internal-sftp
    

    Then save and restart sshd:
    For ubuntu: # service ssh restart
    For centos:# service sshd restart

    2. Mapping ports to servers fails

    This assumes you've read and tried the following to no avail.

    https://scales.readme.io/docs/adding-additional-port-mappings

    We're going to destroy and recreate the docker container manually. :)

    This shouldn't destroy any files, but make a backup of your individual server directory anyway.

    First, let's get your docker container ID: # docker ps -a | grep pp-XXXX | cut -d" " -f1
    e.g. # docker ps -a | grep pp-aeonia_c4avw | cut -d" " -f1
    Let's destroy it: # docker rm <container-ID>
    e.g. # docker rm 558890b93776

    Now we need your servers UID: # cat /etc/passwd | grep pp-XXXX | cut -d: -f3
    e.g. # cat /etc/passwd | grep pp-aeonia_c4avw | cut -d: -f3
    In my case it's: 1010

    Now we recreate the docker container with the information we have:
    # docker create -it --name <pp-XXXX> -h docker -m <RAM>M --blkio-weight=500 -p <server-ip>:<server-port>:<server-port> -p <server-ip>:<server-port>:<server-port>/udp [ -p <external-ip>:<extra-port>:<extra-port> -p <external-ip>:<extra-port>:<extra-port>/udp | ... ] -u <UID> -v /home/<pp-XXXX>/public:/home/container pufferpanel/minecraft:latest

    For example...

    Say we have the following :

    Variable Value
    <pp-XXXX> pp-aeonia_c4avw
    <RAM> 6144
    <server-ip> 192.168.20.38
    <server-port> 25565
    <external-ip> 192.168.20.38
    <extra-port> 8192
    <UID> 1010

    We would run:
    # docker create -it --name pp-aeonia_c4avw -h docker -m 6144M --blkio-weight=500 -p 192.168.20.38:25565:25565 -p 192.168.20.38:25565:25565/udp -p 192.168.20.38:8192:8192 -p 192.168.20.38:8192:8192/udp -u 1010 -v /home/pp-aeonia_c4avw/public:/home/container pufferpanel/minecraft:latest

    For my particular setup for a server that BungeeCord will connect to, I have to use "172.17.0.1" for the <server-ip>, but make sure <external-ip> is your actual external IP:
    # docker create -it --name pp-aeonia_c4avw -h docker -m 6144M --blkio-weight=500 -p 172.17.0.1:25565:25565 -p 172.17.0.1:25565:25565/udp -p 192.168.20.38:8192:8192 -p 192.168.20.38:8192:8192/udp -u 1010 -v /home/pp-aeonia_c4avw/public:/home/container pufferpanel/minecraft:latest

    3. Switching away from OVH/SYS kernels

    As documented, some dedicated server companies such as OVH and SoYouStart provide a non-stock kernel that doesn't have needed features.

    For ubuntu on OVH/SYS:

    # sudo apt-get install linux-image-generic
    # sudo mv /boot/bzImage* /root/
    # sudo grub-mkconfig -o /boot/grub/grub.cfg
    # sudo reboot

    For Centos on OVH/SYS:

    # sudo yum install kernel
    # sudo mv /boot/bzImage* /root/
    # sudo grub-mkconfig -o /boot/grub/grub.cfg
    # sudo reboot

    If your server fails to boot for some strange reason, you can boot into "rescue-pro" mode and restore your old kernel from /root/ to /boot/ and re-run grub-mkconfig to re-add it to the bootloader.

    Thanks to Lord_Ralex on #pufferpanel on irc.esper.net for the information on how to recreate the docker containers.



  • :+1: Thanks for the useful content :).



  • I having problem when trying to run this command
    docker create -it --name pp-testbu_c7sol -h docker -m 2140M --blkio-weight=500 -p 10.240.0.2:25565:25565 -p 10.240.0.2:25565:25565/udp -p 10.240.0.2:8192:8192 -p 10.240.0.2:8192:8192/udp -u 210210 -v /home/pp-testbu_c7sol/public:/home/container pufferpanel/bungeecord:latest

    It appears that the docker could not find "pufferpanel/bungeecord:latest" or "pufferpanel/minecraft:latest" what should I replace it with or add into my system?



  • I'm not familiar with what causes that error, but unless you have a very strange system, I highly doubt that user's ID is 210210.



  • root@instance-3:~# cat /etc/passwd | grep pp-testbu_u9ydz | cut -d: -f3
    1004
    root@instance-3:~# docker ps -a | grep pp-testbu_u9ydz
    2076a310b359 pufferpanel/minecraft:latest "/bin/bash" About an hour ago Up 16 seconds 10.240.0.2:25565->25565/udp, 10.240.0.2:25565->25565/tcp pp-testbu_u9ydz
    root@instance-3:~# docker ps -a | grep pp-testbu_u9ydz
    2076a310b359 pufferpanel/minecraft:latest "/bin/bash" About an hour ago Exited (0) 34 seconds ago pp-testbu_u9ydz
    root@instance-3:~# docker ps -a | grep pp-testbu_u9ydz | cut -d" " -f1
    2076a310b359
    root@instance-3:~# docker rm 2076a310b359
    2076a310b359
    root@instance-3:~# cat /etc/passwd | grep 2076a310b359
    root@instance-3:~# cat /etc/passwd | grep 2076a310b359 | cut -d: -f3
    root@instance-3:~# docker create -it --name pp-testbu_u9ydz -h docker -m 2140M --blkio-weight=500 -p 10.240.0.2:25565:25565 -p 10.240.0.2:25565:25565/udp -p 10.240.0.2:8192:8192 -p 10.240.0.2:8192:8192/udp -u 1004 -v /home/ pp-testbu_u9ydz/public:/home/container pufferpanel/bungeecord:latest
    Unable to find image 'pp-testbu_u9ydz/public:/home/container:latest' locally
    repository name component must match "a-z0-9(?:[._]a-z0-9)*"
    root@instance-3:~#

    As you can see "Unable to find image error" . I tried with "minecraft:latest" and "bungeecord:latest". Is it I mess it up with the current directory?



  • @leang_97 said:

    docker create -it --name pp-testbu_u9ydz -h docker -m 2140M --blkio-weight=500 -p 10.240.0.2:25565:25565 -p 10.240.0.2:25565:25565/udp -p 10.240.0.2:8192:8192 -p 10.240.0.2:8192:8192/udp -u 1004 -v /home/ pp-testbu_u9ydz/public:/home/container pufferpanel/bungeecord:latest

    You have a space between /home/ and pp-testbu_u9ydz and pufferpanel/bungeecord:latest is wrong.

    This "should" work:
    # docker create -it --name pp-testbu_u9ydz -h docker -m 2140M --blkio-weight=500 -p 10.240.0.2:25565:25565 -p 10.240.0.2:25565:25565/udp -p 10.240.0.2:8192:8192 -p 10.240.0.2:8192:8192/udp -u 1004 -v /home/pp-testbu_u9ydz/public:/home/container pufferpanel/minecraft:latest



  • @piousminion

    It created a docker succesfully with that command BUT I got another error in pufferpanel and this is frustrating ....

    "Server is starting...

    Running server Pre-Flight, this might take a moment or two...

    [ERROR] An error occured while attempting to start this server. Please ask your systems administrator to look into this."



  • @leang_97 said:

    @piousminion

    It created a docker succesfully with that command BUT I got another error in pufferpanel and this is frustrating ....

    "Server is starting...

    Running server Pre-Flight, this might take a moment or two...

    [ERROR] An error occured while attempting to start this server. Please ask your systems administrator to look into this."

    BUt I will not give up and I will give it a try again ! I never say



  • Ensure that another container isn't mapping those same ports.



  • @piousminion
    OMG its working now.....waiting sunday before I make a maintenance to my main server at midnight. Seriously thx alot!!!! I love you @piousminion!



  • This post is deleted!

Log in to reply
 

1
Online

666
Users

708
Topics

3.2k
Posts

Looks like your connection to PufferPanel Community was lost, please wait while we try to reconnect.