-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
XMLRPC calls makes pfSense php-fpm loop crash in 2.7.0 #174
Comments
Probably related because it started with 2.7.0 and after switching to 2023-5-1 it continues: 13:12:12 PHP ERROR: Type: 1, File: /etc/inc/util.inc, Line: 2479, Message: Uncaught TypeError: Unsupported operand types: string / int in /etc/inc/util.inc:2479 When I remove hass-pfsense these messages disappear. It worked flawlessly in 2.6.0. |
I think I also have this proble, some logs from pfSense
|
Same issues I think, the XMLRPC which is apprently handled by php-fpm is loop crashing. This leads to some issues on pfSense side which needed to be rebooted at some point, in fact it crashes every time the call from hass-pfsense is called. I also found a new byte of code which is precisely in the getMemory part which have been changed in the 2.7 version, so it can be the issue. Will try to open a ticket on pfSense part, because I don't know if the integration can do anything. |
I checked for the pfSense code and it appears there was a PR around safety-belts around the faulty code the XMLRPC use: |
On 20-10-2023 09:48, Jay wrote:
Probably related because it started with 2.7.0 and after switching
to 2023-5-1 it continues:
13:12:12 PHP ERROR: Type: 1, File: /etc/inc/util.inc, Line: 2479,
Message: Uncaught TypeError: Unsupported operand types: string /
int in /etc/inc/util.inc:2479 Stack trace: #0
/etc/inc/pfsense-utils.inc(2013): get_memory() #1
<#1>
/usr/local/www/includes/functions.inc.php(104):
pfsense_default_state_size() #2
<#2>
/usr/local/www/includes/functions.inc.php(46): get_pfstate(true)
#3 <#3>
/usr/local/www/getstats.php(40): get_stats(Array) #4
<#4>
{main} thrown
When I remove hass-pfsense these messages disappear. It worked
flawlessly in 2.6.0.
I checked for the pfSense code and it appears there was a PR around
safety-belts around the faulty code the XMLRPC use:
***@***.***
<pfsense/pfsense@054c254>
Message ID: ***@***.***>
If I read the code correctly the PR has to do with memory allocation.
That could make sense because I changed hardware where pfSense got 8 GB
instead of 2 GB. And with 2GB it does pass this safety belt different
AFAICS.
|
So the only solution regarding 2.7.0 for now is to wait for an (pfsense) patch (ref issue) or disable the integration? |
I didn't got much time to investigate, so my solution was to disable totally the integration (Which I was only used for presence detection) and migrate to HomeKit stuff. The only thing if you used this is to wait for them to do a fix ... But with pfSense releasing versions every x month I think it will not be out for like 6-12 month |
Sorry team just getting up to date on this (my time to maintain is limited currently). So this is caused by a bug in pfsense that could happen outside the integration? Anything I can do to mitigate the issue? |
On 13-11-2023 13:14, Travis Glenn Hansen wrote:
Sorry team just getting up to date on this (my time to maintain is
limited currently). So this is caused by a bug in pfsense that could
happen outside the integration? Anything I can do to mitigate the issue?
—
Reply to this email directly, view it on GitHub
<#174 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/APID6ZTP6VBKZ7BIYO7C2STYEIFKDAVCNFSM6AAAAAA5JUKLUSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBYGA2DOOJQHE>.
You are receiving this because you commented.Message ID:
***@***.***>
With the last update of pfSense 23.09 or 2.7.01 the error has
disappeared. But I cannot put my finger on which part of the update
resolved it.
…--------------3mLWIc0RpFwwZIKmAHXQaWN0
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit
<!DOCTYPE html><html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<div class="moz-cite-prefix">On 13-11-2023 13:14, Travis Glenn
Hansen wrote:<br>
</div>
<blockquote type="cite" ***@***.***">
<p dir="auto">Sorry team just getting up to date on this (my time
to maintain is limited currently). So this is caused by a bug in
pfsense that could happen outside the integration? Anything I
can do to mitigate the issue?</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>
Reply to this email directly, <a href="#174 (comment)" moz-do-not-send="true">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/APID6ZTP6VBKZ7BIYO7C2STYEIFKDAVCNFSM6AAAAAA5JUKLUSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBYGA2DOOJQHE" moz-do-not-send="true">unsubscribe</a>.<br>
You are receiving this because you commented.<img src="https://github.com/notifications/beacon/APID6ZRY372APKNFSJTDB63YEIFKDA5CNFSM6AAAAAA5JUKLUSWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTLYSPSK.gif" alt="" moz-do-not-send="true" width="1" height="1"><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message
ID: <span><travisghansen/hass-pfsense/issues/174/1808047909</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
***@***.***": "http://schema.org",
***@***.***": "EmailMessage",
"potentialAction": {
***@***.***": "ViewAction",
"target": "#174 (comment)",
"url": "#174 (comment)",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
***@***.***": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>
</blockquote>
<p>With the last update of pfSense 23.09 or 2.7.01 the error has
disappeared. But I cannot put my finger on which part of the
update resolved it.<br>
</p>
</body>
</html>
--------------3mLWIc0RpFwwZIKmAHXQaWN0--
|
Hi,
Since I migrated to pfSense 2.7.0-RELEASE (amd64) I am facing the issue of php-fsm on pfSense when I activate the integration (Everythings worked fine in pfSense 2.5.6)
Logs of the crash in Status -> System Logs
Error in Home Assistant about firmware refresh
Logger: homeassistant Source: custom_components/pfsense/pypfsense/__init__.py:141 Integration: pfSense (documentation, issues) First occurred: 16:31:29 (1 occurrences) Last logged: 16:31:29
Error doing job: Future exception was never retrieved
Traceback (most recent call last):
File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/pfsense/init.py", line 229, in inner
response = func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/pfsense/init.py", line 252, in _refresh_firmware_update_info
raise err
File "/config/custom_components/pfsense/init.py", line 245, in _refresh_firmware_update_info
self._firmware_update_info = self._client.get_firmware_update_info()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/pfsense/pypfsense/init.py", line 111, in inner
raise err
File "/config/custom_components/pfsense/pypfsense/init.py", line 108, in inner
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/pfsense/pypfsense/init.py", line 213, in get_firmware_update_info
response = self._exec_php(script)
^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/pfsense/pypfsense/init.py", line 98, in inner
response = func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/pfsense/pypfsense/init.py", line 141, in _exec_php
response = self._get_proxy().pfsense.exec_php(script)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/xmlrpc/client.py", line 1122, in call
return self.__send(self.__name, args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/xmlrpc/client.py", line 1464, in __request
response = self.__transport.request(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/xmlrpc/client.py", line 1166, in request
return self.single_request(host, handler, request_body, verbose)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/xmlrpc/client.py", line 1196, in single_request
raise ProtocolError(
xmlrpc.client.ProtocolError: <ProtocolError for xxx:xxx@/xmlrpc.php: 502 Bad Gateway>
Error repeated each actualization
Logger: custom_components.pfsense.pypfsense
Source: custom_components/pfsense/pypfsense/init.py:110
Integration: pfSense (documentation, issues)
First occurred: 16:31:29 (275 occurrences)
Last logged: 18:20:58
Unexpected get_firmware_update_info error err=<ProtocolError for xxx:xxx@/xmlrpc.php: 502 Bad Gateway>, type(err)=<class 'xmlrpc.client.ProtocolError'>
Unexpected get_config error err=<ProtocolError for xxx:xxx@/xmlrpc.php: 502 Bad Gateway>, type(err)=<class 'xmlrpc.client.ProtocolError'>
Unexpected get_system_info error err=<ProtocolError for xxx:xxx@/xmlrpc.php: 502 Bad Gateway>, type(err)=<class 'xmlrpc.client.ProtocolError'>
Last issue (May due to php-fsm crashing)
Logger: custom_components.pfsense
Source: custom_components/pfsense/pypfsense/init.py:141
Integration: pfSense (documentation, issues)
First occurred: 16:31:29 (274 occurrences)
Last logged: 18:20:58
Unexpected error fetching Helium pfSense state data: <ProtocolError for xxx:xxx@/xmlrpc.php: 502 Bad Gateway>
Unexpected error fetching Helium pfSense device tracker state data: <ProtocolError for xxx:xxx@/xmlrpc.php: 502 Bad Gateway>
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 290, in _async_refresh
self.data = await self._async_update_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 246, in _async_update_data
return await self.update_method()
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/pfsense/init.py", line 96, in async_update_data
await hass.async_add_executor_job(lambda: data.update())
File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/pfsense/init.py", line 96, in
await hass.async_add_executor_job(lambda: data.update())
^^^^^^^^^^^^^
File "/config/custom_components/pfsense/init.py", line 531, in update
raise err
File "/config/custom_components/pfsense/init.py", line 337, in update
new_state["config"] = self._get_config()
^^^^^^^^^^^^^^^^^^
File "/config/custom_components/pfsense/init.py", line 229, in inner
response = func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/pfsense/init.py", line 268, in _get_config
return self._client.get_config()
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/pfsense/pypfsense/init.py", line 111, in inner
raise err
File "/config/custom_components/pfsense/pypfsense/init.py", line 108, in inner
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/pfsense/pypfsense/init.py", line 310, in get_config
response = self._exec_php(script)
^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/pfsense/pypfsense/init.py", line 98, in inner
response = func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/pfsense/pypfsense/init.py", line 141, in _exec_php
response = self._get_proxy().pfsense.exec_php(script)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/xmlrpc/client.py", line 1122, in call
return self.__send(self.__name, args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/xmlrpc/client.py", line 1464, in __request
response = self.__transport.request(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/xmlrpc/client.py", line 1166, in request
return self.single_request(host, handler, request_body, verbose)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/xmlrpc/client.py", line 1196, in single_request
raise ProtocolError(
xmlrpc.client.ProtocolError: <ProtocolError for xxx:xxx@/xmlrpc.php: 502 Bad Gateway>
If I check error are continous. I don't recode any info from pfsense apart from the WAN interface status & some devices trackers.
The text was updated successfully, but these errors were encountered: