Alfresco can not start postgresql as root user
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-19-2015 05:19 AM
Dearest alfresco-lovers,
Please can anyone help me ?
I can not start my alfresco install anymore. it gives:
"pg_ctl.bin: cannot be run as root
Please log in (using, e.g., "su") as the (unprivileged) user that will
own the server process.
/opt/alfresco/postgresql/scripts/ctl.sh : postgresql could not be started"
I did a clean install on a(n other) test-ubuntu desktop as root, and it gives the same mistake during installation. This one was starting during boot-up, but i can not restart postgresql.
Then i did again a clean install on this test system, but now as user "postgres". Now alfresco was working fine but user postgres has to login, and has to manually start alfresco. I made my own alfresco-boot like I found here: "https://issues.alfresco.com/jira/browse/MNT-9912", and put it in init.d, but no boot…
I have seeked for more the 6 hours how to manipulate postgresql so that it can start as root, but whith no result…
I hope anyone can help me, otherwise alfresco will lose a lover…
Joost van der Wulp from Belgium
http://vanderwulp.dynpc.org:8080/share
Labels:
- Labels:
-
Archive
6 REPLIES 6
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-19-2015 01:16 PM
It is not recommended to run Alfresco as root. You would normally start Alfresco as an unprivileged user, and give it access to controlled ports using port redirection. If you really want to run as root, you need to edit the control scripts.
Are you trying to save your data, or just get a working install?
If you don't need to fix your current install, you can use the Ubuntu install script:
https://github.com/loftuxab/alfresco-ubuntu-install
Or you can configure Alfresco to use an external DB instead of the embedded PostgreSQL.
http://docs.alfresco.com/5.0/concepts/intro-db-setup.html
Are you trying to save your data, or just get a working install?
If you don't need to fix your current install, you can use the Ubuntu install script:
https://github.com/loftuxab/alfresco-ubuntu-install
Or you can configure Alfresco to use an external DB instead of the embedded PostgreSQL.
http://docs.alfresco.com/5.0/concepts/intro-db-setup.html
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-21-2015 03:36 AM
Dearest Resplin,
thank you very much for your help. It is incredible kind of you you help me so much!
I am not saving data: I have all user in a CSV-file, and ihad a sync relation with a webdav-drive. It is because alfresco could do this, i am using alfresco !
I understand you say not to install as root, but if I install as other user, i can not load alfresco at boot. Tried everything, but no boot…
Now i have tried to install alfresco with the local Mysql. I had a lot of pain… could not log in, during login, got this message: The remote server is unavailable or your credentials were not recognized.
I found in logs:
12:05:04,862 ERROR [org.alfresco.repo.admin.ConfigurationChecker] [localhost-startStop-1] CONTENT INTEGRITY ERROR: System content not found in content store.
12:05:04,862 ERROR [org.alfresco.repo.admin.ConfigurationChecker] [localhost-startStop-1] Ensure that the 'dir.root' property is pointing to the correct data location.
12:05:04,871 ERROR [org.springframework.web.context.ContextLoader] [localhost-startStop-1] Context initialization failed
org.alfresco.error.AlfrescoRuntimeException: 00200001 Ensure that the 'dir.root' property is pointing to the correct data location.
so it has someething to do with the database. I deleted the database, and created a new one. Now it is working fine…
But alfresco is not loading @ startup. Do you know why ? Can you help me ?
Joost van der Wulp from Belgium
thank you very much for your help. It is incredible kind of you you help me so much!
I am not saving data: I have all user in a CSV-file, and ihad a sync relation with a webdav-drive. It is because alfresco could do this, i am using alfresco !
I understand you say not to install as root, but if I install as other user, i can not load alfresco at boot. Tried everything, but no boot…
Now i have tried to install alfresco with the local Mysql. I had a lot of pain… could not log in, during login, got this message: The remote server is unavailable or your credentials were not recognized.
I found in logs:
12:05:04,862 ERROR [org.alfresco.repo.admin.ConfigurationChecker] [localhost-startStop-1] CONTENT INTEGRITY ERROR: System content not found in content store.
12:05:04,862 ERROR [org.alfresco.repo.admin.ConfigurationChecker] [localhost-startStop-1] Ensure that the 'dir.root' property is pointing to the correct data location.
12:05:04,871 ERROR [org.springframework.web.context.ContextLoader] [localhost-startStop-1] Context initialization failed
org.alfresco.error.AlfrescoRuntimeException: 00200001 Ensure that the 'dir.root' property is pointing to the correct data location.
so it has someething to do with the database. I deleted the database, and created a new one. Now it is working fine…
But alfresco is not loading @ startup. Do you know why ? Can you help me ?
Joost van der Wulp from Belgium
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-21-2015 08:02 PM
The error message says that the problem is not with the database, but with your content store. In your alfresco-global.properties, the dir.root property points to where your content is stored on disk, and this property is not pointing at a directory that matches your database.
1. Verify that the directory points to the correct location.
2. If you reinstalled to get a blank database, you should also clear that directory so it is empty and can be initialized.
This is a helpful list of common mistakes when administering Alfresco:
http://docs.alfresco.com/community/concepts/ten-mistakes.html
Useful documentation is here:
http://docs.alfresco.com/5.0/concepts/global-props-intro.html
1. Verify that the directory points to the correct location.
2. If you reinstalled to get a blank database, you should also clear that directory so it is empty and can be initialized.
This is a helpful list of common mistakes when administering Alfresco:
http://docs.alfresco.com/community/concepts/ten-mistakes.html
Useful documentation is here:
http://docs.alfresco.com/5.0/concepts/global-props-intro.html

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-07-2015 06:20 PM
Hi dear. I want to do a simple backup of the postgresql database using the pg_dump command but i dont have permission to do so even with the sudo. I realise that i should to it with the postgres user. Whenever i change to the postgres user i am prompted for the password i dont know. Please tell me the default postgres user password. I am using alfresco 5 community edition. Or is there another way to do the backing up?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-27-2015 10:57 PM
If you want to log in to the postgres user, do the following:
sudo bash
su - postgres
That will only require your own password, and will not prompt for the postgres users's password.
Then, if you want to set, or reset, the postgres user's password, do the following after the "sudo bash", but before the "su - postgres":
passwd postgres
It will ask you for the new password twice, and then you are done.
Brian
sudo bash
su - postgres
That will only require your own password, and will not prompt for the postgres users's password.
Then, if you want to set, or reset, the postgres user's password, do the following after the "sudo bash", but before the "su - postgres":
passwd postgres
It will ask you for the new password twice, and then you are done.
Brian
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-08-2015 12:00 PM
@doudou225,
You should look in your alfresco-global.properties file "usually" the postgresql password is the same as your admin password.
You should also look at this.
http://fcorti.com/2013/02/06/alfresco-backup-script/
You should look in your alfresco-global.properties file "usually" the postgresql password is the same as your admin password.
You should also look at this.
http://fcorti.com/2013/02/06/alfresco-backup-script/
