Installing the GNC-A Ingestion software on Debian 10.3

Author: Alejandro Aguilar Sierra | Contact: [email protected]

Laboratorio Nacional de Observación de la Tierra, UNAM, México

KenCast_Debian_Banner

Hi GEONETCasters! This procedure was kindly written by Alejandro Aguilar Sierro, from LANOT (National Laboratory for Earth Observation) at UNAM (National Autonomous University of Mexico).

Please check the other contributions from the LANOT team at the following links:

Thanks LANOT! And below, the procedure written by Alejandro Sierra:


In this blog post we’ll learn how to install the GNC-A ingestion software (KENCAST FAZZT PROFESSIONAL CLIENT VERSION 9.2) on Debian 10.3.

First, some important notes:

  • This procedure was tested on Linux Debian 10.x, which is the current stable version. If your system has a previous version, the update is advised.
  • FAZZT v 9.2 currently doesn’t support Debian by default, and the procedure described here is different to the one used to install on Ubuntu, so if you still want to do it, do it at your own risk. You had been warned.
  • In order to install FAZZT, is necessary to install Apache2 and the PostgreSQL Database, as shown on this procedure.
  • It is mandatory to create an account called “fazzt”. This is required for the FAZZT database to work.

Why Debian?

  • It is a very robust distribution with 25 years of experience, completely able to be used in servers.
  • Usually it is updated faster than other distributions and have a wider base of packages and software.
  • It’s not as friendly as Ubuntu but as efficient as CentOs.

PART I: PREINSTALL

Install Apache2 and PostgreSQL, as root:

# apt update
# apt install apache2 postgresql

Create the user fazzt:

# adduser fazzt

Get the most recent installation file for CentOs from KenCast. In our case, we will use the following installer, provided by KenCast:

Fazzt-Professional-Client-rhel7-9.2.0.0-1.x86_64.rpm

Now, the most important part of the trick: use the Debian tool called alien to create a corresponding “deb” file.

If that is too complicated, by all means you can get ours from the following link:

fazzt-professional-client-rhel7_9.2.0.0-2_amd64.deb

PART II: INSTALLATION

Use the generated “deb” file to install the Fazzt Professional Client:

# dpkg -i fazzt-professional-client-rhel7_9.2.0.0-2_amd64.deb

Now, the “alien” tool did a very good but imperfect work, so you will have to do a couple of adjustments by hand. The Apache’s configuration and module files were installed in the wrong directory. Just copy them to the correct one:

# cp -p /etc/httpd/conf.d/S10-fsp.conf /etc/apache2/conf-available/S10-fsp.conf
# cp -p /etc/httpd/conf.d/S60-fazzt-admin.conf /etc/apache2/conf-available/S60-fazzt-admin.conf
# cp -p /etc/httpd/modules/mod_fsp.so /usr/lib/apache2/modules/mod_fsp.so

Create the file /etc/apache2/mods-available/fsp.load with the following line:

LoadModule fsp_module /usr/lib/apache2/modules/mod_fsp.so

Enable the config files and module:

# a2enconf S10-fsp
# a2enconf S60-fazzt-admin
# a2enmod fsp

Correct a couple of mistakes in these files:

/etc/apache2/conf-available/S10-fsp.conf
-LoadModule fsp_module modules/mod_fsp.so
+#LoadModule fsp_module modules/mod_fsp.so

and:

/etc/apache2/conf-available/S60-fazzt-admin.conf
-		ErrorLog logs/Fazzt-admin-error.log
-		CustomLog logs/Fazzt-admin-access.log common
+		ErrorLog Fazzt-admin-error.log
+		CustomLog Fazzt-admin-access.log common

Don’t forget to install the FAZZT KenCast license provided by KenCast:

# /usr/share/Fazzt/bin/fconf set license PCXXXXXX.kcl

Now you are ready. Start the FAZZT service:

# systemctl start fazzt.service

If everything was right, you must see your service active and without errors. The first start will create the database and its corresponding user and password, and the same for fazzt, which you can verify from the user postgres.

# su - postgres
$ psql fazzt
psql (11.7 (Debian 11.7-2.pgdg100+1))
Type "help" for help.

fazzt=# \dt
List of relations
Schema |               Name               | Type  | Owner
--------+----------------------------------+-------+-------
public | applicationinstances             | table | fazzt
public | applicationschedules             | table | fazzt
public | applicationservices              | table | fazzt
public | applicationservicetypes          | table | fazzt
public | applicationtypes                 | table | fazzt
public | channels                         | table | fazzt
public | channeltypes                     | table | fazzt
public | defaultschedule                  | table | fazzt
public | fazzttbls                        | table | fazzt
public | forwardingconditionactiondefault | table | fazzt
public | forwardingconditionactionrules   | table | fazzt
public | forwardingrules                  | table | fazzt
public | globalattributes                 | table | fazzt
public | notes                            | table | fazzt
public | receivedfiles                    | table | fazzt
public | schedule                         | table | fazzt
public | selectivereception               | table | fazzt
public | selectivereceptiongroups         | table | fazzt
public | streams                          | table | fazzt
public | transmissions                    | table | fazzt
(20 rows)

fazzt=#

If you don’t see those tables, something went wrong. Perhaps you just have to comment the line 382 of the startup file /usr/share/Fazzt/bin/fazzt-setup since createlang is no more supported nor necessary in current Postgres. Try again.

It is important to note that Debian uses nftables instead of iptables to configure a firewall and you will have to open the port 4039 and accept everything from the interface you use to connect the decoder. In my case, I had to add these lines to /etc/nftables.conf and restart the nftables service.

iifname eno4 accept
tcp dport 4039 accept

Now restart Apache.

# systemctl restart apache2

PART III: KENCAST FAZZT CONFIGURATION

Let’s configure the FAZZT Client for the GNC-A ingestion. At the menu on the left, choose “Configuration” -> “Channels” and then, at the “Channels” window, choose “Channels Defaults”. At “Interface”, choose the IP address of the Network Card where you have your DVB-S receiver connected. Click on “Save”.

KCa.png

– Select the ingestion folder at “Configurations”“Storage Settings”“Virtual Paths: View/Edit”

KCb.png

– Click at the backslash \” as shown on the image below and choose the folder where the received files will be stored. In this procedure we suggested “/data/fazzt” but it may be any folder you want.

KCc.png

– Back to the “Channels” interface, click at the “1.Main” channel:

KCd.png

– And at “Interface”, choose “default”:

KCe.png

– After a while (a couple of minutes), you should see the GNC-A Broadcast channels being listed at the “Configuration”“Channels” interface.

KCf.png

Congreatulations! Your GNC-A station is ingesting!


To check other procedures to install the FAZZT PROFESSIONAL CLIENT, please access the links below:

Upcoming changes for blended TPW product on GNC-A

TPW_TPWA

TPW and TPW Anomaly Hourly Product, as seen on SHOWCast

united_states_of_america_round_icon_640

Topic:  Upcoming changes for blended TPW product on GNC-A
Date/Time Issued: March 30, 2020 1855 UTC
Product(s) or Data Impacted:  Blended TPW product on GNC-A
Date/Time of Initial Impact: April 2, 2020 1700 UTC
Date/Time of Expected End: June 2020
Length of Event:  Permanent change

Details/Specifics of Change: On Thursday, April 2, 2020, NOAA will add Blended Total Precipitable Water (TPW) product in NetCDF4 format. We will terminate existing legacy HDF-EOS files (in HDF4 format) in ~June 2020.

Please switch your scripts to use the NetCDF4 format.  Folder: JPSS/PRODUCTS/BTPW

Contact Information for Further Information: [email protected] for information on GNC-A Program

brazil_640

Assunto: Administrativo: Produto “Blended TPW” no formato NetCDF4 no GNC-A; Emitido: 30 de março de 2020, XXXX UTC
Tópico: Alteração do produto “Blended TPW” no GNC-A
Data / Hora da Emissão: 30 de março de 2020, XXXX UTC
Produto(s) ou Dados Impactados: Produto “Blended TPW” no GNC-A
Data / Hora do Impacto Inicial: 2 de abril de 2020, 17:00 UTC
Data / Hora Esperada para Término: Junho de 2020
Duração do Evento: Mudança permanente

Detalhes / Mudanças Específicas:  Na quinta-feira, 2 de abril de 2020, a NOAA adicionará o produto “Blended Total Precipitable Water (TPW)” no formato NetCDF4. Excluiremos da transmissão os arquivos HDF-EOS atuais (no formato HDF4) em ~ junho de 2020.

Por favor, mude seus scripts para usar o formato NetCDF4. Pasta: JPSS / PRODUCTS / BTPW

Contato para mais informações:
[email protected] para informações sobre o programa GNC-A.

spain_640

Asunto: Administrativo: Producto “Blended TPW” en el formato NetCDF4 en GNC-A; Emitido: 30 de marzo de 2020, XXXX UTC
Tema: Cambio en el producto “Blended TPW” en GNC-A
Fecha / hora de emisión: 30 de marzo de 2020, XXXX UTC
Producto(s) o Datos Afectados:  Producto “Blended TPW” en GNC-A
Fecha / hora del impacto inicial: 2 de abril de 2020, 17:00 UTC
Fecha / Hora de finalización prevista: Junio de 2020
Duración del evento: Cambio permanente

Detalles del cambio:  En el jueves, 2 de abril de 2020, NOAA agregará el producto “Blended Total Precipitable Water (TPW)” en elformato NetCDF4. Eliminaremos los archivos HDF-EOS actuales (en formato HDF4) de la transmisión en ~ junio de 2020.

Por favor, cambie sus scripts para usar el formato NetCDF4. Carpeta: JPSS / PRODUCTS / BTPW

Contacto para más información:
[email protected] para información sobre el programa GNC-A

GNC-A Blog Content – March 2020

Blog Content

Hi GEONETCasters,

As requested by the Blog Readers, please find bellow a summary of the Blog content:

==== WHAT IS GEONETCAST-AMERICAS ====

“What is GEONETCast-Americas?” Series:

==== GNC-A STATION INSTALLATION AND MAINTENANCE ====

GNC-A Station Hardware and Software Tutorial Series:

==== GEONETCAST-AMERICAS CONTENT ====

GEONETCast-Americas Product Additions and Announcements:

“GEONETCast-Americas Imagery of the Day” Series:

==== GEONETCAST-AMERICAS PRODUCT MANIPULATION ====

SHOWCast Series:

GOES-16 and Python Tutorial Series:

Using Basemap:

Using Cartopy:

GNC-A and Python Tutorials and Scripting Examples:

Miscellaneous Tutorials and Scripting examples:

==== THE GEONETCAST-AMERICAS GREAT COMMUNITY ====

“GNC-A User Study Cases”:

“GNC-A Community Map” Series:

“New Operational GNC-A Station” Series:

“Products Generated by the Community” Series:

==== GNC-A BLOG / OUTREACH / SUPPORT ====

GNC-A User Group Webinars:

GNC-A Blog Community Reach:

GEONETCast-Americas Related Events:

GEONETCast-Americas Notifications:

==== NICE THINGS! ====

Updated at March 12, 2020 13:30 UTC

Cleaning the FAZZT “kdt” directory

Hi GNC-A’ers,

The FAZZT Client stores temporary data on an specific directory called “kdt”. While the data is being received, it is stored there, and when the reception is finished, it is moved to the permanent storage directory (e.g.: “GOES-R-CMI-Imagery/Band13”).

However, when, for some reason, there is an error on the reception and the data is incomplete, the temporary file stays there forever. It is a good practice to automatically erase this folder, so your directory does not become full (also, check why incomplete files are happening! Check here).

Let’s see how to clean the kdt directory automatically with cron.

1-) Check where your FAZZT temporary directory is:

On the FAZZT interface, go to “Configuration” -> “Storage Settings” and check the “Temp Directory” and the “Temporat Storage Directory”, like o the image below:

Screenshot-Fazzt Administration (paraiba.cptec.inpe.br) - Mozilla Firefox

On the example above, the kdt directory is found at: /var/tmp/fazzt/kdt

2-) Create a script called “clean_kdt.sh” (for example) with the following code:

#!/bin/csh -x
echo "****Cleaning FAZZT KDT - Started****"
echo `date`
find /var/tmp/fazzt/kdt -mtime +1 -exec rm -f {} \;
echo `date`
echo "****Cleaning FAZZT KDT - Finished****"

Save the clean_kdt.sh script whenever you want (on this example “/data/scripts”)

3-) Change your script permissions:

chmod +x *

4-) Add the script to your cron, to be executed daily:

To edit your crontab (using vi on this example):

crontab -e

To switch to input mode, in order to add and edit text:

i

You should see — INSERT — on the lower part of the window.

Add a new line to your cron, to execute the “clean_kdt.sh” daily, at midnight:

0 0 * * * /data/scripts/clean_kdt.sh > /data/scripts/clean_kdt.log 2>&1

Pres ESC to quit the crontab edition mode (the — INSERT — text will disappear) and save the edition you made with:

:wq

You will see the following:

crontab: installing new crontab

Your KDT directory will be cleaned daily, at midnight, and the instruction to clear the directory will be looged on /data/scripts/clean_kdt.log

Reset the FAZZT Database on Linux

kencast_reset

Hi GEONETCasters,

In order to reset the FAZZT database on Linux (thus liberating lots of space on the Hard Drive), please follow the procedure below:

1-) As root, stop the FAZZT service:

service fazzt stop

2-) Start the postgresql service:

# service postgresql-9.4 start

3-) Remove your “fazzt” database and your “fazzt” user:

# su - postgres
# dropdb fazzt
# dropuser fazzt

4-) Quit the database:

$ exit

5-) Stop the postgresql service:

# service postgresql-9.4 stop

6-) Remove your postgresql data folder:

# rm -rf /var/lib/pgsql/9.4/data/

7-) Reconfigure your database with the procedure below:

– Configure the database for the initialization:

# service postgresql-9.4 initdb

–  Start the database:

# service postgresql-9.4 start

– Configure the database to start automatically:

# chkconfig postgresql-9.4 on
# chkconfig --level 345 postgresql-9.4 on

– Restart the database:

# service postgresql-9.4 restart

– Edit the file “postgresql.conf” file found at /var/lib/pgsql/9.4/data:

# gedit /var/lib/pgsql/9.4/data/postgresql.conf

…Changing the following line on session “CONNECTIONS AND AUTENTICATION” (line 54 more or less):

listen_addresses = '*' #What IP address (es) to listen on;

– At the same session, four lines below, remove the comments “#”, if they exist:

port 5432
max_connections = 100

– In the same file, further down, in the ** AUTOVACUUM PARAMETERS ** session (line 463 more os less), remove the comment “#”, and change it to “off”

autovacuum = off # Enable autovacuum subprocess? 'on'

– Save and close the “postgresql.conf” file.

– Edit the “pg_hba.conf” file found at gedit /var/lib/pgsql/9.4/data/

# gedit /var/lib/pgsql/9.4/data/pg_hba.conf

 …Changing the following lines at the end of the file from peer or ident to “trust”:

# TYPE DATABASE USER ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all all trust
# IPv4 local connections:
host all all 127.0.0.1/32 trust
# IPv6 local connections:
host all all ::1/128 trust
# Allow replication connections from localhost, by a user with the
# replication privilege.
#local   replication     postgres                                peer
#host    replication     postgres        127.0.0.1/32            ident
#host    replication     postgres        ::1/128                 ident

– Also, add the following line in the end of the same session:

# host all all 0.0.0.0/0 trust

– This is what you should have

# TYPE DATABASE USER ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all all trust
# IPv4 local connections:
host all all 127.0.0.1/32 trust
# IPv6 local connections:
host all all ::1/128 trust
# Allow replication connections from localhost, by a user with the
# replication privilege.
#local   replication     postgres                                peer
#host    replication     postgres        127.0.0.1/32            ident
#host    replication     postgres        ::1/128                 ident
host all all 0.0.0.0/0 trust

trust

– Save and close the “pg_hba.conf” file.

 – Change the memory limit used by the database, editing the “limits.conf” file found at gedit /etc/security/

# gedit /etc/security/limits.conf

 …Adding the following lines before the “End of file”

fazzt soft nofile 4096
fazzt hard nofile 4096
# End of file

– Restart the PostgreSQL:

# service postgresql-9.4 restart

– Enter the PostgreSQL:

su - postgres

– Create the “fazzt” database:

$ createdb fazzt
$ createuser -s -d -r -l -P fazzt

– You will be asked for inserting a new password for the database. It may be the same as the root. However, you may use any password you want. Insert the chosen password twice (e.g.: fazzt and fazzt).

Enter password for new role: fazzt
Enter it again: fazzt

 – Quit the Postgresql:

$ exit

 – Restart Postgresql:

# service postgresql-9.4 restart

 – Return to the database and verify the created account:

# su - postgres
$ psql -h localhost -U fazzt fazzt

– The output of the previous command should be:

Type “help” for help
fazzt=#

 – Quit the Database with the “\q” command:

postgres=# \q
$ exit

Your FAZZT Database was successfully reset!

5-) RESET your FAZZT Client:

# service fazzt reset

6-) Reconfigure your FAZZT Client according to the procedure below. Wait for the channels to reappear.

KENCAST FAZZT CONFIGURATION

 – Let’s configure the FAZZT Client for the GNC-A ingestion. The configuration is the same for versions 8.1 or 9.0. At the menu on the left, choose “Configuration” -> “Channels” and then, at the “Channels” window, choose “Channels Defaults”. At “Interface”, choose the IP address of the Network Card where you have your DVB-S receiver connected. Click on “Save”.

KCa.png

– Select the ingestion folder at “Configurations”“Storage Settings”“Virtual Paths: View/Edit”

KCb.png

– Click at the backslash \” as shown on the image below and choose the folder where the received files will be stored. In this procedure we suggested “/data/fazzt” but it may be any folder you want.

KCc.png

– Back to the “Channels” interface, click at the “1.Main” channel:

KCd.png

– And at “Interface”, choose “default”:

KCe.png

– After a while (a couple of minutes), you should see the GNC-A Broadcast channels being listed at the “Configuration”“Channels” interface.

KCf.png