Thread: could not open process token: error code 5

could not open process token: error code 5

From
Andale
Date:
Hi

We have an Postgresql 8.2.5 installation on a Windows server 2003 that have
worked perfectly for our Mediawiki until we tried to update to 8.4. Before
the update we took a backup, stopped the service and took a copy of the
entire database catalog. We could not make the 8.4 (installed in a different
directory) work so we decided to go back to the initial installation which
remained intact.

Then when we try to start the service it fails and we get the message "could
not open process token: error code 5" in the event viewer, nothing else. Now
after googling for some hours and days I am stuck. the Postgres user are to
start the service and so nothing is changed there either. Even though the
database files were not changed, we have also copied the entire original
database back. The installation has been done with the
"postgresql-8.2-int.msi" package and it has been reapplied with the
following command, "msiexec /i postgresql-8.2-int.msi REINSTALLMODE=vamus
REINSTALL=ALL /"

Still no progress.

What to do?

/Anders
--
View this message in context:
http://www.nabble.com/could-not-open-process-token%3A-error-code-5-tp25891332p25891332.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


Re: could not open process token: error code 5

From
Adrian Klaver
Date:
On Wednesday 14 October 2009 6:42:39 am Andale wrote:
> Hi
>
> We have an Postgresql 8.2.5 installation on a Windows server 2003 that have
> worked perfectly for our Mediawiki until we tried to update to 8.4. Before
> the update we took a backup, stopped the service and took a copy of the
> entire database catalog. We could not make the 8.4 (installed in a
> different directory) work so we decided to go back to the initial
> installation which remained intact.
>
> Then when we try to start the service it fails and we get the message
> "could not open process token: error code 5" in the event viewer, nothing
> else. Now after googling for some hours and days I am stuck. the Postgres
> user are to start the service and so nothing is changed there either. Even
> though the database files were not changed, we have also copied the entire
> original database back. The installation has been done with the
> "postgresql-8.2-int.msi" package and it has been reapplied with the
> following command, "msiexec /i postgresql-8.2-int.msi REINSTALLMODE=vamus
> REINSTALL=ALL /"
>
> Still no progress.
>
> What to do?
>
> /Anders

Have you tried getting rid of the data directory you copied back, doing an
initdb to create a new fresh data directory and the restoring from the backup?
Just to cover the case where you did not copy everything you needed to when you
made the original copy.



--
Adrian Klaver
aklaver@comcast.net

Re: could not open process token: error code 5

From
el dorado
Date:
Hello.
I had such an error but rather long ago. Unfortunately I don't remember all the details but you could try to do the
followig:
- check if the directory 'data' has read/write rights for your OS account (account under which you try to start
postgres).
- check if your OS account has the right to log on as service (Administrative Tools/Local Security Settings/User Rights
Assignment)
- check in Computer Management/Local Users and Groups/Users if your OS account is NOT the member of any group of users.

Regards, Marina.

>
> Hi
>
> We have an Postgresql 8.2.5 installation on a Windows server 2003 that have
> worked perfectly for our Mediawiki until we tried to update to 8.4. Before
> the update we took a backup, stopped the service and took a copy of the
> entire database catalog. We could not make the 8.4 (installed in a different
> directory) work so we decided to go back to the initial installation which
> remained intact.
>
> Then when we try to start the service it fails and we get the message "could
> not open process token: error code 5" in the event viewer, nothing else. Now
> after googling for some hours and days I am stuck. the Postgres user are to
> start the service and so nothing is changed there either. Even though the
> database files were not changed, we have also copied the entire original
> database back. The installation has been done with the
> "postgresql-8.2-int.msi" package and it has been reapplied with the
> following command, "msiexec /i postgresql-8.2-int.msi REINSTALLMODE=vamus
> REINSTALL=ALL /"
>
> Still no progress.
>
> What to do?
>
> /Anders
>

Re: could not open process token: error code 5

From
Richard Huxton
Date:
el dorado wrote:
> Hello.
> I had such an error but rather long ago. Unfortunately I don't remember all the details but you could try to do the
followig:
> - check if the directory 'data' has read/write rights for your OS account (account under which you try to start
postgres).
> - check if your OS account has the right to log on as service (Administrative Tools/Local Security Settings/User
RightsAssignment) 
> - check in Computer Management/Local Users and Groups/Users if your OS account is NOT the member of any group of
users.

All good advice - if you're trying to copy a file-level backup into
place you should check the permissions/ownership of the files after
restoring them.

Also - I seem to remember you could get this if the shared-memory
settings were too high in postgresql.conf

--
  Richard Huxton
  Archonet Ltd

Re: could not open process token: error code 5

From
Grzegorz Jaśkiewicz
Date:


On Wed, Oct 14, 2009 at 2:42 PM, Andale <anders@pagiad.se> wrote:

Hi

We have an Postgresql 8.2.5 installation on a Windows server 2003 that have
worked perfectly for our Mediawiki until we tried to update to 8.4. Before
the update we took a backup, stopped the service and took a copy of the
entire database catalog. We could not make the 8.4 (installed in a different
directory) work so we decided to go back to the initial installation which
remained intact.

Then when we try to start the service it fails and we get the message "could
not open process token: error code 5" in the event viewer, nothing else.

wasn't error 5 on windows meaning, crash with SIGSEGV ?



--
GJ

Re: could not open process token: error code 5

From
Andale
Date:
Hi all

Thanks for all your responses. I have not yet been able to try your
suggestions as I have access to the system only on tuesday and wednesday. I
will come back and report how it goes.

/Anders
--
View this message in context:
http://www.nabble.com/could-not-open-process-token%3A-error-code-5-tp25891332p25919854.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


Re: could not open process token: error code 5

From
Andale
Date:
I have checked the items below but they are all correct including the
shared-memory setting.

/Anders




Richard Huxton wrote:
>
> el dorado wrote:
>> Hello.
>> I had such an error but rather long ago. Unfortunately I don't remember
>> all the details but you could try to do the followig:
>> - check if the directory 'data' has read/write rights for your OS account
>> (account under which you try to start postgres).
>> - check if your OS account has the right to log on as service
>> (Administrative Tools/Local Security Settings/User Rights Assignment)
>> - check in Computer Management/Local Users and Groups/Users if your OS
>> account is NOT the member of any group of users.
>
> All good advice - if you're trying to copy a file-level backup into
> place you should check the permissions/ownership of the files after
> restoring them.
>
> Also - I seem to remember you could get this if the shared-memory
> settings were too high in postgresql.conf
>
> --
>   Richard Huxton
>   Archonet Ltd
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>
>

--
View this message in context:
http://www.nabble.com/could-not-open-process-token%3A-error-code-5-tp25891332p25973423.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


Re: could not open process token: error code 5

From
Andale
Date:
When I try to initiliase a new database from command prompt i get the
following message.

"C:\Program Files\PostgreSQL\8.2\bin>initdb -D d:\data\postgres\dbnew
The program "postgres" is needed by initdb but was not found in the
same directory as "C:\Program Files\PostgreSQL\8.2\bin/initdb".
Check your installation."

Please note that the slash is in the wrong direction in the error message
(before initdb) and the "postgres.exe" is there in the bin directory.

Even when I have renewed the installation the same happens.

Still no progress.

/Anders


Adrian Klaver wrote:
>
> On Wednesday 14 October 2009 6:42:39 am Andale wrote:
>> Hi
>>
>> We have an Postgresql 8.2.5 installation on a Windows server 2003 that
>> have
>> worked perfectly for our Mediawiki until we tried to update to 8.4.
>> Before
>> the update we took a backup, stopped the service and took a copy of the
>> entire database catalog. We could not make the 8.4 (installed in a
>> different directory) work so we decided to go back to the initial
>> installation which remained intact.
>>
>> Then when we try to start the service it fails and we get the message
>> "could not open process token: error code 5" in the event viewer, nothing
>> else. Now after googling for some hours and days I am stuck. the Postgres
>> user are to start the service and so nothing is changed there either.
>> Even
>> though the database files were not changed, we have also copied the
>> entire
>> original database back. The installation has been done with the
>> "postgresql-8.2-int.msi" package and it has been reapplied with the
>> following command, "msiexec /i postgresql-8.2-int.msi REINSTALLMODE=vamus
>> REINSTALL=ALL /"
>>
>> Still no progress.
>>
>> What to do?
>>
>> /Anders
>
> Have you tried getting rid of the data directory you copied back, doing an
> initdb to create a new fresh data directory and the restoring from the
> backup?
> Just to cover the case where you did not copy everything you needed to
> when you
> made the original copy.
>
>
>
> --
> Adrian Klaver
> aklaver@comcast.net
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>
>

--
View this message in context:
http://www.nabble.com/could-not-open-process-token%3A-error-code-5-tp25891332p25973438.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.