Good point, I'm curious whether they would have the same DNS resolution issue using "system ping" as they were having with "native" PASE commands. I thought it was weird that there isn't a PASE equivalent ping, and that you have to use "system ping". Since it clearly is running the QSYS version of ping and piping the output into the QSH session, I would guess that you're right and this wouldn't reproduce the problem.
Original Message:
Sent: Wed January 10, 2024 03:15 PM
From: Robert Berendt
Subject: DNS Settings in QSH vs Bash
Steven,
I believe system tells it to run an os command. For example
system crtbndrpg
actually ran something. Therefore it's not running the same as these people are doing. They were experiencing different results from running ping from the os vs ping from within qsh (without system).
------------------------------
Robert Berendt IBMChampion
Original Message:
Sent: Wed January 10, 2024 02:36 PM
From: Steven Riedmueller
Subject: DNS Settings in QSH vs Bash
I ran into this and found it very confusing myself. It works like this:
$
> ping www.google.com
qsh: 001-0019 Error found searching for command ping. No such path or directory.
$
> system ping www.google.com
TCP3203: Verifying connection to host system WWW.GOOGLE.COM at address 142.250.65.164
TCP3215: PING reply 1 from 142.250.65.164 took 38 ms. 256 bytes. TTL 58.
TCP3215: PING reply 2 from 142.250.65.164 took 38 ms. 256 bytes. TTL 58.
TCP3215: PING reply 3 from 142.250.65.164 took 39 ms. 256 bytes. TTL 58.
TCP3215: PING reply 4 from 142.250.65.164 took 38 ms. 256 bytes. TTL 58.
TCP3215: PING reply 5 from 142.250.65.164 took 38 ms. 256 bytes. TTL 58.
TCP3211: Round-trip (in milliseconds) min/avg/max = 38/38/39.
TCP3210: Connection verification statistics: 5 of 5 successful (100 %).
CPC2206: Ownership of object QZSHSYSTEM in QTEMP type *USRSPC changed.
$
------------------------------
Steven Riedmueller
Certified IBM i Admin
Speaker, Mentor, and Advocate
Original Message:
Sent: Wed January 10, 2024 07:53 AM
From: Robert Berendt
Subject: DNS Settings in QSH vs Bash
STRQSH
QSH Command Entry
$
> dig nra.org
qsh: 001-0019 Error found searching for command dig. No such path or directory.
$
F3 exit
CALL QP2TERM
/QOpenSys/usr/bin/-sh
$
> dig nra.org
/QOpenSys/usr/bin/-sh: dig: not found.
$
IBM i 7.5,
PTF Group Level
SF99959 42
SF99958 23
SF99957 3
SF99956 1
SF99955 7
SF99954 11
SF99953 2
SF99952 12
SF99951 5
SF99950 5
SF99751 4
SF99750 23306
SF99677 4
SF99676 6
SF99673 3
SF99671 9
------------------------------
Robert Berendt IBMChampion
Original Message:
Sent: Wed January 10, 2024 07:40 AM
From: Andrew Smith
Subject: DNS Settings in QSH vs Bash
Hi Robert,
I've used a mixture but the main one here is curl (from the Open Source Packages) as I am accessing a REST API using it.
I've also copied some packages from an AIX 7.2 box to get access to things like ping, but I don't think that is the recommended way of doing things π
"dig +search" works from QP2TERM but when I use curl from QSH I get the following:
curl: (6) getaddrinfo() thread failed to start
Running it from QP2TERM I get the expected result
Cheers
Andrew
Original Message:
Sent: 1/10/2024 7:32:00 AM
From: Robert Berendt
Subject: RE: DNS Settings in QSH vs Bash
What commands do you use to resolve? Basically I am trying it here but ping, nslookup, telnet, tracert are all commands not found in STRQSH or CALL QP2TERM.
------------------------------
Robert Berendt IBMChampion
Original Message:
Sent: Tue January 09, 2024 09:48 AM
From: Andrew Smith
Subject: DNS Settings in QSH vs Bash
Hi All
Is anyone on here familiar with the DNS setup, or rather differences, when accessing an IBM i through SSH to an interactive shell session vs QSH on a regular TN5250 session?
I have a weird one - in green screen DNS all works as expected (as per CFGTCP settings)
In QSH - I get a resolution failure for any attempts to resolve. It eventually times out with no servers found.
In Bash/KSH/SH directly through an SSH session it all works as expected.
In the QSHELL session, I can resolve stuff if I do "host destination_name DNS_server_ip" but unless I do that it fails to resolve.
Is there an environment variable here somewhere that tells it where to look? In AIX it would be done in /etc/resolv.conf - is that relevant?
This is on a V7R3 box if it makes any difference?
Thanks in advance
Cheers
Andrew
------------------------------
Andrew Smith
------------------------------