2017-07-23 23:22:56 -07:00
<!DOCTYPE html>
<!-- [if IE 8]><html class="no - js lt - ie9" lang="en" > <![endif] -->
<!-- [if gt IE 8]><! --> < html class = "no-js" lang = "en" > <!-- <![endif] -->
< head >
< meta charset = "utf-8" >
< meta http-equiv = "X-UA-Compatible" content = "IE=edge" >
< meta name = "viewport" content = "width=device-width, initial-scale=1.0" >
< link rel = "shortcut icon" href = "../img/favicon.ico" >
< title > Misc Tips, Trouble Shooting - Trent Docs< / title >
< link href = 'https://fonts.googleapis.com/css?family=Lato:400,700|Roboto+Slab:400,700|Inconsolata:400,700' rel = 'stylesheet' type = 'text/css' >
< link rel = "stylesheet" href = "../css/theme.css" type = "text/css" / >
< link rel = "stylesheet" href = "../css/theme_extra.css" type = "text/css" / >
< link rel = "stylesheet" href = "../css/highlight.css" >
< script >
// Current page data
var mkdocs_page_name = "Misc Tips, Trouble Shooting";
var mkdocs_page_input_path = "misc_tips_troubleshooting.md";
var mkdocs_page_url = "/misc_tips_troubleshooting/";
< / script >
< script src = "../js/jquery-2.1.1.min.js" > < / script >
< script src = "../js/modernizr-2.8.3.min.js" > < / script >
< script type = "text/javascript" src = "../js/highlight.pack.js" > < / script >
< / head >
< body class = "wy-body-for-nav" role = "document" >
< div class = "wy-grid-for-nav" >
< nav data-toggle = "wy-nav-shift" class = "wy-nav-side stickynav" >
< div class = "wy-side-nav-search" >
< a href = ".." class = "icon icon-home" > Trent Docs< / a >
< div role = "search" >
< form id = "rtd-search-form" class = "wy-form" action = "../search.html" method = "get" >
< input type = "text" name = "q" placeholder = "Search docs" / >
< / form >
< / div >
< / div >
< div class = "wy-menu wy-menu-vertical" data-spy = "affix" role = "navigation" aria-label = "main navigation" >
< ul class = "current" >
< li class = "toctree-l1" >
< a class = "" href = ".." > Home< / a >
< / li >
< li class = "toctree-l1" >
< a class = "" href = "../apt_pinning_artful_aardvark_packages_in_xenial_xerus/" > Apt Pinning Artful Aardvark Packages in Xenial Xerus< / a >
< / li >
< li class = "toctree-l1" >
< a class = "" href = "../lxd_container_home_server_networking_for_dummies/" > LXD Container Home Server Networking For Dummies< / a >
< / li >
< li class = "toctree-l1" >
2018-02-05 17:40:06 -08:00
< a class = "" href = "../lxd_container_foo/" > LXD Container Foo< / a >
< / li >
< li class = "toctree-l1" >
2017-07-23 23:22:56 -07:00
< a class = "" href = "../how_to_reassign_a_static_ip_address_with_dnsmasq/" > How To Reassign A Static Ip Address with dnsmasq< / a >
< / li >
< li class = "toctree-l1" >
< a class = "" href = "../serve_and_share_apps_from_your_phone_with_fdroid/" > Serve And Share Apps From Your Phone With Fdroid< / a >
< / li >
< li class = "toctree-l1" >
< a class = "" href = "../nspawn/" > Nspawn< / a >
< / li >
< li class = "toctree-l1" >
2017-07-29 10:20:59 -07:00
< a class = "" href = "../gentoo_lxd_container/" > Gentoo LXD Container< / a >
< / li >
< li class = "toctree-l1" >
2017-07-23 23:22:56 -07:00
< a class = "" href = "../mastodon_on_arch/" > Mastodon on Arch< / a >
< / li >
< li class = "toctree-l1" >
< a class = "" href = "../debian_nspawn_container_on_arch_for_testing_apache_configurations/" > Debian Nspawn Container On Arch For Testing Apache Configurations< / a >
< / li >
< li class = "toctree-l1" >
< a class = "" href = "../dynamic_cacheing_nginx_reverse_proxy_for_pacman/" > Dynamic Cacheing Nginx Reverse Proxy For Pacman< / a >
< / li >
< li class = "toctree-l1" >
< a class = "" href = "../freebsd_jails_on_freenas/" > FreeBSD Jails on FreeNAS< / a >
< / li >
< li class = "toctree-l1" >
< a class = "" href = "../arch_redis_nspawn/" > Quick Dirty Redis Nspawn Container on Arch Linux< / a >
< / li >
< li class = "toctree-l1" >
< a class = "" href = "../arch_postgresql_nspawn/" > Quick Dirty Postgresql Nspawn Container on Arch Linux< / a >
< / li >
< li class = "toctree-l1 current" >
< a class = "current" href = "./" > Misc Tips, Trouble Shooting< / a >
< ul class = "subnav" >
< li class = "toctree-l2" > < a href = "#misc-tips-troubleshooting" > Misc Tips, TroubleShooting< / a > < / li >
< ul >
< li > < a class = "toctree-l3" href = "#sending-commands-to-lxd-containers" > Sending commands to LXD containers< / a > < / li >
2017-07-26 09:30:44 -07:00
< li > < a class = "toctree-l3" href = "#move-lxd-container-to-another-server" > Move LXD container to another Server< / a > < / li >
2018-01-28 12:19:18 -08:00
< li > < a class = "toctree-l3" href = "#ubuntu-mate-welcome-center-doesnt-work-for-some-repos" > Ubuntu-Mate-Welcome-Center doesn't work for some repos< / a > < / li >
2017-07-23 23:22:56 -07:00
2017-08-15 16:30:55 -07:00
< li > < a class = "toctree-l3" href = "#quitting-mosh" > Quitting Mosh< / a > < / li >
2017-08-21 04:44:56 -07:00
< li > < a class = "toctree-l3" href = "#updating-caddy-server" > Updating Caddy Server< / a > < / li >
2017-09-07 09:50:46 -07:00
< li > < a class = "toctree-l3" href = "#zfs-disc-error-disc-identification" > ZFS Disc Error Disc Identification< / a > < / li >
2018-01-16 03:44:40 -08:00
< li > < a class = "toctree-l3" href = "#byobutmux-copy-mode" > Byobu/Tmux copy mode< / a > < / li >
2017-07-23 23:22:56 -07:00
< / ul >
< / ul >
< / li >
< li class = "toctree-l1" >
< a class = "" href = "../self_signed_certs/" > Self Signed Certs< / a >
< / li >
2017-12-13 16:53:41 -08:00
< li class = "toctree-l1" >
< a class = "" href = "../selfoss_on_centos7/" > Selfoss on Centos7< / a >
< / li >
2018-02-09 21:11:03 -08:00
< li class = "toctree-l1" >
< a class = "" href = "../stupid_package_manager_tricks/" > Stupid Package Manager Tricks< / a >
< / li >
2018-02-10 23:31:16 -08:00
< li class = "toctree-l1" >
< a class = "" href = "../stupid_kvm_tricks/" > Stupid KVM Tricks< / a >
< / li >
2017-07-23 23:22:56 -07:00
< / ul >
< / div >
< / nav >
< section data-toggle = "wy-nav-shift" class = "wy-nav-content-wrap" >
< nav class = "wy-nav-top" role = "navigation" aria-label = "top navigation" >
< i data-toggle = "wy-nav-top" class = "fa fa-bars" > < / i >
< a href = ".." > Trent Docs< / a >
< / nav >
< div class = "wy-nav-content" >
< div class = "rst-content" >
< div role = "navigation" aria-label = "breadcrumbs navigation" >
< ul class = "wy-breadcrumbs" >
< li > < a href = ".." > Docs< / a > » < / li >
< li > Misc Tips, Trouble Shooting< / li >
< li class = "wy-breadcrumbs-aside" >
< / li >
< / ul >
< hr / >
< / div >
< div role = "main" >
< div class = "section" >
< h1 id = "misc-tips-troubleshooting" > Misc Tips, TroubleShooting< / h1 >
< h2 id = "sending-commands-to-lxd-containers" > Sending commands to LXD containers< / h2 >
< p > Use < code > bash -c "< command> "< / code > for commands with wildcards. i.e.< / p >
< pre > < code class = "bash" > for machine in $(lxc list | grep RUNNING | awk '{print $2}') ;\
do lxc exec " ${machine}" -- bash -c " cat /etc/apt/apt.conf.d/02*" ; done
< / code > < / pre >
2017-07-23 23:46:00 -07:00
< p > fish shell is actually a little bit cleaner< / p >
< pre > < code class = "fish" > for machine in (lxc list | grep RUNNING | awk '{print $2}') ; \
lxc exec $machine -- bash -c " cat /etc/apt/apt.conf.d/02*" ; end
< / code > < / pre >
< pre > < code class = "fish" > # change all their time zones
for machine in (lxc list | grep RUNNING | awk '{print $2}') ; \
lxc exec $machine -- bash -c " timedatectl set-timezone America/Los_Angeles" ; end
# check to see if anyone is logged in before rebooting
for machine in (lxc list | grep RUNNING | awk '{print $2}') ; echo ; \
echo $machine ; lxc exec $machine -- bash -c " who" ; end
< / code > < / pre >
2017-07-26 09:30:44 -07:00
< h2 id = "move-lxd-container-to-another-server" > Move LXD container to another Server< / h2 >
< pre > < code class = "bash" > # stop the container
lxc stop < container name>
# publish image of container to local *storage*
lxc publish < container name> --alias < image name>
# export the new image to tarball
lxc image export < image name>
# scp tarball to other box
scp a4762b114fecee2e2bc227b9032405642c5286c02009babef7953e011e597bfe.tar.gz server:
# on other box import the image
lxc image import < tarball file name> --alias < image name>
# launch container
lxc launch < image name> < container name>
# assign profile to container
lxc profile assign < container name> < profile name>
< / code > < / pre >
< p > Shell into the new running container, update any network interface
configurations that you need to, and then restart the container.< / p >
< p > See also
< a href = "../lxd_container_home_server_networking_for_dummies/" > LXD Container Home Server Networking For Dummies< / a > < / p >
2018-01-28 12:19:18 -08:00
< h2 id = "ubuntu-mate-welcome-center-doesnt-work-for-some-repos" > Ubuntu-Mate-Welcome-Center doesn't work for some repos< / h2 >
2017-07-23 23:22:56 -07:00
< p > Perhaps your apt-cacher-ng proxy server isn't configured to allow
traffic through from https sources. Make sure the following is
uncommented. This applies for all PPA's that use https.< / p >
< pre > < code class = "conf" > # /etc/apt-cacher-ng/acng.conf
PassThroughPattern: .*
< / code > < / pre >
2017-08-15 16:30:55 -07:00
< h2 id = "quitting-mosh" > Quitting Mosh< / h2 >
< p > The key combination to quit mosh it < code > ctrl+6+.< / code >
Also, WTF?< / p >
2017-08-21 04:44:56 -07:00
< h2 id = "updating-caddy-server" > Updating Caddy Server< / h2 >
< p > You update Caddy Server with a new Go Binary, try to restart caddy.service, and it fails.
Maybe you get an error message such as the following < code > listen tcp :80: bind: permission denied< / code > and/or
< code > listen tcp :443: bind: permission denied< / code > .< br / >
Fix this error with the following command < code > sudo setcap CAP_NET_BIND_SERVICE=+eip /path/to/caddy< / code > < / p >
2017-09-07 09:50:46 -07:00
< h2 id = "zfs-disc-error-disc-identification" > ZFS Disc Error Disc Identification< / h2 >
< p > You created a zpool using /dev/disk-by-id to specify the devices, and now you want to figure out
which disks are causing you trouble. For instance, your system log, < code > journalctl | grep -i fail< / code >
shows read error on /dev/sdc. < / p >
< p > You can use < code > lsblk -o MODEL,SERIAL< / code > to match the information generated by < code > zpool status< / code > .< / p >
2018-01-16 03:44:40 -08:00
< h2 id = "byobutmux-copy-mode" > Byobu/Tmux copy mode< / h2 >
< ol >
< li >
< p > Enter Copy Mode < / p >
< ul >
< li > in byobu use key < code > F7< / code > < / li >
< li > in tmux use < code > < prefix> [< / code > < / li >
< / ul >
< / li >
< li >
< p > Navigate around less/copy buffer using < code > h,j,k,l< / code > < / p >
< / li >
< li >
< p > Select text< / p >
< ul >
< li > < code > < space> < / code > begins text selection< / li >
< li > move cursor around using < code > h,j,k,l< / code > < / li >
< li > < code > < enter> < / code > ends text selection< / li >
< / ul >
< / li >
< li >
< p > Paste selection in any tmux/byobu window< / p >
< ul >
< li > in byobu use < code > alt+insert< / code > < / li >
< li > in tmux use < code > < prefix> ]< / code > < / li >
< / ul >
< / li >
< / ol >
2017-07-23 23:22:56 -07:00
< / div >
< / div >
< footer >
< div class = "rst-footer-buttons" role = "navigation" aria-label = "footer navigation" >
< a href = "../self_signed_certs/" class = "btn btn-neutral float-right" title = "Self Signed Certs" > Next < span class = "icon icon-circle-arrow-right" > < / span > < / a >
< a href = "../arch_postgresql_nspawn/" class = "btn btn-neutral" title = "Quick Dirty Postgresql Nspawn Container on Arch Linux" > < span class = "icon icon-circle-arrow-left" > < / span > Previous< / a >
< / div >
< hr / >
< div role = "contentinfo" >
<!-- Copyright etc -->
< / div >
Built with < a href = "http://www.mkdocs.org" > MkDocs< / a > using a < a href = "https://github.com/snide/sphinx_rtd_theme" > theme< / a > provided by < a href = "https://readthedocs.org" > Read the Docs< / a > .
< / footer >
2017-12-13 16:53:41 -08:00
2017-07-23 23:22:56 -07:00
< / div >
< / div >
< / section >
2017-12-13 16:53:41 -08:00
2017-07-23 23:22:56 -07:00
< / div >
< div class = "rst-versions" role = "note" style = "cursor: pointer" >
< span class = "rst-current-version" data-toggle = "rst-current-version" >
< span > < a href = "../arch_postgresql_nspawn/" style = "color: #fcfcfc;" > « Previous< / a > < / span >
< span style = "margin-left: 15px" > < a href = "../self_signed_certs/" style = "color: #fcfcfc" > Next » < / a > < / span >
< / span >
< / div >
2017-12-13 16:53:41 -08:00
< script > var base _url = '..' ; < / script >
2017-07-23 23:22:56 -07:00
< script src = "../js/theme.js" > < / script >
2017-12-13 16:53:41 -08:00
< script src = "../search/require.js" > < / script >
< script src = "../search/search.js" > < / script >
2017-07-23 23:22:56 -07:00
< / body >
< / html >