Skip to content
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

Constant Status 504 - Gateway Timeout errors - is this normal? #885

Open
rsmolen opened this issue Jan 24, 2025 · 5 comments
Open

Constant Status 504 - Gateway Timeout errors - is this normal? #885

rsmolen opened this issue Jan 24, 2025 · 5 comments
Assignees
Labels
question Further information is requested

Comments

@rsmolen
Copy link

rsmolen commented Jan 24, 2025

I am having a problem where I am getting Status 504 - Gateway Timeout errors most of the time. If I have the refreshInterval set at 1800000, meaning that the API is pinged 48 times a day, on average I am seeing a Status 504 error at least 47 of those 48 times. I do get the good data from the API about once per day on average, so I think everything is generally configured correctly.

I read the "Helpful Usage Notes" section and I know that the API is temperamental, but I don't think this is normal and I was wondering if anyone had any insights as to what is going on here. As another data point, before the API required the TOTP codes, I was only getting the Status 504 error maybe once or twice per day instead of most of the time.

I have tried increasing the refreshInterval, but that does not seem to have made a difference. I have also tried generating a new v4 uuid, but that doesn't seem to have done anything either.

Does anyone have any thoughts as to what I might be doing wrong? I have included my logs below (VIN, IP addresses, etc. are redacted). I just restarted the add-on before taking this log, but if the pattern holds, I will receive the same "error: ..." line every 30 minutes.

Thanks in advance for any help.

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
[08:04:24] INFO: Starting OnStar2MQTT for Vehicle 1...

[email protected] start
node src/index.js
info: OnStar Config: {"onstarConfig":{"allowCommands":true,"checkRequestStatus":true,"deviceId":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX","onStarPin":"####","onStarTOTP":"","password":"","refreshInterval":1800000,"requestPollingIntervalSeconds":6,"requestPollingTimeoutSeconds":60,"tokenLocation":"/ssl/vehicle1","username":"[email protected]","vin":"XXXXXXXXXXXXXXXXX"},"timestamp":"2025-01-24 08:04:24"}
info: MQTT Config: {"mqttConfig":{"host":"192.168.XXX.XXX","listAllSensorsTogether":false,"namePrefix":"","password":"
*","pollingStatusTopic":"homeassistant/onstar2mqtt/vehicle1/polling","port":1883,"prefix":"homeassistant","rejectUnauthorized":true,"tls":false,"username":"XXXXXXXX"},"timestamp":"2025-01-24 08:04:24"}
info: !-- Starting OnStar2MQTT Polling --! {"timestamp":"2025-01-24 08:04:24"}
info: Requesting vehicles {"timestamp":"2025-01-24 08:04:24"}
info: Vehicle request status: {"status":"success","timestamp":"2025-01-24 08:04:27"}
info: Connecting to MQTT: {"config":{"rejectUnauthorized":true,"username":"XXXXXXXX","will":{"payload":"false","retain":true,"topic":"homeassistant/XXXXXXXXXXXXXXXXX/available"}},"timestamp":"2025-01-24 08:04:27","url":"mqtt://192.168.XXX.XXX:1883"}
info: Connected to MQTT! {"timestamp":"2025-01-24 08:04:27"}
info: Subscribed to command topic: homeassistant/XXXXXXXXXXXXXXXXX/command {"timestamp":"2025-01-24 08:04:27"}
info: pollingStatusTopicState: homeassistant/onstar2mqtt/vehicle1/polling/state {"timestamp":"2025-01-24 08:04:27"}
info: Polling Status Message Sensors Published! {"timestamp":"2025-01-24 08:04:27"}
info: pollingStatusTopicTF, homeassistant/onstar2mqtt/vehicle1/polling/lastpollsuccessful {"timestamp":"2025-01-24 08:04:27"}
info: Polling Status TF Sensor Published! {"timestamp":"2025-01-24 08:04:27"}
info: Requesting diagnostics {"timestamp":"2025-01-24 08:04:27"}
info: Sensor Message Configs Published! {"timestamp":"2025-01-24 08:04:27"}
warn: Button Config Topic: "homeassistant/button/XXXXXXXXXXXXXXXXX/alert/config" {"timestamp":"2025-01-24 08:04:27"}
warn: Button Config Topic: "homeassistant/button/XXXXXXXXXXXXXXXXX/alertflash/config" {"timestamp":"2025-01-24 08:04:27"}
warn: Button Config Topic: "homeassistant/button/XXXXXXXXXXXXXXXXX/alerthonk/config" {"timestamp":"2025-01-24 08:04:27"}
warn: Button Config Topic: "homeassistant/button/XXXXXXXXXXXXXXXXX/cancelalert/config" {"timestamp":"2025-01-24 08:04:27"}
warn: Button Config Topic: "homeassistant/button/XXXXXXXXXXXXXXXXX/lockdoor/config" {"timestamp":"2025-01-24 08:04:27"}
warn: Button Config Topic: "homeassistant/button/XXXXXXXXXXXXXXXXX/unlockdoor/config" {"timestamp":"2025-01-24 08:04:27"}
warn: Button Config Topic: "homeassistant/button/XXXXXXXXXXXXXXXXX/locktrunk/config" {"timestamp":"2025-01-24 08:04:27"}
warn: Button Config Topic: "homeassistant/button/XXXXXXXXXXXXXXXXX/unlocktrunk/config" {"timestamp":"2025-01-24 08:04:27"}
warn: Button Config Topic: "homeassistant/button/XXXXXXXXXXXXXXXXX/start/config" {"timestamp":"2025-01-24 08:04:27"}
warn: Button Config Topic: "homeassistant/button/XXXXXXXXXXXXXXXXX/cancelstart/config" {"timestamp":"2025-01-24 08:04:27"}
warn: Button Config Topic: "homeassistant/button/XXXXXXXXXXXXXXXXX/getlocation/config" {"timestamp":"2025-01-24 08:04:27"}
warn: Button Config Topic: "homeassistant/button/XXXXXXXXXXXXXXXXX/diagnostics/config" {"timestamp":"2025-01-24 08:04:27"}
warn: Button Config Topic: "homeassistant/button/XXXXXXXXXXXXXXXXX/enginerpm/config" {"timestamp":"2025-01-24 08:04:27"}
warn: Button Config Topic: "homeassistant/button/XXXXXXXXXXXXXXXXX/chargeoverride/config" {"timestamp":"2025-01-24 08:04:27"}
warn: Button Config Topic: "homeassistant/button/XXXXXXXXXXXXXXXXX/cancelchargeoverride/config" {"timestamp":"2025-01-24 08:04:27"}
warn: Button Config Topic: "homeassistant/button/XXXXXXXXXXXXXXXXX/getchargingprofile/config" {"timestamp":"2025-01-24 08:04:27"}
warn: Button Config Topic: "homeassistant/button/XXXXXXXXXXXXXXXXX/setchargingprofile/config" {"timestamp":"2025-01-24 08:04:27"}
warn: Button for Command Status Config Topic: "homeassistant/button/XXXXXXXXXXXXXXXXX/alert_monitor/config" {"timestamp":"2025-01-24 08:04:27"}
warn: Button for Command Status Config Topic: "homeassistant/button/XXXXXXXXXXXXXXXXX/alertflash_monitor/config" {"timestamp":"2025-01-24 08:04:27"}
warn: Button for Command Status Config Topic: "homeassistant/button/XXXXXXXXXXXXXXXXX/alerthonk_monitor/config" {"timestamp":"2025-01-24 08:04:27"}
warn: Button for Command Status Config Topic: "homeassistant/button/XXXXXXXXXXXXXXXXX/cancelalert_monitor/config" {"timestamp":"2025-01-24 08:04:27"}
warn: Button for Command Status Config Topic: "homeassistant/button/XXXXXXXXXXXXXXXXX/lockdoor_monitor/config" {"timestamp":"2025-01-24 08:04:27"}
warn: Button for Command Status Config Topic: "homeassistant/button/XXXXXXXXXXXXXXXXX/unlockdoor_monitor/config" {"timestamp":"2025-01-24 08:04:27"}
warn: Button for Command Status Config Topic: "homeassistant/button/XXXXXXXXXXXXXXXXX/locktrunk_monitor/config" {"timestamp":"2025-01-24 08:04:27"}
warn: Button for Command Status Config Topic: "homeassistant/button/XXXXXXXXXXXXXXXXX/unlocktrunk_monitor/config" {"timestamp":"2025-01-24 08:04:27"}
warn: Button for Command Status Config Topic: "homeassistant/button/XXXXXXXXXXXXXXXXX/start_monitor/config" {"timestamp":"2025-01-24 08:04:27"}
warn: Button for Command Status Config Topic: "homeassistant/button/XXXXXXXXXXXXXXXXX/cancelstart_monitor/config" {"timestamp":"2025-01-24 08:04:27"}
warn: Button for Command Status Config Topic: "homeassistant/button/XXXXXXXXXXXXXXXXX/getlocation_monitor/config" {"timestamp":"2025-01-24 08:04:27"}
warn: Button for Command Status Config Topic: "homeassistant/button/XXXXXXXXXXXXXXXXX/diagnostics_monitor/config" {"timestamp":"2025-01-24 08:04:27"}
warn: Button for Command Status Config Topic: "homeassistant/button/XXXXXXXXXXXXXXXXX/enginerpm_monitor/config" {"timestamp":"2025-01-24 08:04:27"}
warn: Button for Command Status Config Topic: "homeassistant/button/XXXXXXXXXXXXXXXXX/chargeoverride_monitor/config" {"timestamp":"2025-01-24 08:04:27"}
warn: Button for Command Status Config Topic: "homeassistant/button/XXXXXXXXXXXXXXXXX/cancelchargeoverride_monitor/config" {"timestamp":"2025-01-24 08:04:27"}
warn: Button for Command Status Config Topic: "homeassistant/button/XXXXXXXXXXXXXXXXX/getchargingprofile_monitor/config" {"timestamp":"2025-01-24 08:04:27"}
warn: Button for Command Status Config Topic: "homeassistant/button/XXXXXXXXXXXXXXXXX/setchargingprofile_monitor/config" {"timestamp":"2025-01-24 08:04:27"}
info: Button Configs Published! {"timestamp":"2025-01-24 08:04:27"}
error: Error Polling Data: {"error":{"error":{"message":"Request Failed with status 504 - Gateway Timeout","request":{"method":"POST"},"response":{"data":"","headers":{"cache-control":"no-store","connection":"keep-alive","content-length":"0","date":"Fri, 24 Jan 2025 13:04:37 GMT","pragma":"no-cache","request-context":"appId=cid-v1:XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"},"status":504,"statusText":"Gateway Timeout"},"stack":"Error: Request Failed with status 504 - Gateway Timeout\n at RequestService. (/app/node_modules/onstarjs2/dist/index.cjs:41321:32)\n at Generator.throw ()\n at rejected (/app/node_modules/onstarjs2/dist/index.cjs:44:65)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)"}},"timestamp":"2025-01-24 08:04:37"}

@BigThunderSR
Copy link
Owner

Someone had a similar issue with my NodeRED module here and for reasons I cannot explain, an uninstall/reinstall fixed the issue for them. Maybe try the same with the add-on? BigThunderSR/node-red-contrib-onstar2#311

@BigThunderSR BigThunderSR added the question Further information is requested label Jan 25, 2025
@rsmolen
Copy link
Author

rsmolen commented Jan 25, 2025

Unfortunately, uninstalling and reinstalling did not work for me. I am still experiencing 504 Gateway Timeouts every 30 minutes.

@BigThunderSR
Copy link
Owner

Both of my vehicles are ICE and the best chances that I get data from both vehicles is if the data is requested while the engines have been running for several minutes with the ignition actually on (remote start doesn't count). Beyond that, it is very much a roll of the dice on what the GM side decides to do.

@rsmolen
Copy link
Author

rsmolen commented Jan 26, 2025

I have a Bolt EV, and I have tried running the engine and driving around, but I am still getting 504 errors most of the time. I wonder if it could possibly be the version of the OnStar plan that I have. The EVs come with EV Access and Connected Access OnStar plans included, but I did not purchase any additional OnStar plan. I guess it is possible this is the issue, but as I noted previously, the add-on was working fine prior to the TOTP requirement - and I am getting data sometimes, just not most of the time.

@BigThunderSR
Copy link
Owner

Gotcha. Unfortunately, I don't have any other suggestions since I'm not able to replicate the same with mine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants