Could not create locks for database

Post Reply
josmani
Posts: 53
Joined: Tue Jun 03, 2003 3:38 am

Could not create locks for database

Post by josmani »

We have been working on a new database which has been working fine for couple weeks but we are receiving lock errors as of today. I did find any documentation on the website. Would appreciate any help on this.

000 Could not create locks for database /data/WWW/database via monitor: Unsuccessful response code 500 (Failed) in the function TXcreateLocksViaMonitor
000 Could not open locking mechanism for database /data/WWW/database in the function TXdblockOpenViaMethods
000 Couldn't connect to /data/WWW/database in the function SQLConnect

Texis -version
Texis Web Script (Vortex) Copyright (c) 1996-2016 Thunderstone - EPI, Inc.
Commercial Version 7.05.1454612339 20160204 (x86_64-unknown-linux2.6.9-64-64)
User avatar
Kai
Site Admin
Posts: 1270
Joined: Tue Apr 25, 2000 1:27 pm

Could not create locks for database

Post by Kai »

This may be due to a permissions error. Make sure that the database dir and its parent dir are writable by the same -- non-root -- user that owns /usr/local/morph3/bin/monitor and all your databases. Make sure that monitor is setuid to that user.
josmani
Posts: 53
Joined: Tue Jun 03, 2003 3:38 am

Could not create locks for database

Post by josmani »

It looks like both database and texis monitor is owned by apache user.

-rwsr-xr-x 1 apache apache 9511736 Feb 23 16:38 /usr/local/morph3/bin/monitor

-rw------- 1 apache unhcr_webadmin 52664 Mar 22 15:54 SYSINDEX.tbl
User avatar
Kai
Site Admin
Posts: 1270
Joined: Tue Apr 25, 2000 1:27 pm

Could not create locks for database

Post by Kai »

Ok. But that's SYSINDEX, just one table. What are the perms on the database dir itself -- and its parent dir, which can affect it at database creation? And all the other files in the database?
josmani
Posts: 53
Joined: Tue Jun 03, 2003 3:38 am

Could not create locks for database

Post by josmani »

All database tables and parent directory have the same permissions.
User avatar
mark
Site Admin
Posts: 5513
Joined: Tue Apr 25, 2000 6:56 pm

Could not create locks for database

Post by mark »

Run "ipcs" to check your shared mem and semaphore status.
Look in monitor.log to see if any errors are logged there.
josmani
Posts: 53
Joined: Tue Jun 03, 2003 3:38 am

Could not create locks for database

Post by josmani »

There is no error in monitor.log the same above error repeated in vortex.log.

Here is the result of ipcs:

-sh-4.2$ ipcs

------ Message Queues --------
key msqid owner perms used-bytes messages

------ Shared Memory Segments --------
key shmid owner perms bytes nattch status
0x011272d3 2129920 root 600 1000 21
0x00080003 1540097 apache 666 219056 2
0x00060dd7 491522 apache 666 125668 0
0x003a024b 655363 apache 666 125668 0
0x01888003 688132 apache 666 125668 0
0xdbaccee5 753669 apache 666 202984 3
0x01890006 819206 apache 666 219056 0

------ Semaphore Arrays --------
key semid owner perms nsems
0x00000000 11304960 apache 600 1
0x00000000 11337729 apache 600 1
0x00000000 11370498 apache 600 1
0x00000000 11403267 apache 600 1
0x00000000 11436036 apache 600 1
0xfd0002fa 360453 root 666 1
0x00000000 2392070 apache 777 1
0x00000000 7012359 apache 777 1
0x00000000 8093704 apache 777 1
User avatar
Kai
Site Admin
Posts: 1270
Joined: Tue Apr 25, 2000 1:27 pm

Could not create locks for database

Post by Kai »

Is monitor.log writable by apache? That `Unsuccessful response code 500 (Failed)' message in vortex.log should have occurred with a more detailed message in monitor.log.

Edit /usr/local/morph3/conf/texis.ini, look for the [Scheduler] section, and set Verbose=0x10 (i.e. just below the commented-out `;Verbose = 0'). Then restart monitor (monitor -k; monitor) and re-try accessing the database. If the `Unsuccessful response code ...' errors continue, look at monitor.log again.
User avatar
mark
Site Admin
Posts: 5513
Joined: Tue Apr 25, 2000 6:56 pm

Could not create locks for database

Post by mark »

Also, has any software changed on the system between when it was working and not? I notice the file size of the monitor executable is different than as distributed. It should be 9511704 bytes.
Post Reply