Month: April 2019

First of all, I want to say that I am very sorry to all of you who have been unable to use the Booksonic app today.

Second I want to get in to a bit of what actually happened as well as give a promise that I will make sure it can never happen again.

Ok, so the reason that you haven’t been able to connect to your server today is due to two things. Today at 08:05 Swedish time booksonic.org went down. This was due to a break in the fibre cable leading to the server center that is hosting it.

The second and more important thing is why this caused you not to be able to connect to your own servers.

First of all I want to make one thing very clear, Booksonic is a selfhosted server and as such this should not happen if my servers go down, that is very important to me.

None of your data between the server and app is ever routed through booksonic.org and will never be so. That said, there are two times that Booksonic connects to my servers. One is when you send me a log file, the second is when the app checks if it has an internet connection and that’s where the problem was.

The app determines if you have an internet connection or not by checking if it can reach booksonic.org. if it can’t, it is supposed to give you a message about it and then move on. The reason this is checking my servers instead of your own booksonic server is so that it can let you know if the problem is that your booksonic server is down or that your internet is down.

What this means is that when booksonic.org went down today all that should have happened is that you should have seen a message in your app letting you know that you don’t have an internet connection but since you actually did you should have been able to use the app just fine anyway, this however is not what happened. It turns out there is a bug in the code that checks the internet connection.

While I haven’t been able to verify this yet as I don’t have access to a computer at the moment my guess is that the reason it messes up is because you actually got a connection response (booksonic.org is behind cloudflare) just not the one it was expecting.

This bug is now my highest priority and I will make sure that a fix for it is found and pushed to GitHub and the Booksonic beta channel (sign up on the Google play page if you are interested) before the end of the week. If for some reason I am unable to get a fix for it working before then I will temporary disable this internet checking feature until I am able to find a fix because the fact that your apps stop working when my servers go offline is simply unacceptable to me.

Update 28/4:

After running some tests I have to admit that my first guess about what was messing up the connection was wrong, it was not the internet check in the app that was buggy, it was the version check on the server.

I have released a new version of the server where this is fixed and since I was releasing a new version of the server any way I also fixed the bug where the covers would not stretch to fit.The new version of the server is called 1.1 and can be downloaded at booksonic.org

For a while I have had an error in my home automation system that caused my hub to do hundreds of request to popeen.com every night. Today I finally sat down and fixed it and once it was fixed I also wanted to purge all the lines from the database so it doesn’t screw up my statistics anymore. Doing so was fairly simple but took me a few minutes to figure out so I decided to write it down here. That way I can come back here whenever I need to do it again and hopefully help someone else out at the same time.

First you SSH into the server running pihole, I am assuming you know how to do that already and if not there are plenty of guides for it if you google it so I won’t cover it here.

The first thing we need to do is shutdown pihole so we are free to modify the database, to shut down pihole run the command

sudo service pihole-FTL stop

Then we need to access the database, we do so by running the command

sudo sqlite3 /etc/pihole/pihole-FTL.db

ok, now it’s time to delete the domain, we do this by running this command, replace popeen.com with the domain you want to purge.

delete from queries where domain = "popeen.com";

when you have purged all the domains you want we exit the database by hitting CTRL + C

and lastly we start pihole up again by running

sudo service pihole-FTL start

Search for:

About

Patrik JohanssonProfessional System Administrator
Working with a wide flora of systems but with a focus on Configuration Manager (MEMCM/SCCM).

Passionate about Powershell and building tools that are easy to use for everyone.
In my spare time I work on other coding projects as well, mainly Booksonic