Virtuoso docker does not start because of .lck file

I am running virtuoso via docker-compose on an ubuntu server. Initially it worked, then:

  • I stopped the container
  • removed the container
  • changed some timeout numbers in the *.ini file
  • created a new container with docker-compose

and since then everytime on startup I get the following error:

10:19:10 { Loading plugin 1: Type `plain', file `wikiv' in `.../hosting'
10:19:10 FAILED plugin 1: Unable to locate file }
10:19:10 { Loading plugin 2: Type `plain', file `mediawiki' in `.../hosting'
10:19:10 FAILED plugin 2: Unable to locate file }
10:19:10 { Loading plugin 3: Type `plain', file `creolewiki' in `.../hosting'
10:19:10 FAILED plugin 3: Unable to locate file }
10:19:10 { Loading plugin 10: Type `plain', file `shapefileio' in `.../hosting'
10:19:10 FAILED plugin 10: Unable to locate file }
10:19:10 Unable to create file ./database/virtuoso.lck (No such file or directory).
10:19:10 This probably means you either do not have permission to start
10:19:10 this server, or that virtuoso-t is already running.
10:19:10 If you are absolutely sure that this is not the case, please try
10:19:10 to remove the file ./database/virtuoso.lck and start again.

The problem is I do not have a virtuoso.lck file on the ubuntu server and I as the container fails on startup there should be no .lck file inside the container (it’s a new container).

Anyone else had this problem?

Can you show us your docker-compose.yml file?

Also did you change the permission of some of the files/directory to change the contents of your virtuoso.ini file?

sure here is the content of the docker-compose.yml:

version: '3'
services:
store:
image: openlink/virtuoso-opensource-7
ports: [ "${VIRTUOSO_HTTP_PORT}:8890", "127.0.0.1:${VIRTUOSO_ISQL_PORT}:1111" ]
privileged: true
env_file: .env
environment:
DBA_PASSWORD: ${VIRTUOSO_ADMIN_PASSWD:?Set VIRTUOSO_ADMIN_PASSWD in .env file or pass as environment variable e.g. VIRTUOSO_ADMIN_PASSWD=YourSecretPass docker-compose up}
volumes:
- ${VIRTUOSO_DATABASE_DIR}:/opt/virtuoso-opensource/database
- ${DATA_DIR}:/usr/share/proj

I did not change any kind of permissions.

Your docker-compose.yml file looks reasonable, although i do not recommend using /usr/share/proj as a data directory.

If you want to load some data into a virtuoso-opensource docker image i suggest you have a look at GitHub - openlink/vos-docker-bulkload-example: A tutorial on how to bulkload data into a virtuoso docker container which is an example i wrote to show how to bulkload data into a virtuoso instance.

Your output shows a couple of issues with your virtuoso.ini file which explain why the startup is failing:

First:

10:19:10 { Loading plugin 1: Type plain', file wikiv’ in .../hosting' 10:19:10 FAILED plugin 1: Unable to locate file } 10:19:10 { Loading plugin 2: Type plain’, file mediawiki' in …/hosting’

This indicates the LoadPath setting in your [Plugins] section is set to .../hosting instead of ../hosting.

Secondly:

10:19:10 Unable to create file ./database/virtuoso.lck (No such file or directory).

seems to indicate your LockFile setting in the [Database] section is set to ./database/virtuoso.lck instead of ../database/virtuoso.lck which is how a standard installation should be setup.

Virtuoso expects the internal database directory to be accessible from ../database so it can open ../database/virtuoso.lck but in your case it fails because the ./database directory does not exist, so it cannot create a lockfile inside that directory.

There could be 2 reasons for these strange settings.

  1. There are some settings in your .env file that are incorrect.

As i forgot to ask you for the contents of your .env file, i used the following minimalistic settings which gave me a working docker image:

VIRTUOSO_HTTP_PORT=8890
VIRTUOSO_ISQL_PORT=1111
VIRTUOSO_DATABASE_DIR=./db-dir
VIRTUOSO_DATA_DIR=./data
VIRTUOSO_ADMIN_PASSWD=dba

If you like, you can send us your .env file so we can see what might be wrong. Just make sure you don’t post your ADMIN/DBA password or other sensitive information.

  1. You made a mistake editing your virtuoso.ini file manually.

There is no need to manually edit the virtuoso.ini file to change any settings. Please read our Docker reference guide section on Updating virtuoso.ini via environment settings which shows you how to do this from either your .env file or inside your docker-compose.yml file using the Environment: section.

Thanks for your thorough response!
The hosting path is indeed a mistake, unfortunately it still does not run.
There was an error in changing the .ini file i copied from, hence I had the same one in my virtuoso.ini.

It does work fine now!

Thanks so much for your insight, as I was not aware of those tips either.

best, dennis

Good to hear that it works fine now.