Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Aug 28, 2024 7:20:10 AM
Jun 3, 2016 10:53:27 AM
There are quick ways to determine if a port is listening on a particular server using PowerShell instead of requiring the telnet client feature to be installed, or relying on third-party tools.
Alternatively, Qlik Sense comes shipped with Qlik Sense Utility, which includes a Port Checker. See Qlik Sense Utility - Functions and Features.
For more information about required ports for Sense and QlikView:
Before you can carry out this step:
After this, you can use the following:
Test-NetConnection -ComputerName hostname -Port 4747
Example Qlik Sense:
Test-PortConnection -Destination localhost -Ports 80,443,4239,4241,4242,4243,4244,4248,4432,4444,4555,4570,4747,4748,4899,4900,4949,5050,5151,5252,9200
Example NPrinting:
Test-PortConnection -Destination localhost -Ports 443,4242,4243,4730,4747,4799,4992,4993,4994,4995,4996,4997,5672,15672
Hi,
Can I just check the logic in the attached powershell script? It returns success or fail depending on the results of PingSucceeded. If I run it on these two ports I get:
PS C:\Windows\system32> Test-PortConnection -Destination localhost -Ports 4241,4242
WARNING: TCP connect to localhost:4241 failed
Destination Port 4241 Port 4242
----------- --------- ---------
localhost Success Failure
But should the results not be the other way around? I.e. port 4242 is accepting TCP traffic, but port 4241 is not accepting TCP traffic (however, the server is up and is responding to an generic ping)?
Results from Test-NetConnection:
PS C:\Windows\system32> Test-NetConnection -Port 4242 -ComputerName localhost -InformationLevel Detailed
ComputerName : localhost
RemoteAddress : 127.0.0.1
RemotePort : 4242
NameResolutionResults : 127.0.0.1
::1
MatchingIPsecRules :
NetworkIsolationContext : Loopback
InterfaceAlias : Loopback Pseudo-Interface 1
SourceAddress : 127.0.0.1
NetRoute (NextHop) : 0.0.0.0
TcpTestSucceeded : True
PS C:\Windows\system32> Test-NetConnection -Port 4241 -ComputerName localhost -InformationLevel Detailed
WARNING: TCP connect to localhost:4241 failed
ComputerName : localhost
RemoteAddress : 127.0.0.1
RemotePort : 4241
NameResolutionResults : 127.0.0.1
::1
MatchingIPsecRules :
NetworkIsolationContext : Loopback
InterfaceAlias : Loopback Pseudo-Interface 1
SourceAddress : 127.0.0.1
NetRoute (NextHop) : 0.0.0.0
PingSucceeded : True
PingReplyDetails (RTT) : 0 ms
TcpTestSucceeded : False
Thanks,
Azam
Dear Mario,
Thanks for the useful post. In case you use a system in which running Powershell scripts is disabled / restricted, then you may use PortQry provided by Microsoft (URL: https://www.microsoft.com/en-us/download/details.aspx?id=17148)
Many thanks,
Ilias