Open closed port in TrueNAS

Red-Doug

Cadet
Joined
Oct 11, 2021
Messages
3
172.16.10.51:10050Not availableGet value from agent failed: cannot connect to [[172.16.10.51]:10050]: [111] Connection refused

I am trying to monitor TrueNAS with Zabbix and I am receiving error above. I have setup Zabbix agent on my TureNAS. Zabbix uses port 10050 to connect to Zabbix agents and nmap shows it closed and I am having trouble figuring out how to open it and I am hoping for assistance. One search told me FreeNAS doesn't have any closed ports. I have one internal network, 172.16.10.0/24 and I can monitor other devices with Zabbix in my network without any problems.
I have Zabbix running on a Rasberry Pi4 that is booting from an SSD drive.

nmap -Pn -p10050 172.16.10.51
Starting Nmap 7.70 ( https://nmap.org ) at 2021-10-12 15:47 CDT
Nmap scan report for 172.16.10.51
Host is up (0.00033s latency).

PORT STATE SERVICE
10050/tcp closed zabbix-agent

Nmap done: 1 IP address (1 host up) scanned in 0.16 seconds

I'm sure I'm missing something simple in my search but I just can't find a solution.

Thanks, Doug
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
Your terminology is a bit screwed up; I think we can blame nmap for that here, at least in part. "Closed" is actually a different thing that happens when a TCP session is being shut down through the FIN exchange, but idiot numskulls abound, and this weird usage has evolved.

If there is nothing running on a port, then connections are refused. Some people call this a "closed port" but it is actually a port that is refusing connections. It doesn't imply what you might think, since a port might fail to accept connections for other reasons such as the listen queue being full -- and would you consider a port that was accepting connections, just not yours at this precise moment, to be "closed"? #fail.

But let's use the bad term for now.

You open a "closed" port by running something on the port.

If you are running something on the port, it will show up in the list of services when you do "netstat -an" as a LISTEN entry.

Code:
tcp4       0      0 *.25                   *.*                    LISTEN
Code:

would be an SMTP listener waiting for mail.  Because you're getting a connection refused, it appears that you're not running what you think you are.  Don't be confused by nmap claiming that this is "zabbix-agent", it just has a list of port numbers that are commonly associated with services.

Now, for the meta-bit.  You're really not supposed to be running anything else on a FreeNAS/TrueNAS platform.  It isn't designed to be extensible in this way, and is likely to break in unexpected ways if you force random software to "install" on the base platform.  This isn't a vanilla FreeBSD box, so the "install" may have gone awry.
 

Red-Doug

Cadet
Joined
Oct 11, 2021
Messages
3
Thanks for your quick reply. I ran netstat -an and it doesn't show that TrueNAS is listening on port 10050. Hmmm I had it working recently, could be a TrueNAS update broke it...... Maybe it's been longer than I think since I checked it with Zabbix, I don't leave TrueNAS running all the time as It's an older inefficient computer I have it running on.

Thanks, again
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
Yeah, definitely expect FreeNAS/TrueNAS software updates to break guerilla add-ons like this. This is an appliance firmware and it isn't expecting you to be tinkering with it.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
Just to clarify that a little...

You installed a Zabbix agent (i.e some software) on the TrueNAS host (I guess you want to monitor it with Zabbix, so that sounds like the reasonable thing to want to do).

What you have missed is that every update to TrueNAS effectively resets the OS (potentially appearing to remove software it didn't have in the first place).

You can either install it again after every upgrade or find a way to run it from a jail.
 
Top