@ wrote... (3 years, 9 months ago)

Here's how you can get Dropbox to run as a user service from systemd under Feodra. If you use a different distro that uses systemd the commands are probably the same but your mileage may vary.

For the most part I like systemd but good luck remembering all these commands in 6 months when you want to make another user service.

more…

Category: tech, Tags: fedora, linux
Comments: 2
@ wrote... (4 years, 9 months ago)

This is a quick and dirty config guide to setup git-http-backend with uwsgi from supervisord on nginx. I did this on Fedora 20 so on a different distro some paths will likely be different.

I've also ignored security in this post as I have ssl termination handled elsewhere. This will send your password in the clear if you don't have ssl setup correctly! Don't forget to setup git permissions as well. This config allows any authorized user (somebody who can login) to push.

more…

Category: tech, Tags: git, linux, nginx
Comments: 13
@ wrote... (4 years, 10 months ago)

OMG I HATE MY LIFE SOMETIMES

So… I'll hopefully write more about this later, but the TL;DR is do not use monitor.py and uwsgi.

So if you have something like this in your wsgi.py, comment it out with extreme prejudice.

import monitor
monitor.start(interval=60)

Symptoms include, but not limited to:

  • workers not shutting down
  • workers appear to hang and cause 50x errors
  • workers not restarting if you send appropriate signals
  • workers appear to work once or twice then hang
  • workers never work
  • randomness and non-determinism all over the f'in place
  • little to no helpful log output
  • propensity to start adding lots of config variables that you don't understand
  • propensity to start drinking
  • wondering htf everybody else seems to use this software without a problem
  • wondering if perhaps computers where a poor career choice after all

I haven't looked into too closely but I suspect the fact that the monitor opens up it's own thread and runs forever has something to do with it. Open files, open sockets, stuff like that.

Category: tech, Tags: django, linux, nginx
Comments: 0
@ wrote... (5 years, 8 months ago)

Depending on the hardware involved, you can dramatically speed up an ssh pipe by changing the encryption type, or turning off compression.

more…

Category: tech, Tags: linux, ssh
Comments: 0
@ wrote... (5 years, 11 months ago)

Edit: use ansible

I just started using puppet a few days ago and so far I'm really liking it. Except it's in Ruby and not Python. If puppet was written in python I would have just hacked up a new derived class. Oh well…

So my problem is that I want to distribute new id_rsa and id_rsa.pub files to my servers but I also want to be DRY. So therefore when I copy the id files over it should be possible to extract the public key and put it in authorized_keys.

This should have been significantly easier but here's how I did it.

more…

Category: tech, Tags: linux, puppet, ssh
Comments: 0
@ wrote... (6 years, 8 months ago)

I currently have a two disk raid1 array (2TB in size) that is the storage for my LVM but is running out of space. I want to add two more drives to bring available storage to 4TB but I also want to convert raid1 to raid10 to increase the performance of my storage. Here's how I did it.

more…

Category: tech, Tags: linux, lvm, raid
Comments: 2
@ wrote... (6 years, 10 months ago)

I was trying to get multicast working and all of the ancient howtos weren't helping.

Purely by accident I found the solution to the multicast “hello world” of pinging 224.0.0.1.

# setup the routes
ip route add 224.0.0.0/4 dev eth0

# try to ping the multicast aware hosts on your lan with 2 pings
ping -c 2 224.0.0.1
# 100% packet loss

# stop ignoring broadcasts
sudo echo 0 > /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts

# try to ping the multicast aware hosts on your lan with 2 pings
ping -c 2 224.0.0.1
# 100% packet success!

# make your change permanent
sudo echo "net.ipv4.icmp_echo_ignore_broadcasts = 0" >> /etc/sysctl.conf
Category: tech, Tags: linux, networking
Comments: 0
@ wrote... (7 years, 1 month ago)

If you use (or are trying to) the very excellent Roundcube but you keep getting the white screen of death, then here's something to try.

As a quick test, disable the curl extension in your /etc/php.ini

;extension = curl.so

and restart your webserver…

sudo service httpd restart

If that seems to solve the problem (you can see the login screen and not a whitescreen) then try the fix that worked for me. Move curl.so after imap.so.

extension=imap.so
extension=curl.so

Your mileage may vary.

Category: tech, Tags: linux
Comments: 0
@ wrote... (7 years, 5 months ago)

I have two Fedora 15 machines, they both authenticate using NIS and mount home directories via NFS. The first machine worked perfectly, the second did not. I could login via ssh (nis works) but all my file owners were nobody:users.

Anyhow, through much trial and error I learned about /etc/imapd.conf. So after booting my machine, if I restarted rpcidmapd and autofs then the file permissions were correct.

After much Googling I found this

Solution:

edit /etc/idmapd.conf
uncomment and edit Domain = <your nis domain>

If I had to guess, I think the NIS domain isn't being set until after rpc.idmapd and automount are started. That's why restarting the services later seems to work. Or whatever. Why it works on one fresh install but not the next I'll never know.

Category: tech, Tags: fedora, linux, nfs
Comments: 1
@ wrote... (7 years, 5 months ago)

On Fedora 15 if you can't login because you get a

gconf-sanity-check-2 exited with status code 256 error

login via the text console (ctrl-alt-f2) and make a tmp directory.

cd
mkdir tmp
Category: tech, Tags: fedora, linux
Comments: 0