netstat for AIX 6.1 - unix

is there a way to grep for network status based on pid on an AIX Box?
I'd like to know if there is a reasonable equivalent of this command below
netstat -anp | grep 2767
tcp 0 0 :::47801 :::* LISTEN 2767/java
tcp 0 0 :::33830 :::* LISTEN 2767/java
tcp 0 0 :::8009 :::* LISTEN 2767/java
tcp 0 0 :::8080 :::* LISTEN 2767/java
tcp 0 0 ::ffff:15.213.27.40:60373 ::ffff:15.213.27.21:22 ESTABLISHED 2767/java
tcp 0 0 ::ffff:15.213.27.40:35040 ::ffff:15.213.27.99:22 ESTABLISHED 2767/java
2767 being the processId

Related

MariaDB with ColumnStore spawns a lot of child processes

I'm having a strange issue with a MariaDB Community 10.6 with ColumnStore installation running on a Ubuntu 20.04.
After I start the server and my application begins sending queries to it, the process ExeMgr seems to spawn an infinity number of child processes. It keeps growing and growing and all of them has a TCP connection with the MariaDb process, which is kind of expected, since MariaDB redirects the query to the ColumnStore engine. It's worth mentioning that there are SELECT, INSERT, UPDATE and DELETE instructions going into the ColumnStore engine.
This is the output of the netstat command:
. . .
# netstat -anp | grep ExeMgr
tcp 0 0 0.0.0.0:8601 0.0.0.0:* LISTEN 89497/ExeMgr
tcp 0 0 127.0.0.1:8601 127.0.0.1:10090 ESTABLISHED 89497/ExeMgr
tcp 0 0 127.0.0.1:8601 127.0.0.1:62000 ESTABLISHED 89497/ExeMgr
tcp 0 0 127.0.0.1:8601 127.0.0.1:11230 ESTABLISHED 89497/ExeMgr
tcp 0 0 127.0.0.1:8601 127.0.0.1:61200 ESTABLISHED 89497/ExeMgr
tcp 0 0 127.0.0.1:8601 127.0.0.1:60304 ESTABLISHED 89497/ExeMgr
tcp 0 0 127.0.0.1:8601 127.0.0.1:60892 ESTABLISHED 89497/ExeMgr
tcp 0 0 127.0.0.1:8601 127.0.0.1:61992 ESTABLISHED 89497/ExeMgr
tcp 0 0 127.0.0.1:8601 127.0.0.1:61038 ESTABLISHED 89497/ExeMgr
tcp 0 0 127.0.0.1:8601 127.0.0.1:61410 ESTABLISHED 89497/ExeMgr
tcp 0 0 127.0.0.1:8601 127.0.0.1:11680 ESTABLISHED 89497/ExeMgr
tcp 0 0 127.0.0.1:8601 127.0.0.1:60838 ESTABLISHED 89497/ExeMgr
tcp 0 0 127.0.0.1:8601 127.0.0.1:61226 ESTABLISHED 89497/ExeMgr
tcp 0 0 127.0.0.1:8601 127.0.0.1:60474 ESTABLISHED 89497/ExeMgr
tcp 0 0 127.0.0.1:8601 127.0.0.1:12740 ESTABLISHED 89497/ExeMgr
tcp 0 0 127.0.0.1:8601 127.0.0.1:10986 ESTABLISHED 89497/ExeMgr
tcp 0 0 127.0.0.1:8601 127.0.0.1:10886 ESTABLISHED 89497/ExeMgr
tcp 0 0 127.0.0.1:8601 127.0.0.1:61332 ESTABLISHED 89497/ExeMgr
tcp 0 0 127.0.0.1:8601 127.0.0.1:10068 ESTABLISHED 89497/ExeMgr
. . .
And this is the output of the command pstree. At the moment when I took it, there were already 480 ExeMgr subprocesses running:
My application is a NodeJS application and it does have a connection pool. But we are working with a max number of 5 connections. When I run the commando show processlist I can see only 5 connections as expected.
Has anyone faced this problem? Maybe it is some kind of bug or a configuration that I missed appyling on the server?
Thanks for any help!

Mosquitto: Starting in local only mode but can't fix

My Rpi4 running my home automation recently upgraded itself from mosquitto version 1.6.12 to 2.0.8 and as a consequence it was starting in local only mode.
Done some digging about but still can't get it all working again, mainly used this previous helpful question Mosquitto: Starting in local only mode but my devices still can't connect.
From my mosquiito log I see
1614386087: mosquitto version 2.0.8 starting
1614386087: Config loaded from /etc/mosquitto/mosquitto.conf.
1614386087: Opening ipv4 listen socket on port 1883.
1614386087: Opening ipv6 listen socket on port 1883.
1614386087: mosquitto version 2.0.8 running
The service shows this
:~$ sudo systemctl status mosquitto
* mosquitto.service - Mosquitto MQTT Broker
Loaded: loaded (/lib/systemd/system/mosquitto.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2021-02-27 00:34:47 GMT; 10h ago
Docs: man:mosquitto.conf(5)
man:mosquitto(8)
Process: 375 ExecStartPre=/bin/mkdir -m 740 -p /var/log/mosquitto (code=exited, status=0/SUCCESS)
Process: 398 ExecStartPre=/bin/chown mosquitto: /var/log/mosquitto (code=exited, status=0/SUCCESS)
Process: 404 ExecStartPre=/bin/mkdir -m 740 -p /var/run/mosquitto (code=exited, status=0/SUCCESS)
Process: 411 ExecStartPre=/bin/chown mosquitto: /var/run/mosquitto (code=exited, status=0/SUCCESS)
Main PID: 419 (mosquitto)
Memory: 1.5M
CGroup: /system.slice/mosquitto.service
`-419 /usr/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf
Feb 27 00:34:47 Vero4K systemd[1]: Starting Mosquitto MQTT Broker...
Feb 27 00:34:47 Vero4K mosquitto[419]: 1614386087: Loading config file /etc/mosquitto/conf.d/calz.conf
Feb 27 00:34:47 Vero4K systemd[1]: Started Mosquitto MQTT Broker.
In my calz.conf file I have
listener 1883
allow_anonymous true
But my local version of Domoticz (runs on the same box) shows this in it's logs
Error: Plugin: Connection Exception: 'resolve: Host not found (authoritative)' connecting to '127.0.0.1:1883'
Error: (ShellyMQTT) Failed to connect to: 127.0.0.1:1883, Description: resolve: Host not found (authoritative)
And all my Tasmota devices now show
14:49:38 MQT: Attempting connection...
14:49:38 MQT: Connect failed to 192.168.1.19:1883, rc -2. Retry in 120 sec
I can see the port open as well
sudo netstat -tulpn | grep LISTEN
tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN 361/vsftpd
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 729/sshd
tcp 0 0 0.0.0.0:37015 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:36666 0.0.0.0:* LISTEN 608/kodi.bin
tcp 0 0 0.0.0.0:36667 0.0.0.0:* LISTEN 608/kodi.bin
tcp 0 0 0.0.0.0:1883 0.0.0.0:* LISTEN 375/mosquitto
tcp 0 0 0.0.0.0:49472 0.0.0.0:* LISTEN 763/rpc.statd
tcp 0 0 0.0.0.0:9090 0.0.0.0:* LISTEN 608/kodi.bin
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 1/init
tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN 608/kodi.bin
tcp6 0 0 :::22 :::* LISTEN 729/sshd
tcp6 0 0 :::49079 :::* LISTEN 763/rpc.statd
tcp6 0 0 :::36666 :::* LISTEN 608/kodi.bin
tcp6 0 0 :::36667 :::* LISTEN 608/kodi.bin
tcp6 0 0 :::1883 :::* LISTEN 375/mosquitto
tcp6 0 0 :::49919 :::* LISTEN -
tcp6 0 0 :::9090 :::* LISTEN 608/kodi.bin
tcp6 0 0 :::111 :::* LISTEN 1/init
tcp6 0 0 :::8080 :::* LISTEN 608/kodi.bin
/etc/mosquitto/mosquitto.conf
# Place your local configuration in /etc/mosquitto/conf.d/
#
# A full description of the configuration file is at
# /usr/share/doc/mosquitto/examples/mosquitto.conf.example
pid_file /var/run/mosquitto/mosquitto.pid
persistence true
persistence_location /var/lib/mosquitto/
log_dest file /var/log/mosquitto/mosquitto.log
include_dir /etc/mosquitto/conf.d
Any ideas?
Your problem is not that Mosquitto is not listening, it's that your devices are trying to resolve a hostname of 127.0.0.1:1883
I suspect you have entered the host:port combination into fields that should
Only contain a hostname/IP address
You probably should NOT be entering 127.0.0.1 as this always points to the device it is entered on and you should be entering the IP address the broker is actually running on.
Think I sorted it in the end, bizarre combination of things...
Updating Mosquito required the listener port and anonymous part but for some reason my Raspberry Pi on reboot had switch across to an guest network and gained a new IP so nothing was ever going to get to it :(
I realised when the port was listening and couldn't get to it then the same for everything else like kodi, ssh etc. I happened to be on the console for it as it was more convenient at the time, If I had tried to SSH to it that would of failed too.

Freeradius extra open port

I have server with available many subnets, I would like to my Freeradius only listen on specific IP addresses. I use freeradius configuration from Arch package freeradius-3.0.19-3. The only changes are:
removed IPv6 listen sections
in IPv4 listen section I configured listening address to ipaddr="192.168.1.1"
In my configuration I have also listening on 127.0.0.1:18120, but when I check open ports I got:
ss -nlp|grep radiusd
udp UNCONN 0 0 0.0.0.0:40012 0.0.0.0:* users:(("radiusd",pid=22199,fd=9))
udp UNCONN 0 0 127.0.0.1:18120 0.0.0.0:* users:(("radiusd",pid=22199,fd=7))
udp UNCONN 0 0 192.168.1.1:1812 0.0.0.0:* users:(("radiusd",pid=22199,fd=8))
This port 40012 is dynamic allocated after freeradius service restart the number is different.
ss -nlp|grep radiusd
udp UNCONN 0 0 0.0.0.0:42447 0.0.0.0:* users:(("radiusd",pid=26490,fd=9))
udp UNCONN 0 0 127.0.0.1:18120 0.0.0.0:* users:(("radiusd",pid=26490,fd=7))
udp UNCONN 0 0 192.168.1.1:1812 0.0.0.0:* users:(("radiusd",pid=26490,fd=8))
How to get rid of this port? What is a function of it?
This extra port is used for sending and receiving proxy packets. If you are not using proxying you can disable it in radiusd.conf, look for
proxy_requests = yes
$INCLUDE proxy.conf
change it to "no", and comment out the INCLUDE line.
If you want to change the address and/or port that is used, look at the listen sections in e.g. raddb/sites-enabled/default. You can add a new section with type = proxy to specifically set the address and port that is used.

Cannot connect to Wordpress docker container.on google cloud platform

Ok so I have read the other connecting to docker container questions and mine does not seem to fit any of the other ones. So here it goes. I have installed docker and docker compose. I built the Wordpress site on a my home machine and am not trying to migrate it to GCP. I got a micro instance and installed everything on there and as far as I can tell everything is up and running as it should be. But when I go to log into the site from the web browser I get -
**This site can’t be reached
xx.xxx.xx.xx refused to connect.
Try:
Checking the connection
Checking the proxy and the firewall
ERR_CONNECTION_REFUSED**
these are the ports opened up in my .yml file
- "8000:80"</b>
- "443"</b>
- "22"</b>
I have also tried 8080:80 and 80:80 to no availe
and when I check docker port it shows
80/tcp -> 0.0.0.0:32770</br>
80/tcp -> 0.0.0.0:8000</br>
22/tcp -> 0.0.0.0:32771</br>
443/tcp -> 0.0.0.0:443</br>
and when I check netstat from localhost and from another machine I get
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:17600 0.0.0.0:* LISTEN -
tcp 0 0 127.0.0.1:17603 0.0.0.0:* LISTEN -
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN -
tcp 0 0 127.0.1.1:53 0.0.0.0:* LISTEN -
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:17500 0.0.0.0:* LISTEN -
tcp6 0 0 :::80 :::* LISTEN -
tcp6 0 0 ::1:631 :::* LISTEN -
tcp6 0 0 :::17500 :::* LISTEN -
udp 0 0 0.0.0.0:49953 0.0.0.0:* -
udp 22720 0 0.0.0.0:56225 0.0.0.0:* -
udp 52224 0 127.0.1.1:53 0.0.0.0:* -
udp 19584 0 0.0.0.0:68 0.0.0.0:* -
udp 46080 0 0.0.0.0:17500 0.0.0.0:* -
udp 214144 0 0.0.0.0:17500 0.0.0.0:* -
udp 35072 0 0.0.0.0:5353 0.0.0.0:* -
udp 9216 0 0.0.0.0:5353 0.0.0.0:* -
udp 0 0 0.0.0.0:631 0.0.0.0:* -
udp6 0 0 :::44824 :::* -
udp6 16896 0 :::5353 :::* -
udp6 3840 0 :::5353 :::*
-
when I run docker ps I get:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS
NAMES
1c25a8707960 wordpress:latest "docker-entrypoint.s…" 37 minutes ago Up 37 minutes 0.0.0.0:443->443/
tcp, 0.0.0.0:32771->22/tcp, 0.0.0.0:8000->80/tcp, 0.0.0.0:32770->80/tcp wp-site_wordpress_1
96f3c136c746 mysql:5.7 "docker-entrypoint.s…" 37 minutes ago Up 37 minutes 3306/tcp
wp-site_wp-db_1
Also I have both http and https open on my google cloud firewall.
So if I am listening on port 80 and have it mapped to 8000(the port I was connecting to the container on on my dev machine) I do not understand why I can not get to the WP site in the browser. Any help would be greatly appreciated. Also I think I included everything needed for this question. If there is anything else I will be more than happy to post it .
Ok so after a lot of tries I finally figured it out. In the yml file I needed to take out port -"80" and change -"8000:80" to -"80:80" and then remove the old containers and rebuild them.

Apache Zeppelin only listening on tcp6

Because I have just started with Zeppelin, I am a bit lost.
I installed via this page: http://zeppelin.apache.org/docs/0.7.3/install/install.html
After installation Zeppelin appears to only listen on the tcp6 address on port 8080:
ubuntu#ip-10-0-1-164:~$ sudo netstat -lnp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address
State PID/Program name
tcp 0 0 0.0.0.0:22 0.0.0.0:*
LISTEN 1176/sshd
tcp 0 0 0.0.0.0:3306 0.0.0.0:*
LISTEN 1203/mysqld
tcp6 0 0 :::8080 :::*
LISTEN 13719/java
tcp6 0 0 :::22 :::*
LISTEN 1176/sshd
udp 0 0 0.0.0.0:68 0.0.0.0:*
1028/dhclient
I grepped all the installation files and didn't see where it was getting direction for the IP and port (other than template files in conf).
I was wondering if anyone had some more knowledge of Zeppelin.
It's very simple.
Remove ".template" from file name "zeppelin-site.xml.template"
Change port in "zeppelin.server.port"
Restart Zeppelin
Go to localhost:new_port in browser.
Actually, it was fine. It is listening on tcp4 even though it's not showing. The issue was with my SSH port forwarding.

Resources