Skip to content

Margus Roo –

If you're inventing and pioneering, you have to be willing to be misunderstood for long periods of time

  • Cloudbreak Autoscale fix
  • Endast

Category: Linux

Build your own docker image

Posted on November 25, 2019 by margusja

Wanted to test Centos 8 so created docker image to test it.

This is my Dockerfile

FROM centos:latest
RUN yum -y install httpd; yum clean all; systemctl enable httpd.service
EXPOSE 80
CMD ["/usr/sbin/init"]

Build image

docker build --rm -t local/c8-systemd-httpd .

Posted in Linux

nslookup

Posted on September 27, 2019 by margusja

mintty screen dump

$ nslookup.exe -type=SOA -debug roo.ee                                                                                                                                                                                                                                         
Non-authoritative answer:
------------
Got answer:
HEADER:
opcode = QUERY, id = 1, rcode = NXDOMAIN
header flags: response, want recursion, recursion avail.
questions = 1, answers = 0, authority records = 1, additional = 0

QUESTIONS:
8.49.98.192.in-addr.arpa, type = PTR, class = IN
AUTHORITY RECORDS:
-> 98.192.in-addr.arpa
ttl = 2797 (46 mins 37 secs)
primary name server = sjoki.uta.fi
responsible mail addr = vg.sjoki.uta.fi
serial = 2019030709
refresh = 28800 (8 hours)
retry = 7200 (2 hours)
expire = 1209600 (14 days)
default TTL = 86400 (1 day)

------------
Server: UnKnown
Address: 192.98.49.8

------------
Got answer:
HEADER:
opcode = QUERY, id = 2, rcode = NOERROR
header flags: response, want recursion, recursion avail.
questions = 1, answers = 1, authority records = 2, additional = 0

QUESTIONS:
roo.ee, type = SOA, class = IN
ANSWERS:
-> roo.ee
ttl = 13889 (3 hours 51 mins 29 secs)
primary name server = ns1.dbweb.ee
responsible mail addr = hostmaster.roo.ee
serial = 2017102701
refresh = 14400 (4 hours)
retry = 3600 (1 hour)
expire = 1209600 (14 days)
default TTL = 86400 (1 day)
AUTHORITY RECORDS:
-> roo.ee
nameserver = ns1.dbweb.ee
ttl = 3272 (54 mins 32 secs)
-> roo.ee
nameserver = ns2.dbweb.ee
ttl = 3272 (54 mins 32 secs)

------------
roo.ee
ttl = 13889 (3 hours 51 mins 29 secs)
primary name server = ns1.dbweb.ee
responsible mail addr = hostmaster.roo.ee
serial = 2017102701
refresh = 14400 (4 hours)
retry = 3600 (1 hour)
expire = 1209600 (14 days)
default TTL = 86400 (1 day)

roo.ee
nameserver = ns1.dbweb.ee
ttl = 3272 (54 mins 32 secs)
roo.ee
nameserver = ns2.dbweb.ee
ttl = 3272 (54 mins 32 secs)
Posted in Linux

Symmetric versus Asymmetric Encryption

Posted on September 26, 2019 by margusja

Found a nice picture explains very well differences between symmetric encryption versus asymmetric encryption

https://medium.com/@peterchang_82818/review-3-main-types-of-encryption-hash-symmetric-asymmetric-tutorial-example-understand-5e57c290324c

Posted in Linux

RF power amplifier

Posted on September 5, 2019 - September 5, 2019 by margusja

Nüüd kus mul on 1MHz colpitts signaali generaator valmis tuleks genereeritavat signaali hakata võimendama. Kogun siia power amplifier (PA) kohta informatsiooni.

Küsimused, millele ma praegu vastust otsin:

  • Kui suur on hetkel signaaligeneraatrori väljundvõimsus?
  • Mul on ilmselt vaja kõik komponendid varjestada
  • Millist antenni ma vajan?

Hea video PA kohta

https://www.electronics-tutorials.ws/amplifier/amp_1.html

Posted in Linux

Determine Line of Flight for jump run

Posted on August 6, 2019 by margusja

When you look at the winds aloft report the wind direction usually varies at 3, 6, 9, and 12 thousand feet. Average the wind direction from the winds aloft report and the surface wind. Use that average as a guide. Example:

AltitudeDirection
Surface240
3000260
6000270
9000270
12000290

1330 / 5 = 266 Degree

Posted in Linux

Skydiving exit point equation

Posted on August 6, 2019 by margusja

Freefall Drift=Average wind during freefall/duration of freefall x 5280 feet

Example:

AltitudeVelocity(knots)
300015
600022
900028
1200035

100 / 4 = 25 knots25 knots/60 seconds x 5280 feet = 2,165 feetRounded to 2,000 feet of approximate Freefall Drift

Posted in Linux

GSSException: Failure unspecified at GSS-API level (Mechanism level: Checksum failed)

Posted on May 23, 2019 - May 23, 2019 by margusja

Software: Hortonworks HDF

OS: RHEL 7.x

Set up two Schema Registries. Modified schema registries configuration in a way that Kerberos SPN are similar. Defaul Ambari set up SPN as SERVICE/FQDN@REALM.

Set up AWS ELB.

When requesting a resource I got on success response and one Error 403 GSSException: Failure unspecified at GSS-API level (Mechanism level: Checksum failed)

After shut down one schema registry turned out all request were ok, so second schema registry responded every time GSSException: Failure unspecified at GSS-API level (Mechanism level: Checksum failed)

Used kvno for debugging

In first server:

[root@ip-10-113-86-26 ~]# kvno -k /etc/security/keytabs/spnego.service.keytab HTTP/registry.dp.example.net
HTTP/registry.dp.example.net@DP.EXAMPLE.NET: kvno = 3, keytab entry valid

In second server:

[root@ip-10-113-86-4 ~]# kvno -k /etc/security/keytabs/spnego.service.keytab HTTP/registry.dp.example.net
HTTP/registry.dp.example.net@DP.EXAMPLE.NET: kvno = 3, keytab entry invalid

[root@ip-10-113-86-4 ~]# klist -kte /etc/security/keytabs/spnego.service.keytab
Keytab name: FILE:/etc/security/keytabs/spnego.service.keytab
KVNO Timestamp Principal
—- ——————- ——————————————————
2 05/22/2019 13:56:14 HTTP/ip-10-113-86-4.eu-central-1.compute.internal@DP.EXAMPLE.NET (aes128-cts-hmac-sha1-96)
2 05/22/2019 13:56:14 HTTP/ip-10-113-86-4.eu-central-1.compute.internal@DP.EXAMPLE.NET (aes256-cts-hmac-sha1-96)
2 05/22/2019 13:56:14 HTTP/ip-10-113-86-4.eu-central-1.compute.internal@DP.EXAMPLE.NET (arcfour-hmac)
2 05/22/2019 13:56:14 HTTP/ip-10-113-86-4.eu-central-1.compute.internal@DP.EXAMPLE.NET (des3-cbc-sha1)
2 05/22/2019 13:56:14 HTTP/ip-10-113-86-4.eu-central-1.compute.internal@DP.EXAMPLE.NET (des-cbc-md5)
2 05/22/2019 14:16:11 HTTP/registry.dp.example.net@DP.EXAMPLE.NET (aes256-cts-hmac-sha1-96)
2 05/22/2019 14:16:11 HTTP/registry.dp.example.net@DP.EXAMPLE.NET (aes128-cts-hmac-sha1-96)

[root@ip-10-113-86-4 ~]# kadmin -s 10.113.86.28 -p admin/admin
Authenticating as principal admin/admin with password.
Password for admin/admin@DP.EXAMPLE.NET:
kadmin: getprinc HTTP/registry.dp.example.net@DP.EXAMPLE.NET
Principal: HTTP/registry.dp.example.net@DP.EXAMPLE.NET
Expiration date: [never]
Last password change: Wed May 22 14:16:48 UTC 2019
Password expiration date: [never]
Maximum ticket life: 1 day 00:00:00
Maximum renewable life: 0 days 00:00:00
Last modified: Wed May 22 14:16:48 UTC 2019 (admin/admin@DP.EXAMPLE.NET)
Last successful authentication: [never]
Last failed authentication: [never]
Failed password attempts: 0
Number of keys: 2
Key: vno 3, aes256-cts-hmac-sha1-96
Key: vno 3, aes128-cts-hmac-sha1-96
MKey: vno 1
Attributes:
Policy: [none]
kadmin:

The problem is that in case you use kadmin ktadd it will increase printcipal KVO

Posted in Linux

{{ variable }} in Ambari

Posted on May 15, 2019 - May 15, 2019 by margusja

I have always problem how to know where defined variables I can see via Ambari GUI – {{ some text }}

First this pattern is called Jinja Template framework

Lets learn via example

I have HDF schema registry and I don’t like in example kerberos.principal value Ambari puts there HTTP/[hostname]@REALM. I put two schema registries behind AWS EBL and I need static SPN.

Jinja template is found /var/lib/ambari-agent/cache/common-services/REGISTRY/0.3.0/package/templates/registry.yaml.j2

From template I can find {{registry_ui_jaas_principal}}

Ambari uses lots of params.py files to generate variables. The one I am interested in is /var/lib/ambari-agent/cache/common-services/REGISTRY/0.3.0/package/scripts/params.py and it is copy of /var/lib/ambari-server/resources/mpacks/hdf-ambari-mpack-3.3.1.0-10/common-services/REGISTRY/0.3.0/package/scripts/params.py

Do not change file under cache because after ambari restart static one will overwrites this so change
/var/lib/ambari-server/resources/mpacks/hdf-ambari-mpack-3.3.1.0-10/common-services/REGISTRY/0.3.0/package/scripts/params.py

Posted in Linux

Debug remote port using *nix shell

Posted on February 6, 2019 - February 7, 2019 by margusja

(echo >/dev/tcp/[FQDN]/[port]) &>/dev/null && echo “open” || echo “close”

Test it.

Open in one terminal port (in example 8081) with

nc -l 8081

In second terminal

cat > /dev/tcp/localhost/8081

margusja@IRack:~$ cat </dev/tcp/[ssh server]/22

SSH-2.0-OpenSSH_7.4

Posted in Linux

Raadiolained, moduleerimine, induktsooon

Posted on April 2, 2018 - April 10, 2018 by margusja

Kogun siia enda jaoks subjektis toodu teemaga seotud linke ja infot, et neist ükspäeb enda jaoks terviklik pilt kokku panna.

Sageduse suurenedes suureneb aktiivtakistus pindefekti mõjul – juhtmes indutseeritud pöörisvoolude mõjul kulgeb vool rohkem pinnakihtides. Juhtme südamik jääb põhiliselt kasutamata, seetõttu juhtme ristlõikepind näivalt väheneb ja takistus suureneb. (Allikas: http://www.ene.ttu.ee/leonardo/elektro_alused/6Vahelduvvool.pdf)

 

 

 

Allikas: https://commons.wikimedia.org/wiki/Main_Page

 

 

https://www.electronics-tutorials.ws/oscillator/oscillators.html

http://www.learnabout-electronics.org/Oscillators/osc10.php

Posted in Linux

Posts navigation

Older posts
Newer posts

The Master

Categories

  • Apache
  • Apple
  • Assembler
  • Audi
  • BigData
  • BMW
  • C
  • Elektroonika
  • Fun
  • Hadoop
  • help
  • Infotehnoloogia koolis
  • IOT
  • IT
  • IT eetilised
  • Java
  • Langevarjundus
  • Lapsed
  • lastekodu
  • Linux
  • M-401
  • Mac
  • Machine Learning
  • Matemaatika
  • Math
  • MSP430
  • Muusika
  • neo4j
  • openCL
  • Õpetaja identiteet ja tegevusvõimekus
  • oracle
  • PHP
  • PostgreSql
  • ProM
  • R
  • Turvalisus
  • Varia
  • Windows
Proudly powered by WordPress | Theme: micro, developed by DevriX.