[Help] 502 Bad Gateway after reboot  [SOLVED]

Initialization of newly purchased TNAS or re-installation of your TNAS
User avatar
Nikdfish
Posts: 33
Joined: 22 May 2025, 04:15
United States of America

Re: [Help] 502 Bad Gateway after reboot  [SOLVED]

Post by Nikdfish »

I just got bit by the backup configuration bug on the second day after getting my F2-423. I am running TOS 6.0.763-00165 wih an SSD as volume 1. Shortly after doing a configuration backup I got the "user does not exist" on trying to login with any userid. I tried a reboot from the front panel. After the restart, attempted TNAS PC logins failed with "connection timed out" messages. I got the "502 bad gateway" after trying access via the TNAS IP.

Using SSH for access, deleting /etc/p per the above & rebooting got things running again. Thanks for this post!

I wish I could put a big red x over the "backup configuration" option until things get fixed. Maybe there should be a bold print warning posted to not use that option until it gets fixed.

Nick
F2-423 TOS 7.0.0777 20GB RAM, no Nvme drives, 2x 12TB TRAID as Volume2
D4-320 4x 8TB TRAID as Volume3
User avatar
OrionXie
TM Support
Posts: 151
Joined: 14 Apr 2025, 18:30
Saudi Arabia

Re: [Help] 502 Bad Gateway after reboot

Post by OrionXie »

Nikdfish wrote: 25 May 2025, 07:37
Mr. Thank you for your suggestions. I will relay them to the product manager. However, I believe you are running TOS version 6.0.673, right?
To contact our team, please send email to following addresses. "(at)" = "@"
Technical team: support(at)terra-master.com
Service team: service(at)terra-master.com
User avatar
marthylm
Posts: 2
Joined: 22 May 2025, 16:58
France

Re: [Help] 502 Bad Gateway after reboot

Post by marthylm »

Last system update 6.0.694 is available.
Once installed, i can now safely create a system config backup without any full disk issue.
At least, we didn't wait too long for the fix, good point for Terramaster.
User avatar
Nikdfish
Posts: 33
Joined: 22 May 2025, 04:15
United States of America

Re: [Help] 502 Bad Gateway after reboot

Post by Nikdfish »

OrionXie wrote: 26 May 2025, 14:29
Nikdfish wrote: 25 May 2025, 07:37
Mr. Thank you for your suggestions. I will relay them to the product manager. However, I believe you are running TOS version 6.0.673, right?
Yes, 6.0.673, I transposed numbers when I typed it.

I will update to 6.0.694.
F2-423 TOS 7.0.0777 20GB RAM, no Nvme drives, 2x 12TB TRAID as Volume2
D4-320 4x 8TB TRAID as Volume3
User avatar
OrionXie
TM Support
Posts: 151
Joined: 14 Apr 2025, 18:30
Saudi Arabia

Re: [Help] 502 Bad Gateway after reboot

Post by OrionXie »

Nikdfish wrote: 26 May 2025, 19:47
Thank you for your feedback, have a great day.
To contact our team, please send email to following addresses. "(at)" = "@"
Technical team: support(at)terra-master.com
Service team: service(at)terra-master.com
User avatar
zeleny
Posts: 5
Joined: 30 Sep 2024, 02:56
Russia

Re: [Help] 502 Bad Gateway after reboot

Post by zeleny »

May be it can be helpful for somebody...
Symptoms
  • TerraMaster web interface returns 502 Bad Gateway error.
    SSH access is available.
    TOSDaemon service repeatedly fails to start.
    PostgreSQL refuses to start due to disk space error (No space left on device).
Diagnosis Steps

Check disk usage:

Code: Select all

df -h
Found root partition ( my problem were on /dev/md9) 100% full.
Identify large directories on /:

Code: Select all

du -h --max-depth=1 /
Resolution

Free up space on the root filesystem
After freeing space, restart PostgreSQL and TOSDaemon services:

Code: Select all

sudo systemctl restart postgresql
sudo systemctl restart TOSDaemon
Verify web interface availability.
User avatar
Abelnicholas
Posts: 3
Joined: 02 Oct 2024, 01:52
United States of America

Re: [Help] 502 Bad Gateway after reboot

Post by Abelnicholas »

Just chiming in with a similar experience.

I had the same "502 Bad Gateway" issue after a reboot a few months back. In my case, it turned out that one of the apps I had installed didn’t restart properly and was blocking access to the web interface. I was able to SSH into the NAS and stop the problematic service, then everything came back online.

That said, I agree with others—if you're not familiar with SSH or the Linux side of things, it’s best not to poke around too much. TerraMaster support was actually pretty responsive when I submitted a ticket, and they walked me through the recovery steps safely.

Also seconding what others said about backups—learned that the hard way. 😅

Hope your system gets back up and running soon!
User avatar
redpillmurica
Posts: 2
Joined: 23 May 2025, 10:12
United States of America

Re: [Help] 502 Bad Gateway after reboot

Post by redpillmurica »

OrionXie wrote: 23 May 2025, 23:27
redpillmurica wrote: 23 May 2025, 10:13
There are plans to optimize it in future versions

Okay, that's great! Can you share when this will occur? Saying soon or the next version isn't really helpful. A timeline would be more helpful, for example, this quarter, next quarter, or next year.

I just bought my F8 SSD Plus and have been unable to use it because of this issue. My return window is closing, and a timeline would affect my decision to keep or return.
User avatar
OrionXie
TM Support
Posts: 151
Joined: 14 Apr 2025, 18:30
Saudi Arabia

Re: [Help] 502 Bad Gateway after reboot

Post by OrionXie »

redpillmurica wrote: 27 May 2025, 10:12
Hello, the issue mentioned above has been resolved in the latest version of TOS 6.0.694, which we released yesterday afternoon on the forum. Please refer to the first update in the following link: viewtopic.php?t=8336
To contact our team, please send email to following addresses. "(at)" = "@"
Technical team: support(at)terra-master.com
Service team: service(at)terra-master.com
User avatar
princev
Posts: 2
Joined: 02 Jun 2025, 02:20
United States of America

Re: [Help] 502 Bad Gateway after reboot

Post by princev »

I have this same issue on my F4-423 and it occurred after backing up configuration as well. I now can't login to TOS due to 502 error nor the TNAS as it times out when I try to log in. I did not set up SSH, so do I need to unplug drives and reinstall the OS? I really don't want to lose any data if at all possible. I tried plugging the NAS to a monitor via HDMI, but that doesn't seem to produce an image on the screen. It's been a couple of days restarting and trying to access TOS without any luck. Can someone give me steps to fix?
Post Reply

Return to “Initialization”