-
Notifications
You must be signed in to change notification settings - Fork 0
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Problem running Ultorg on NixOS #34
Comments
Hi, Alf. Thank you for your help debugging this! I think you're close to getting Ultorg running... You can try adding the line
to the end of the file
(If this works I might make this adjustment myself in future Ultorg versions.) |
Hmm, or perhaps that folder won't end up having been created yet, since the initial run failed... Perhaps try giving the current user temporary write/create access to the folder /run/postgresql (which you may have to temporarily create), then run Ultorg once, and once that works, you can go in and change postgresql.conf as described above, and then finally restore the original permissions on the /run/postgresql folder. |
Excellent, I got it working now. The I tried starting ultorg again and it failed. This time the We can close this issue now if you wish. I’m up and running. |
Great, thank you! I will make a change to future Ultorg versions to avoid the unix_socket_directories problem. |
Oh, and I'd still love to see what errors you might get from the following command:
(The bundled PostgreSQL binaries are meant to include their own dependencies, with ELF patching already done, so I was curious to see which remaining problems there might be on NixOS.) Thanks for your help! |
Trying to run
|
Thank you for that! I'm learning new things about how dynamic libraries work on various Linux distros :-) Do you get similar problems running the bundled Java distro? E.g. the following command:
I guess the "right" way to fix this in Ultorg is to provide a distro-specific package... but sometimes there are tweaks I can make in the builds that make it work on more systems out-of-the-box. |
The bundled Java has additional issues. It assumes some extra OS-level libraries that must also be patched by changing the rpath of the binary. I gave up on getting that working, opting for an external jdk instead. I can give you some more details here later, I’ve put my computer down for the evening. ;) |
I wouldn’t spend much time on this if I were you. The existence of this issue should be enough to cover Nix for now IMHO. Focus on the larger audience. :) |
OK, good, if OpenJDK can't get it working out-of-the-box either, then I won't feel so bad about it :-) But good to know there are workarounds! Thank you for working this out! |
I've put up another Ultorg release now, with the unix_socket_directories setting disabled by default from now on. It's good to avoid potential permissions issues on other Linux distros as well. And in any case I want the Ultorg-managed PostgreSQL instance to be as compartmentalized as possible, not interfering with other database instances that might be running on the same machine, and not accepting connections from anywhere else. Thanks again for the report! |
Hi, could you maybe share how you got it to work? I'm trying to build a derivation that provides ultorg but I am bashing my head against the whole mkDerivation thing without making any significant progress. Currently I have this flake.nix:
But this does not work. Before I tried to run the extracted
so I wanted to pack it up in a flake that just works TM. I guess I have to have an openjdk in PATH, but admittedly I haven't gotten to that part yet :/ |
You need to patch the bundled jre in Ultorg, or you must bring your own. I opted for the latter approach. I’ve yet to work with flakes, but I suspect you can add a jre to buildinputs and patch the ultorg startup script or default configuration so that it uses this jre instead of the bundled one. That should be the jdkhome-option if I remember correctly. |
For NixOS I think Alf's successful approach was to install OpenJDK 17 and PostgreSQL 13 separately (rather than trying to patch the bundled binaries). Then edit ultorg/etc/ultorg.conf to change the path after "ultorg.pgbin=" (on a very long line) and the path after "jdkhome=" to point directly to the directories containing the local distro-specific binaries. |
NixOS is a different Linux. I won't go into detail here, instead I refer to the documentation: How NixOS works.
Suffice to say is that the bundled Postgres-server won't work here. It can be made to work by patching the ELF-binary, however I would prefer to provide my own installation of Postgres.
I've changed my ultorg.conf to the following:
In theory this should work, however I'm still stuck. Here's the Application.log, hopefully there is something more that can be done?
My diagnosis is that I need to provide some extra arguments to postgres to make it use a different database from the system wide which is owned by the postgres user. I don't see how to do that.
The text was updated successfully, but these errors were encountered: