Beiträge von tom_tav

    Is there a possibility to disable the annoying "Leave Page" Javascript Dialog?


    It blocks the closure of the browser which is quite annoying sometimes (cancels system shutdown on client)

    On my Backup Box which runs since months there is a new problem with one client. Neither the OMV machine (1.19) nor the OS X (10.9.x) client got changed, no major upgrades.


    Sometimes, and only sometimes the TS backup fails with the following error:


    Code
    The network backup disk does not support the required AFP feature



    In the afp logs there are just the usual (dsi_stream) errors (which are a feature of the old netatalk 2.2 afaik):




    Its on Ethernet, so no wifi issues.



    Any ideas?

    Btw. there is a bug in the start-stop-daemon / init scripts. If you have running lets say sshd on the host and inside the container you have also sshd running - "service sshd stop" on the host will stop also the sshd inside the container. This is because the pid is not handled by the init scripts and so a host init script kills all instances, even those inside containers (the container instances are also in the host ps list). Bug is known since 2011 (maybe before) and still unfixed ... bummer


    p.s. used sshd just for example, didnt check if the bug affects this service

    While playing around with LXC i discovered the following bug in the Network Gui (Tab Interfaces):


    Bridge works fine:



    when i start the first lxc container it still works:


    Code
    vethOdrHYA Link encap:Ethernet  HWaddr deleted
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:1494 errors:0 dropped:0 overruns:0 frame:0
              TX packets:191366 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:652809 (637.5 KiB)  TX bytes:20474688 (19.5 MiB)


    but when i start another one:


    Code
    vethY1e0UR Link encap:Ethernet  HWaddr deleted
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:11 errors:0 dropped:0 overruns:0 frame:0
              TX packets:5 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:1100 (1.0 KiB)  TX bytes:683 (683.0 B)


    i get the following error:


    Nobody? :(


    Getting close. Transmission running under own ip in lxc container. Downloaddirs shared with OMV. Config too.


    Still need to find out how the plugin handles the starting/reloading/stopping of transmission and how it gets the data for the "Torrents" Tab

    Want to try to put transmission inside lxc container for ip seperation & traffic shaping.


    One question:


    How does the Bittorren plugin update the transmission settings? Does it stop transmission, write into the settings.json file and start transmission again? (Imho no).


    Or via Api? If so does it contact transmission via localhost or OMV Ip? Possible to change?


    I have an idea how it could be possible to use transmission in lxc with bittorent plugin. Need to experiment.


    Thanks!

    jaja i know ;) im already happy that i did note the steps this night so i could post this. And as you can see, my bad habits to do that stuff as root user ... LOL


    If there will be a howto section here i promise to make it more presentable :)


    Next project will be Transmission inside LXC (for own ip to do better traffic shaping)

    PlexConnect & Apple TV need to have ports 80 & 443. Instead of using port redirection i opted to do this via LXC container.


    Heres a HowTo for OMV 1.19+. Please note that im using static DHCP mappings, you have to change the network sections if you want to use manual IP. And its a plain config, so if needed please take care to harden your LXC container (iptables, ssh and so on).


    Word of wisdom: you shouldnt do that like me as root, use sudo instead ;)


    ----


    # prepare Network for lxc:


    # edit /etc/network/interfaces (example for ipv4 & dhcp static lease only, adjust if needed)


    --- snip ---
    # The primary network interface
    #allow-hotplug eth0
    #iface eth0 inet dhcp
    auto eth0
    iface eth0 inet manual
    #iface eth0 inet6 manual


    auto br0
    iface br0 inet dhcp
    bridge_ports eth0
    bridge_fd 0
    bridge_maxwait 0
    #bridge_hello 0
    #bridge_maxage 0
    #bridge_stp off
    --- snap ---


    # restart network


    service network restart


    # check network settings


    ifconfig


    # lxc install


    # Install required packages


    apt-get install lxc


    # Install optional packages


    apt-get install bridge-utils libvirt-bin debootstrap


    # edit /etc/fstab:


    --- snip ---
    cgroup /sys/fs/cgroup cgroup defaults 0 0
    --- snap ---


    # check fstab entry:


    mount /sys/fs/cgroup


    # check lxc config:


    lxc-checkconfig


    # The lxc-checkconfig program is reporting "Cgroup memory controller: missing". If you want memory control via cgroups then you need to recompile the linux kernel (or simply add cgroup_enable=memory to the kernel command line on jessie or later).

    # Template installation (the Templates included in Wheezy dont work):


    wget https://github.com/simonvander…debian-wheezy-robvdhoeven -O /usr/share/lxc/templates/lxc-debian-wheezy
    chown root:root /usr/share/lxc/templates/lxc-debian-wheezy
    chmod +x /usr/share/lxc/templates/lxc-debian-wheezy


    # create Plexconnect container


    lxc-create -n plexconnect -t debian-wheezy


    # edit /var/lib/lxc/plexconnect/config


    --- snip ---
    lxc.utsname = plexconnect
    lxc.network.type = veth
    lxc.network.flags = up
    lxc.network.link = br0
    lxc.network.hwaddr = xx:xx:xx:xx:xx:xx # {mac address for container}
    # if not using static dhcp leases you will need this sections too:
    #lxc.network.ipv4 = xxx.xxx.xxx.xxx/xx # {ip address for plexconnect container / netmask }
    #lxc.network.ipv4.gateway = xxx.xxx.xxx.xxx # {ip address of gateway }
    --- snap ---



    # start container
    lxc-start -n plexconnect -d


    # container status
    lxc-info -n plexconnect


    # make plexconnect container autostart


    ln -s /var/lib/lxc/plexconnect/config /etc/lxc/auto/plexconnect


    # login to container
    lxc-console -n plexconnect


    # from here everything is done inside the plexconnect container


    # login as root/root


    # change root password
    pwd root


    # edit /etc/network/interfaces (example for dhcp static lease, change for manual ip if needed)


    --- snip ---
    auto lo
    iface lo inet loopback


    auto eth0
    iface eth0 inet dhcp
    --- snap ---


    # restart network
    service networking restart


    # check network config
    ifconfig


    # install python & git


    apt-get install python git


    # install plexconnect


    cd /opt
    git clone https://github.com/iBaa/PlexConnect.git


    # create certificate for ATV


    cd /opt/PlexConnect/
    cd assets/certificates/
    openssl req -new -nodes -newkey rsa:2048 -out trailers.pem -keyout trailers.key -x509 -days 7300 -subj "/C=US/CN=trailers.apple.com"
    openssl x509 -in trailers.pem -outform der -out trailers.cer && cat trailers.key >> trailers.pem


    # start PlexConnect to create basic settings


    ./PlexConnect.py


    <Ctrl-C>


    # edit /opt/PlexConnect/Settings.cfg
    # for more info: https://github.com/iBaa/PlexCo…d-use-and-troubleshooting


    --- snip ---
    ip_pms = xxx.xxx.xxx.xxx # {IP of Plex Host = OMV IP}
    enable_plexgdm = False


    --- snap ---


    # start PlexConnect


    ./PlexConnect_daemon.bash start
    ./PlexConnect_daemon.bash status


    # for ATV configuration see https://github.com/iBaa/PlexConnect/wiki/Install-Guide


    # stop PlexConnect
    ./PlexConnect_daemon.bash stop


    # Create Auto Startup File for PlexConnect


    # edit /etc/init.d/plexconnect


    --- snip ---


    --- snap ---


    chmod +x /etc/init.d/plexconnect


    update-rc.d plexconnect defaults


    # start plexconnect


    /etc/init.d/plexconnect start


    -----


    Have Fun!


    Btw. it was my first experience with LXC, maybe there is room for improvement ;)