• 0 Posts
  • 46 Comments
Joined 5 months ago
cake
Cake day: November 20th, 2024

help-circle


  • All right, I had some spare time today, so I went and installed this thing.

    My setup is a bit more complex than the minimum necessary, but that’s because I’m using an already existing Postgres database instead of installing a new one on my computer. It is as follows: Postgres running on a mini PC on my local network (192.168.2.199:5432), a browser running on my main computer, and a Debian VM for DBgate with two NICs - one is the default NAT interface (I’m too lazy to configure proper bridging / routing) and the second is a virtual bridge, testbr. On testbr, the host OS is 192.168.123.1/24, and the guest is 192.168.123.2/24.

    I installed DBgate on the VM using NPM - npm install -g dbgate-serve, as specified in the documentation. Then I ran it using simply dbgate-serve, then connected to it from a browser running on my host OS as http://192.168.123.2:3000/. That works fine.

    Then I added my Postgres DB through the web interface (to be verbose, I entered 192.168.2.199 as the IP address), created a table and inserted some dummy data. Then I wanted to do the next step, which is to block outgoing connections to port 5432 from the VM, but I noticed something very strange, given that DBgate obviously doesn’t use the server as a backend to do the actual DB connection: this was in the server log

    {"pid":7012,"caller":"databaseConnections","conid":"24d95082-ca6a-4dac-aa28-f3121bfc508d","database":"dbgate","sql":"INSERT INTO \"public\".\"dbgate_test\" (\"text\") VALUES ('haha');\nINSERT INTO \"public\".\"dbgate_test\" (\"text\") VALUES ('hehe');\n","level":30,"msg":"Processing script","time":1744395411096}
    

    But it would be ridiculous to even suggest that the connection is relayed through the server, so it is probably some kind of telemetry. Makes sense.

    Anyway, I went ahead and added the rules on the VM nft add table ip filter, nft 'add chain ip filter output { type filter hook output priority 0; tcp dport 5432 drop; }', and you wouldn’t believe what happened next… The DBgate tab can no longer load data from the database. I can reload DBgate itself without any issues, and I can connect to the database from the same computer using psql and DataGrip just fine, but for some reason it seems to be affected by the fact that its server (which is only serving the HTML/JS files and doing nothing else, as you said) cannot connect to Postgres.

    Weird how that works, huh?



  • If you’re unfamiliar with all of this, that’s your job to get educated. This is how browser-based JS software works.

    The browser version cannot connect to Postgres without a server-side part, for rather obvious reasons - you can’t just make arbitrary network connections from the browser. Electron build is of course different, as that doesn’t have to deal with the browser sandbox.

    By the way, here’s a similar issue documented in Outerbase’s repo:

    Outerbase Studio Desktop is a lightweight Electron wrapper for the Outerbase Studio web version. It enables support for drivers that aren’t feasible in a browser environment, such as MySQL and PostgreSQL.

    Not gonna lie, telling people how they need to get educated on stuff you don’t understand ticks me off.


  • MarkaostoLinux@lemmy.mlRam in use after suspend issue
    link
    fedilink
    arrow-up
    3
    ·
    edit-2
    15 days ago

    xfwm is XFCE’s window manager, and it’s eating almost 30% of the total system memory, so that’s the prime suspect (I’m not exactly sure how much it interacts with other apps, so it’s possible something else is forcing xfwm to use all that memory, but that is IMHO unlikely).

    An ugly “fix” is to log out and log back in (yes, not much better than just rebooting), or you could try to somehow restart xfwm - running xfvm --replace in terminal might work.

    Edit: there’s an issue on the Manjaro forums that might be related: https://forum.manjaro.org/t/xfwm4-memory-leak-since-4-20/173910/7









  • MarkaostoLinux@lemmy.mlCPU errors?
    link
    fedilink
    arrow-up
    7
    ·
    1 month ago

    I don’t think overheating would cause random corruptions (it should throttle down when overheating, and then shut down if the temperature gets too high even when throttled, but there should never be an incorrect result of any computation), and surely the RAM will run at the standard 2133 speed on default settings - OP says they reset the BIOS settings to default between CPU swaps.



  • Nah, the kernel isn’t that important for apps - you can replace the kernel and update the massive Android framework to work with the new one relatively easily (you will need some Linux compatibility for native code that does syscalls on its own, but that’s pretty much it - even WSL1 could do that).

    It’s all the APIs and system apps provided by Google that have no reasonable alternative in AOSP that are the problem for compatibility. Look how incomplete projects like MicroG (an open-source implementation of Google Play Services) are, and their only goal is to provide Android compatibility for unofficial ROMs without installing the proper Google services.




  • Sure, but I don’t see how any of that disproves the current “M$ supremacy” for “normies” - the fact is that people who couldn’t care less about how their computers work will have a much easier time using Windows (and probably macOS) than any Linux distro. You don’t have to worry that some software won’t be available to you because of your choice of the OS, and if you ever have a problem it’s easy to find help.

    I haven’t used Windows in a decade on my personal computers, but as long as these two things hold true, it will always be my recommended OS for people who simply don’t care - I’m not going to spend my time doing free IT support for everyone I know and then get blamed everytime something doesn’t work.