PostgreSQL problems on macOS 12.1(Apple Silicon)
When I install DAZStudio and try to start it, I get the message "a valid PostgreSQL CMS connection could not be established..." message appears.
There are similar discussions in this forum, so I tried reinstalling and changing permissions based on them, but it did not work.
macOS 12.1 (Apple M1 Max)
DAZ Studio 4.16 (Mac 64-bit)
DAZ3DIM
what I tried:
- I reinstalled using DIM.
- When reinstalling, I deleted these caches.
- Changed permissions on "~/Library/Application Support/DAZ 3D/cms" and "ContentCluster" folders to "read/write".
But, when I start DAZStudio, the permissions on the "ContentCluster" folder change to "No permissions" for "everyone" while the permissions for "User" remain "Read/Write".
And there are no log files or anything in the "ContentCluster" folder.
By the way, there are some applications that I can't use due to the change of processor from intel to ARM on the new Mac, does that have anything to do with it?
Thank you for any help you can provide.
Comments
Same issue and I've tried everything as well, with no luck. I submitted a support ticket last year ( hehe) and im waiting to hear back from them.
Oh, I see it was still unsupported...
I'll give up working on macOS for a while. Thanks a lot.
I run DS and the Postgres CMS on my M1 Mac mini , so it works. The question is why doesn't it for some.
There are a few things that might cause this , One is if to the machine is formatted with case sensitive file system.
Another thing is to allow Postgres to be run in one of ether system security dialogs, I will screenshot when at my machine.
That's because postgresql requires the dtabase files to only be accesible by itself to prevent someone or something to corrupt the integrity of the daabase files.
This is the path to the cms data:
This is the cms diectory, here is the dblog.txt file, which maight contain hints to why the cms doesn't start correctly
start there.
Thank you for your response.
I heard your M1 Mac Mini was working, so I tried again and finally got it working!
Your previous posts were also very helpful in solving the problem.
I will leave the steps later for others who have the same problem.
I had a lot of trouble, so it may take a while.
Here are the steps I was able to get working on my M1 Mac.
Of course there are some useless steps, but I don't know what's useless, so I'll describe them all.
1. Create a "ContentCluster" folder in a location other than ~/Library/.
I created a "cms" folder on my desktop for testing, and on DAZ Studio, click "Preferences...> "CMS Settings" and change "Cluster Directory" to the newly created path.
Just in case, I changed the permissions of the "ContentCluster" folder to 700 using the "chmod" command.
When I reinstalled DAZ Studio and PostgreSQL CMS after doing this, dblog.txt was generated in the "ContentCluster" folder for the first time.
2. Change the shared memory parameters
I got the following error in dblog.txt.
DETAIL: Failed system call was shmget(key=17237001, size=40, 03600).
Execute the following command in the Terminal
sudo sysctl kern.sysv.shmseg=1024
sudo sysctl kern.sysv.shmall=131072
Reboot computer.
3. Install postgresql via homebrew, and create a symbolic link to refer to the newly installed PostgreSQL.
Next, I got the following error in dblog.txt.
DETAIL: The database cluster was initialized without USE_FLOAT8_BYVAL but the server was compiled with USE_FLOAT8_BYVAL.
HINT: It looks like you need to recompile or initdb.
I thought it would be difficult to recompile, so I tried to refer to the PostgreSQL that was working fine.
Install PostgreSQL with the following command
Delete the folders "bin", "include", "lib", "share" in "/Applications/DAZ 3D/PostgreSQL CMS/".
Create a symbolic link like this and do the same for "bin", "include", "lib", and "share" respectively.
4. Initializing the Database
Next, initialize the database in the "ContentCluster" folder that you initially created.
If there are any files left in the ContentCluster folder, please delete them all. (It took me a while to realize that ".DS_Store" was still there).
Next, right-click on the Smart Content pane in DAZ Studio. Select "Content DB Maintenance". Check "Reset database" and press "Accept".
5. change the settings in "pg_hba.conf".
The following error is displayed in dblog.txt
Open pg_hba.conf in the ContentCluster folder.
local all all reject
Change "reject" to "trust" in this line.
After restarting DAZ Studio, the error disappeared and the login was successful.
If any part of this process does not work, try reinstalling DAZ Studio (or PostgreSQL CMS) from DIM or restarting the application.
I hope this helps others who have the same problem.
FATAL: could not create shared memory segment: Cannot allocate memory
DETAIL: Failed system call was shmget(key=17237001, size=40, 03600).
These errors usually tells you "you need to restart your mac". Some program do leak shared memory as there is a "bug" / "implementation issue" with shared memory in macOS and apps that crashes without handing back their allocated shared memory, or apps leaking shared memory
Thanks for letting me know.
There is a hint in the rest of log data, I just looked up that message and resized the shared memory. But I rebooted my computer after making the change, so I may not have needed to any other command.
You might need to reconfigure the kernel with a larger SHMALL. The PostgreSQL documentation contains more information about shared memory configuration.