From 57b8ef8ebea5178dd830ae6dd7fb3c994d4b5a18 Mon Sep 17 00:00:00 2001 From: "Mike Kostersitz (Oilcan Productions)" <77457397+oilcan-productions@users.noreply.github.com> Date: Wed, 14 Aug 2024 09:07:35 -0700 Subject: [PATCH 1/5] Create troubleshooting.md --- troubleshooting.md | 67 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 troubleshooting.md diff --git a/troubleshooting.md b/troubleshooting.md new file mode 100644 index 000000000..5f00f56fa --- /dev/null +++ b/troubleshooting.md @@ -0,0 +1,67 @@ +# Troubleshooting guide + +This guide will help you sort out the most common issues of running ITS on the PiDP-10 + +## INQUIR not saving changes +Thanks to eswenson for the intial steps here + +In order for INQUIR entries to stick, you must have COMSAT running. + +If you run PEEK, you should see two COMSAT jobs. One has the JNAME IV and the other JOB.nn. If these jobs are not present, then COMSAT may have started and died. +``` +*:peek +KA ITS 1651 Peek 631 8/14/2024 09:59:35 Up time = 5:05 +Memory: Free=457 Runnable Total=11 Out=3 Users: High=13 Runnable=0 +Index Uname Jname Sname Status TTY Core Out %Time Time PIs + 0 SYS SYS SYS HANG ? 71 0 0% 1 + 1 CORE JOB CORE UUO ? 0 0 0% + 2 MIKEK HACTRN MIKEK HANG > 30 9 0% + 12 MIKEK PEEK MIKEK +TTYBO T52 C 11 2 0% + 3 .BATCH BATCHN .BATCH SLEEP ? 126 23 0% + 4 TARAKA CNAVRL CNAVRL 10!0 ? DSN 29 0 0% .VALUE + 5 GUNNER GUNNER GUNNER _SLEEP ? 11 3 0% + 6 TARAKA PAPSAV PAPSAV HANG ? 1 0 0% + 7 TARAKA NAMDRG NAMDRG HANG ? 29 0 0% + 10 PFTHMG DRAGON PFTHMG HANG ? 6 0 0% + 11 TARAKA JOB.07 SYS HANG ? 3 0 0% +Fair Share 99% Totals: 317 0% 1 +Logout time = Lost 0% Idle 98% Null time = 5:07 +``` +As you can see above none of the COMSAT process is running. + +There are several reasons why COMSAT may die upon startup The most common are: + +1) network parameters for COMSAT are not correct. + +2) host configured for the BUGHST doesn’t match ITS’ IMPUS3 value. + +3) Mail initialization files were not created. + +4) .MAIL. directory is full. + +You can check the network parameters by doing: +``` +foo$j ; $ is +$l .mail.;comsat launch +bughst/ +tcpgat/ +domgat/ +``` +this produces this output +``` +bughst/ SHOWQ+50,,PAT+6 tcpgat/ SHOWQ+50,,55 domgat/ SHOWQ+50,,55 +``` +BUGHST should match IMPUS3 in ITS and be the IP address of your ITS. + +You can check the value of IMPUS3 by doing: +``` +Its$j +impus3= +``` +TCPGAT and DOMGAT should be the IP address of your host (eg raspberry pi). + +If all these are correct, check to see if your .MAIL. directory is full: + +:dskuse .mail. + +List out your .MAIL. directory to see if you have these files: From b029cb72a776388339ed71d599727c825ff3ddfb Mon Sep 17 00:00:00 2001 From: "Mike Kostersitz (Oilcan Productions)" <77457397+oilcan-productions@users.noreply.github.com> Date: Fri, 23 Aug 2024 14:18:23 -0700 Subject: [PATCH 2/5] Update deploy-ftp.sh Adding retry logic for creatin the tar ball to ensure what we upload is valid. Looping back to creating the tar ball instead of looping on the download. --- build/deploy-ftp.sh | 56 +++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 52 insertions(+), 4 deletions(-) diff --git a/build/deploy-ftp.sh b/build/deploy-ftp.sh index 82ed067a3..1351f7980 100644 --- a/build/deploy-ftp.sh +++ b/build/deploy-ftp.sh @@ -18,12 +18,44 @@ echo "login $USER" >> "$NETRC" echo "password $FTP_SECRET" >> "$NETRC" chmod 600 "$NETRC" +# create_archive will create a tar ball from the out folder +# try to extract it to see if it is valid +# retry 3 times then fail +create_archive{ + MAX_RETRIES=3 + RETRY_COUNT=0 + + while (( RETRY_COUNT < MAX_RETRIES )); do + (cd out; tar czf $EMULATOR.tgz $EMULATOR) + + # Verify the tarball + if tar tf $EMULATOR.tgz >/dev/null 2>&1; then + echo "Tarball is valid and can be expanded." + break + else + echo "Tarball is not valid or cannot be expanded. Retrying..." + RETRY_COUNT=$((RETRY_COUNT + 1)) + rm -f $EMULATOR.tgz + continue + fi + done + + if (( RETRY_COUNT == MAX_RETRIES )); then + echo "Failed to create a valid tarball after $MAX_RETRIES attempts." + return 1 + fi +} + +# upload_file tries to upload the tar ball to the FTP server, will retry 5 times and then fail upload_file(){ - (cd out; tar czf $EMULATOR.tgz $EMULATOR) + MAX_RETRIES=5 + RETRY_COUNT=0 - echo "Deploying as $USER at $HOST" + while (( RETRY_COUNT < MAX_RETRIES )); do + echo "Deploying as $USER at $HOST" - ftp "$HOST" < Date: Tue, 27 Aug 2024 13:47:15 -0700 Subject: [PATCH 3/5] Update troubleshooting.md Updating with the latest steps to fix COMSAT --- troubleshooting.md | 176 +++++++++++++++++++++++++++++++++++++++------ 1 file changed, 156 insertions(+), 20 deletions(-) diff --git a/troubleshooting.md b/troubleshooting.md index 5f00f56fa..ecc8811e9 100644 --- a/troubleshooting.md +++ b/troubleshooting.md @@ -7,7 +7,7 @@ Thanks to eswenson for the intial steps here In order for INQUIR entries to stick, you must have COMSAT running. -If you run PEEK, you should see two COMSAT jobs. One has the JNAME IV and the other JOB.nn. If these jobs are not present, then COMSAT may have started and died. +If you run PEEK, you should see two COMSAT jobs. One has the JNAME IV and the other JOB.nn. If these jobs are not present, then COMSAT may have started and died or not started at all ``` *:peek KA ITS 1651 Peek 631 8/14/2024 09:59:35 Up time = 5:05 @@ -30,38 +30,174 @@ Logout time = Lost 0% Idle 98% Null time = 5:07 As you can see above none of the COMSAT process is running. There are several reasons why COMSAT may die upon startup The most common are: +Lets start going through those one by one: -1) network parameters for COMSAT are not correct. +### Network parameters for COMSAT are not correct. +When you bring up KA ITS, you'll see a message on the operator console like this: -2) host configured for the BUGHST doesn’t match ITS’ IMPUS3 value. + LOGIN  TARAKA 0 12:09:11 +TOP LEVEL INTERRUPT 200 DETACHED JOB # 4, USR:COMSAT IV     12:09:12 -3) Mail initialization files were not created. +This means that COMSAT has crashed. -4) .MAIL. directory is full. +If you look at the IP address that COMSAT is configured with: +``` +comsat$j +$l .mail.;comsat launch +bughst/'NEW$:   SHOWQ+50,,PAT+6   =30052000544 +``` + +you'll note that that octal address is: 192.168.1.100 + +If you look at the value that ITS has for the machine's IP address: + +``` +sys$j! +*impus3=1200600006 +``` + +You'll see that that that octal address is: 10.3.0.6 + +And if you look at the host table (SYSHST;H3TEXT >), you'll find an entry like this: +``` +HOST : CHAOS 177002, 192.168.1.100 : DB-ITS.EXAMPLE.COM, DB : PDP-10 : ITS : : +``` + +(And there is no HOST entry for a machine with the name KA). + +The easiest fix is to: + +1) fix the host table +2) fix COMSAT's variables +3) generate COMSAT's database files +4) fix COMSAT's mailing lists file +5) restart COMSAT + +To fix the host table, change the line: +``` +HOST : CHAOS 177002, 192.168.1.100 : DB-ITS.EXAMPLE.COM, DB : PDP-10 : ITS : : +``` +to +``` +HOST : CHAOS 177002, 10.3.0.6 : KA : PDP-10 : ITS : : +``` +Save the updated `SYSHST;H3TEXT >` and then compile the host table: +``` +:SYSHST;H3MAKE +``` +Make sure that there were no errors (look for a `H3ERR` file) and make +sure that there exists a file `SYSBIN;HOSTS3 NNNNNN` where `NNNNNN` matches +the `FN2` of the `SYSHST;H3TEXT NNNNNN` you just created. + +Now your host table matches your ITS IP address. + +Next, you need to fix COMSAT. + +To do that, create a job for COMSAT: +``` +comsat$j +``` +Then load in the compiled (but not dumped) binary for COMSAT +``` +$l .mail.;comsat bin +``` +And now set various variables: +``` +BUGHST/1200600006 +DEBUG/0 +xvers/0 +``` +And then purify the binary: +``` +purify$g +``` +and when DDT prints out: +``` +:PDUMP DSK:.MAIL.;COMSAT LAUNCH +``` +Type an `` to confirm. + +Now, you have an correct `.MAIL.;COMSAT LAUNCH` executable.  This will be +launched by `TARAKA` on startup, or by `:MAIL` when invoked if `COMSAT` isn't +running. -You can check the network parameters by doing: +However, before you do this, you need to make sure that COMSAT's database +files are created. + +To do that, do this: ``` -foo$j ; $ is +comsat$j $l .mail.;comsat launch -bughst/ -tcpgat/ -domgat/ +debug/-1 +mfinit$g +``` +You should see a message like: +``` +:$ File Directory Initialization successfully completed... +Proceeding will launch Comsat. $ +* +``` +Don't proceed the COMSAT job, because it will be run as your +UNAME rather than COMSAT's.  Simply kill the COMSAT job: +``` +:kill +``` +Now, there is one last step.  The file `.MAIL.;NAMES >` has entries +for DB (ITS) rather than KA.  It needs updating. + +In emacs, open up `.mail.;names >` and do a query replace of all instances of DB +with KA. + +To do that, enter the Query Replace command: +``` +% +``` +The echo area should display: +``` +MM Query Replace$ +``` +Type in `DBKA` + +Your cursor will be positioned at the first instance of the string DB. + +Type in + +`!` + +Yes, just the exclamation point character.  This will replace all instances +of `DB` with `KA`. + +Save the file. (`xs`) and return to DDT (`xc`). + +Now, you are ready to launch `COMSAT`. + +But first, make sure there is no (dead) comsat running, but running `peek$k` + +Look for any job with the UNAME COMSAT (and the JNAME IV).  If you find one, +kill the job by typing: + +`X` + +Then, exit PEEK with the "q" command. + +Now, send yourself a message: +``` +:MAIL + +c ``` -this produces this output +You should see the message: ``` -bughst/ SHOWQ+50,,PAT+6 tcpgat/ SHOWQ+50,,55 domgat/ SHOWQ+50,,55 +C Communications satellite apparently dead. +Re-launching, hang on... now in orbit! ``` -BUGHST should match IMPUS3 in ITS and be the IP address of your ITS. +Now, COMSAT should be running.  You can check with PEEK. -You can check the value of IMPUS3 by doing: +You also should see that your mail was delivered. Type: ``` -Its$j -impus3= +:PRMAIL ``` -TCPGAT and DOMGAT should be the IP address of your host (eg raspberry pi). +to read (and optionally delete) it. -If all these are correct, check to see if your .MAIL. directory is full: -:dskuse .mail. -List out your .MAIL. directory to see if you have these files: From 5f5c47b83e0da76d027f24b28611254592fce336 Mon Sep 17 00:00:00 2001 From: "Mike Kostersitz (Oilcan Productions)" <77457397+oilcan-productions@users.noreply.github.com> Date: Tue, 27 Aug 2024 15:04:43 -0700 Subject: [PATCH 4/5] Update troubleshooting.md --- troubleshooting.md | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/troubleshooting.md b/troubleshooting.md index ecc8811e9..467bc51e6 100644 --- a/troubleshooting.md +++ b/troubleshooting.md @@ -1,8 +1,17 @@ # Troubleshooting guide -This guide will help you sort out the most common issues of running ITS on the PiDP-10 +This guide will help you sort out the most common issues of running ITS on the PiDP-10. +Issues covered so far: -## INQUIR not saving changes +* [COMSAT is crashing on start](#comsat-is-crashing-on-start) + +through out the document you will see certain special characters mentioned. They are slightly different depending on your keyboard and terminal +* `$` means the ALT or ESC key +* `^` means the CTRL or STRG key +* `` means the ALT or ESC key in EMACS +* `` means the Control key in EMACS + +## COMSAT is crashing on start Thanks to eswenson for the intial steps here In order for INQUIR entries to stick, you must have COMSAT running. @@ -27,7 +36,7 @@ Index Uname Jname Sname Status TTY Core Out %Time Time PIs Fair Share 99% Totals: 317 0% 1 Logout time = Lost 0% Idle 98% Null time = 5:07 ``` -As you can see above none of the COMSAT process is running. +As you can see above none of the COMSAT processes are running. There are several reasons why COMSAT may die upon startup The most common are: Lets start going through those one by one: @@ -163,7 +172,6 @@ Your cursor will be positioned at the first instance of the string DB. Type in `!` - Yes, just the exclamation point character.  This will replace all instances of `DB` with `KA`. @@ -171,7 +179,7 @@ Save the file. (`xs`) and return to DDT (`xc Now, you are ready to launch `COMSAT`. -But first, make sure there is no (dead) comsat running, but running `peek$k` +But first, make sure there is no (dead) comsat running, but running `peek^k` Look for any job with the UNAME COMSAT (and the JNAME IV).  If you find one, kill the job by typing: From 1789657c3cad6348f08028effe8f9889729006b1 Mon Sep 17 00:00:00 2001 From: "Mike Kostersitz (Oilcan Productions)" <77457397+oilcan-productions@users.noreply.github.com> Date: Tue, 27 Aug 2024 18:08:15 -0700 Subject: [PATCH 5/5] Update troubleshooting.md --- troubleshooting.md | 81 ++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 74 insertions(+), 7 deletions(-) diff --git a/troubleshooting.md b/troubleshooting.md index 467bc51e6..e6ba0c135 100644 --- a/troubleshooting.md +++ b/troubleshooting.md @@ -5,17 +5,15 @@ Issues covered so far: * [COMSAT is crashing on start](#comsat-is-crashing-on-start) -through out the document you will see certain special characters mentioned. They are slightly different depending on your keyboard and terminal -* `$` means the ALT or ESC key +Throughout the document you will see certain special characters mentioned. They are slightly different depending on your keyboard and terminal +* `$` means the ESC key * `^` means the CTRL or STRG key -* `` means the ALT or ESC key in EMACS -* `` means the Control key in EMACS +* `` means the ESC key +* `` means the CTRL or STRG key ## COMSAT is crashing on start Thanks to eswenson for the intial steps here -In order for INQUIR entries to stick, you must have COMSAT running. - If you run PEEK, you should see two COMSAT jobs. One has the JNAME IV and the other JOB.nn. If these jobs are not present, then COMSAT may have started and died or not started at all ``` *:peek @@ -39,6 +37,10 @@ Logout time = Lost 0% Idle 98% Null time = 5:07 As you can see above none of the COMSAT processes are running. There are several reasons why COMSAT may die upon startup The most common are: +* Network configuration issues +* Uninitialzed Mail directory structure +* Other configuration issues +* Lets start going through those one by one: ### Network parameters for COMSAT are not correct. @@ -48,6 +50,10 @@ When you bring up KA ITS, you'll see a message on the operator console like this TOP LEVEL INTERRUPT 200 DETACHED JOB # 4, USR:COMSAT IV     12:09:12 This means that COMSAT has crashed. +The next series of steps assumes you have logged into ITS using +``` +< your username>$$u +``` If you look at the IP address that COMSAT is configured with: ``` @@ -56,7 +62,12 @@ $l .mail.;comsat launch bughst/'NEW$:   SHOWQ+50,,PAT+6   =30052000544 ``` -you'll note that that octal address is: 192.168.1.100 +you'll note that that octal address translates to: 192.168.1.100 + +>![NOTE] +> To convert from the Octal representation of the IP Address to the tuple representation you can use the approach listed below at +>(Convert IP address)[#convert-ip-address] + If you look at the value that ITS has for the machine's IP address: @@ -82,6 +93,7 @@ The easiest fix is to: 4) fix COMSAT's mailing lists file 5) restart COMSAT +### Fixing the host table To fix the host table, change the line: ``` HOST : CHAOS 177002, 192.168.1.100 : DB-ITS.EXAMPLE.COM, DB : PDP-10 : ITS : : @@ -100,6 +112,7 @@ the `FN2` of the `SYSHST;H3TEXT NNNNNN` you just created. Now your host table matches your ITS IP address. +### Fixing the COMSAT binary Next, you need to fix COMSAT. To do that, create a job for COMSAT: @@ -130,6 +143,7 @@ Now, you have an correct `.MAIL.;COMSAT LAUNCH` executable.  This will be launched by `TARAKA` on startup, or by `:MAIL` when invoked if `COMSAT` isn't running. +### Create the COMSAT database files However, before you do this, you need to make sure that COMSAT's database files are created. @@ -188,6 +202,7 @@ kill the job by typing: Then, exit PEEK with the "q" command. +### Verify the changes Now, send yourself a message: ``` :MAIL @@ -207,5 +222,57 @@ You also should see that your mail was delivered. Type: ``` to read (and optionally delete) it. +### Convert IP address +If you are wondering how to convert octal IP addresses on ITS to the familiar octet pattern, see this example: + +Let’s say you want to convert 1200600006 to a standard-formatted IP address.  First ensure that the value has 12 octal digits.  In this case, you’ll have to add two 0s at the left to get: + +001200600006 + +Then, break that value up into octal values: + +001 200 600 006 + +Then, convert the above to binary: + +000 000 001 010 000 000 110 000 000 000 000 110 + +Then, group into 4 (ignored) bits, followed by 4 8-bit bytes: + +0000  00001010 00000011 00000000 00000110 + +Then, ignoring the first 4 bits, convert each 8-bit byte to decimal: + +      10      3        0        6 + +So 10.3.0.6 is the same as 1200600006 octal. + +Lars created a shell script that will do the trick too.  You *have* to make sure the input is 12 octal digits long when invoking it: + +``` +#!/bin/bash + +if [ $# -eq 0 ]; then + echo "Please provide an IP address as an argument" + exit 1 +fi + +octal=$1 +ip="" +for i in {1..4}; do + octet=$(echo $(( $octal >> 8*(4-$i) & 255 ))) + ip="$ip$octet." +done + +echo ${ip%?} +``` +You could invoke it like this: + +`./ipconvert.sh 001200600006` + +And it should respond: + +`10.3.0.6` +But it’s much more fun to do it the hard/manual way!