Author Topic: Fettled any computer stuff today?  (Read 217454 times)

Mr Larrington

  • A bit ov a lyv wyr by slof standirds
  • Custard Wallah
    • Mr Larrington's Automatic Diary
Re: Fettled any computer stuff today?
« Reply #650 on: 25 July, 2016, 04:30:48 pm »
Magic smoke stayed in place, graphics suitably whizzy in 4k mode (and so they bloody well should be at that many Gettys/GB)

<=== Does happy bounce
External Transparent Wall Inspection Operative & Mayor of Mortagne-au-Perche
Satisfying the Bloodlust of the Masses in Peacetime

Afasoas

Re: Fettled any computer stuff today?
« Reply #651 on: 18 August, 2016, 02:30:41 pm »
I was woken up when an ISP for an office undertook a planned outage last night.
So I figured I'd script something up that might give advanced warning at a more reasonable hour.

Crummy bash script:
Code: [Select]
#!/bin/bash
crl="/usr/bin/curl -sf"
grp="/bin/grep"
for statusReport in $( \
        $crl https://managed.mytalktalkbusiness.co.uk/network-status.php | \
        $grp '<tr>' | \
        $grp -v 'https://managed.mytalktalkbusiness.co.uk/images/greenlight.gif' | \
        $grp -v 'https://managed.mytalktalkbusiness.co.uk/images/bluespanner.gif' | \
        $grp -oP 'https://managed.mytalktalkbusiness.co.uk/network-status-report.php\?reportid=\d{4,7}')
do
        page=$($crl $statusReport)
        [ $? -ne 0 ] && continue
        echo $page | $grp '<strong>Current Status:</strong></th><td>Open</td>' > /dev/null 2>&1 \
                && echo $page | $grp -i 'someplace' > /dev/null 2>&1 \
                && \
                        echo -e "Subject: TalkTalk Update\nFrom: root@somebox.somedomain.sometld\nTo: somebody@somedomain.sometld\nOpen TalkTalk Status Report concerning 'someplace' exchange..\nStatus Report: $statusReport\n\n" | \
                        /usr/sbin/sendmail -t
done

If it actually works, I'll re-write it in perl and coerce it into notifying for each new or updated update ... as it stands I'll receive daily emails for the same planned outages.

Feanor

  • It's mostly downhill from here.
Re: Fettled any computer stuff today?
« Reply #652 on: 21 August, 2016, 04:25:56 pm »
Omnes: Wail! The Wifi worketh not in the main living quarters!

Hmm, indeed I can't connect to the access point in that part of the house.
The lights are on, so it's getting PoE, the SSID is there and I can initially connect, but it's hung up at Authenticating.
Reboot the access point.  No better.

Through to computer room (wifi is fine there, different AP ), and log into the authentication server and look at the logs.
No authentication requests from the problem device for over an hour.  Strange.

Hmm, can't ping the AP from the computer room.
In fact, I can't ping anything on that side of the house.
They all share a common Access Switch ( one of 3 ), which then uplink to a central Core Switch.

A bit of prodding around, and I discover the uplink between the problem Access Switch and the Core Switch has actually *Fallen Out*.
The small patch cable was missing it's little tab, and the weight of some other patch leads had pulled it out!


David Martin

  • Thats Dr Oi You thankyouverymuch
Re: Fettled any computer stuff today?
« Reply #653 on: 22 August, 2016, 09:46:53 pm »
Son's puter not starting up. Try different power supply. No dice. But it clicks on power on. Hmm. Disconnect cpu fan. Starts fine. OK, new fan needed - odd Dell one so only available as a used item. New PSU needed too as the old one is very dodgy.
Will reassemble when the new bits arrive.
"By creating we think. By living we learn" - Patrick Geddes

Afasoas

Re: Fettled any computer stuff today?
« Reply #654 on: 10 September, 2016, 02:15:33 pm »
Sorted out some resemblance of a backup of the main servers boot disk. Settled for a list of packages, and the contents of the etc, var/lib/bind, /usr/local/bin folders. That should be enough to rebuild it fairly quickly after the next tits-up.
(All the data is backed up nightly courtesy of ZFS snapshots).

Also looking at doing something smarter around developing the next version of my website(s). I want an internally hosted copy automatically updated every time I commit a change into a self-hosted git repo. Then I want a button I can push to deploy the updated site to VPS for general consumption once I'm happy with it.

Fresh Debian install on Intel NUC.
+ Docker
+ Pull and configure Jenkins docker image
+ Set-up nginx reverse proxy (properly so that requests and responses get re-written)
+ New git repositories and git user on main server

Now dealing with a problem concerning dockerised jenkins using SSH private keys to checkout the git repository  :facepalm:.

Phil W

Re: Fettled any computer stuff today?
« Reply #655 on: 10 September, 2016, 10:28:04 pm »
The git bit is dead easy Afasoas. Just drop the script commands you need into the post-receive folder of where the git repository is. From there they'll get executed automatically after a fresh push / commit,  I do that for pushing out fresh commits to the LEL2017 web servers and it works reliably and consistently. If you need an example script to start out then let me know.

woollypigs

  • Mr Peli
    • woollypigs
Re: Fettled any computer stuff today?
« Reply #656 on: 10 September, 2016, 10:43:12 pm »
Well that should do it, all my important files on three different drives, where one will be installed on a sneaker network tomorrow.
Current mood: AARRRGGGGHHHHH !!! #bollockstobrexit

Afasoas

Re: Fettled any computer stuff today?
« Reply #657 on: 10 September, 2016, 11:34:56 pm »
The git bit is dead easy Afasoas. Just drop the script commands you need into the post-receive folder of where the git repository is. From there they'll get executed automatically after a fresh push / commit,  I do that for pushing out fresh commits to the LEL2017 web servers and it works reliably and consistently. If you need an example script to start out then let me know.

I got that working with ease. I added a post-update hook that hits the jenkins server after each push making it then poll the repo.
I wanted to use an SSH key for the git cloning with a passphrase protected private key - I just removed the passphrase in the end.

Just trying to get it dished up over HTTPs, which it has to do right to the jenkins jet web server otherwise the reverse proxying breaks. I suppose it's not strictly necessary - the risk of creds getting sniffed on my own network are relatively miniscule - but if I ever demonstrate this to anyone or make it publicly available in future ...  ???

Re: Fettled any computer stuff today?
« Reply #658 on: 11 September, 2016, 08:14:10 am »
Took my rather ancient laptop (ThinkPad SL500) apart yesterday to try to fix an issue with the screen going green  ;) (usually means a loose connection somewhere).

A real s*d of a job, not helped by the fact that the only small screwdrivers I possessed seemed to be made of cheese, and most of the screws were Loctited in place.  Ended up going to Maplins to buy a couple of sets of decent precision screwdrivers and bits, though not before I'd resorted to drilling out several screws that wouldn't budge.

Failed to find the cause of the problem, but at least I managed to get everything back together again.  The only casualty was one ribbon connector where the little clampy bit pinged out and disappeared, but it's only the HD LED so I can live with that.  Half-a-dozen screws left over, but they'll come in handy next time.  ;)

Frustratingly, it seems likely that the loose connection is under the screen bezel, which looks pretty easy to remove, so I could probably have saved myself a lot of pain (I'll look at that today).  Or maybe not - for the time being SWMBO is tolerating a 22" external monitor on an occasional table in front of my armchair, so that can't be bad !

For anyone else who ever has to work on a ThinkPad, I found this very useful:  https://www.youtube.com/watch?v=kCy9qWnQeRQ

Re: Fettled any computer stuff today?
« Reply #659 on: 11 September, 2016, 05:10:47 pm »
Pi ZeroSeg soldered together (I guess ~50% of the joints were good, the rest were all over the shop from too much solder to major fuckups that took some undoing with my cheapo soldering iron and no solder sucker). Happy with it until I realised I had to solder the 40 pin GPIO header to the Pi Zero as well.

Imagine my surprise when it all worked first time (after a very long faff to get the wifi dongle working on the Pi Zero - bloody wpa_supplicant).

Only one USB port on the Pi Zero, and I can't find my USB hub, so I had to use my daughter's Pi Zero to get the wifi working (allowing me to plug in wifi dongle, mouse and keyboard). Once that was working I could then stick it on the desk next to my computer and ssh into it to the rest of it.

Just have to play with the TFL data API now to get the local bus info and put in a few tweaks:-
* bus time displayed when there is a next bus - along with 24h clock
* display to dim at 7pm, back to bright at 7am
* handle DST shenanigans too
* left button press to make it scroll through next 9 buses on the main road
* right button press to put up a random silly message to my daughter
"Yes please" said Squirrel "biscuits are our favourite things."

Afasoas

Re: Fettled any computer stuff today?
« Reply #660 on: 11 September, 2016, 05:52:12 pm »
Yes, well versed with WPA supplicant. It's even more fun with hidden SSIDs.

I'm currently running a very light install of debian on the netbook, with openbox as a window manager. I'm struggling to get wpa_supplicant to work when started by systemd, yet no issues with it at all when started from the command line.

Re: Fettled any computer stuff today?
« Reply #661 on: 12 September, 2016, 12:30:08 pm »


Displays current time (LHS) and minutes to next local bus (RHS).
Left button makes it cycle through the next 9 buses that go by at the end of the road.
Right button makes it display a random silly message for my daughter.

The two micro-USB ports are power in (right) and for the wifi dongle (on a short micro-to-normal USB cable).

The code is in python (but I write C in python). Need to completely rewrite it now I know roughly what I'm doing. Need to stick the TFL API HTTP code in a separate thread and handle timeouts, 4xx error codes (such as rate limit complaints) rather than just submitting the queries over and over again blindly. Need to change HTTP polling based on time of day (no need to poll every 10 seconds through the night). Need better error reporting when network problems, etc. No idea of any other exceptions I will need to handle.
"Yes please" said Squirrel "biscuits are our favourite things."

Afasoas

Re: Fettled any computer stuff today?
« Reply #662 on: 18 September, 2016, 12:07:46 pm »
Finally got both primary and backup home servers onto the same Linux kernel. Thankfully without any problems - it's always a concern when relying on kernel modules for ZFS.

iKVM modules also installed in both servers and they also seem to work, giving me a reasonable degree of out-of-band management. Just fired up my certificate authority so I can hopefully get them both onto HTTPs ... their firmware is ancient so I suspect that may introduce some browser compatibility type problems as no doubt they are relying on SSL rather than TLS. We'll see.

Oh, and as each server now has a dedicated NIC (as well as a shared NIC) for the out-of-band-management, I've run out of ports on the 8 port managed switch.  :hand:

Re: Fettled any computer stuff today?
« Reply #663 on: 20 September, 2016, 04:53:43 pm »
Compiling Emacs for the first time in years. 25.1 has been released (first major update in a decade) and I have to give it a whirl.
I think you'll find it's a bit more complicated than that.

Kim

  • Timelord
    • Fediverse
Re: Fettled any computer stuff today?
« Reply #664 on: 20 September, 2016, 06:17:11 pm »
Compiling Emacs for the first time in years. 25.1 has been released (first major update in a decade) and I have to give it a whirl.

Has it got a decent text editor yet?  ;D

Re: Fettled any computer stuff today?
« Reply #665 on: 20 September, 2016, 06:22:34 pm »
Modern fast mutli-core CPUs might be able to compile it in under an hour too.
"Yes please" said Squirrel "biscuits are our favourite things."

Re: Fettled any computer stuff today?
« Reply #666 on: 20 September, 2016, 06:43:12 pm »
Modern fast mutli-core CPUs might be able to compile it in under an hour too.

Took about 30 seconds on my laptop :)
I think you'll find it's a bit more complicated than that.

Re: Fettled any computer stuff today?
« Reply #667 on: 20 September, 2016, 06:43:39 pm »
Compiling Emacs for the first time in years. 25.1 has been released (first major update in a decade) and I have to give it a whirl.

Has it got a decent text editor yet?  ;D

Yes its got a really good Vi emulation :)
I think you'll find it's a bit more complicated than that.

Feanor

  • It's mostly downhill from here.
Re: Fettled any computer stuff today?
« Reply #668 on: 16 October, 2016, 05:42:25 pm »
Just returned from FiL's place in Troon, where he has a Laptop which I have to support.

Remote support from Aberdeen was proving difficult, so I've just set up VNC on it.
This also required me to log onto his sky router ( default P/W ), to set up a DHCP reservation for the Laptop to nail it down, and then set up port-forwarding through the NAT.

Whilst in there, I noticed the thing was IPv6 enabled.
So I went back to his PC and checked.
Sure enough, he's IPv6 enabled!

Well done, Sky!

Phil W

Re: Fettled any computer stuff today?
« Reply #669 on: 25 October, 2016, 09:40:49 pm »
Created my first Docker app. A simple nodejs hello world web server to get started before I start work on the full app. Ran 17 copies of the web server in 1Gb of memory.  The thing that impresses me the most how quick it is to start up additional copies.  A second or so and you have another web server on another port. An hour well spent this evening.

Phil W

Re: Fettled any computer stuff today?
« Reply #670 on: 27 October, 2016, 10:53:07 am »
Now running Docker in swarm mode and have a node js CMS up and running

Swarm mode - You launch your app as a service. So I've launched 4 copies of the web server. In swarm mode if a container stops working it'll relaunch another copy to keep it at the number of containers you want in your service.
Created an overlay network.  An overlay network can span physical servers, is encrypted,  and the services will work across all the servers that have been connected to your swarm.  Inside the overlay network each service has a virtual ip and virtual dns that enabled load balancing.  So I can refer to service by name https://my-service etc. without worrying about the individual ips as the number of containers running that service increases or decreases according to load.  A bridge network can also be created exposing a virtual ip for your web server  outside of Docker, for the local servers or outside world to connect to depending on the binding stetting you apply.

So fault tolerant, load balanced, secure networked services with Docker.    I'm rather liking Docker.



Feanor

  • It's mostly downhill from here.
Re: Fettled any computer stuff today?
« Reply #671 on: 27 October, 2016, 06:58:18 pm »
Junior in Edinburgh had to buy a new iPhone because his old one broke.

Now he's trying to set up his e-mail ( home e-mail account from my IMAP server here ).
So I've had to google how to set up iThing IMAP accounts, I can't remember.
The device has built-in presets for the common mass-market providers, but I need him to delve into the 'Other' option.
He then needs to enter the incoming IMAP and outgoing SMTP hostnames, but then it Just Works.

That was fairly painless.


Kim

  • Timelord
    • Fediverse
Re: Fettled any computer stuff today?
« Reply #672 on: 27 October, 2016, 07:00:32 pm »
He then needs to enter the incoming IMAP and outgoing SMTP hostnames, but then it Just Works.

That was fairly painless.

The question is whether it keeps its settings.  There was a bug, but I think it's now been fixed...

Afasoas

Re: Fettled any computer stuff today?
« Reply #673 on: 28 October, 2016, 08:24:28 am »
Created my first Docker app. A simple nodejs hello world web server to get started before I start work on the full app. Ran 17 copies of the web server in 1Gb of memory.  The thing that impresses me the most how quick it is to start up additional copies.  A second or so and you have another web server on another port. An hour well spent this evening.

 :thumbsup:

I've started building a node.js CMS, mainly for the experience of doing it and I was planning to dockerise it. Might be asking you one or two questions if I come unstuck.

In other news, snagged a rather smart looking 22U rack on eBay for buttons. Just about to press the button on a couple of rack mount cases/rails. Thinking about going for one of the bum about face cases with the motherboard/expansion cards exposed at the front, which will make patching the servers into the switch quite easy. Especially as access to the back of the rack will be quite difficult.

I've finally run out of ports on the 8-port smart switch too. I can't actually afford a replacement as yet, but I'm deciding what 24-port switch to put on my mental wish list. It needs to do 802.1Q vLAN tagging and maybe LACP. The other academic debate is how I handle patching. The rack is free standing, so I'm figuring a wall mount patch panel might be more sensible. It would be really nice to get some network ports into every room and loose the CAT5e cables I've got running across the front of the house and along the length of the living room.

Whilst I'm at it, any idea how much BT/Openreach charge to move the master socket? It's vanity but I'd really like to get rid of all the boxes under the TV and the extraneous cables behind it.

barakta

  • Bastard lovechild of Yomiko Readman and Johnny 5
Re: Fettled any computer stuff today?
« Reply #674 on: 28 October, 2016, 12:05:33 pm »
Feanor check where the sentmail is going from the iThing (after some reboots and tests), that's the nonsense we've been fighting with on Mum's multiple iThings last week...  You can change where sent/drafts etc go somewhere in the nonsense.