Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker-compose up -d fails for vufind and solr #1

Open
bjarman opened this issue Dec 2, 2020 · 4 comments
Open

docker-compose up -d fails for vufind and solr #1

bjarman opened this issue Dec 2, 2020 · 4 comments

Comments

@bjarman
Copy link

bjarman commented Dec 2, 2020

Hi! First of all thank you for sharing your code and the tutorial. I work at Uppsala University Library and I am trying to get this working on my dev server.

I have followed your tutorial and only changed a few paths. At first it seems as everything is working good but when I look at the logs I see this:

[root@uub-sll-pws01 docker-vufind-pgsql]# docker-compose up -d
Creating network "docker-vufind-pgsql_default" with the default driver
Creating vufindweb ... done
Creating vufinddb ... done
Creating vufind701 ... done
[root@uub-sll-pws01 docker-vufind-pgsql]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
595c58c7be50 chialab/php:7.2-apache "docker-php-entrypoi…" 10 seconds ago Up 7 seconds 80/tcp, 0.0.0.0:81->81/tcp vufindweb
[root@uub-sll-pws01 docker-vufind-pgsql]# docker-compose logs -f
Attaching to vufind701, vufinddb, vufindweb
vufind701 | /usr/local/vufind/solr/vendor/bin/solr: line 1452: [: unlimited: integer expression expected
vufind701 | whoami: cannot find name for user ID 1000
vufindweb | mkdir: cannot create directory '/usr/local/vufind/local/cache/cli': File exists
vufindweb | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.19.0.4. Set the 'ServerName' directive globally to suppress this message
vufindweb | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.19.0.4. Set the 'ServerName' directive globally to suppress this message
vufindweb | [Wed Dec 02 19:02:36.478342 2020] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.38 (Debian) PHP/7.2.34 configured -- resuming normal operations
vufinddb | chmod: changing permissions of '/var/lib/postgresql/data': Operation not permitted
vufindweb | [Wed Dec 02 19:02:36.481065 2020] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'
vufind701 | Exception in thread "main" java.nio.file.AccessDeniedException: /usr/local/vufind/solr/vufind/logs/solr-8983-console.log -> /usr/local/vufind/solr/vufind/logs/archived/solr-8983-console.log
vufind701 | at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:90)
vufind701 | at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106)
vufinddb exited with code 1
vufind701 | at java.base/sun.nio.fs.UnixCopyFile.move(UnixCopyFile.java:476)
vufind701 | at java.base/sun.nio.fs.UnixFileSystemProvider.move(UnixFileSystemProvider.java:266)
vufind701 | at java.base/java.nio.file.Files.move(Files.java:1426)
vufind701 | at org.apache.solr.util.SolrCLI$UtilsTool.archiveConsoleLogs(SolrCLI.java:4305)
vufind701 | at org.apache.solr.util.SolrCLI$UtilsTool.runTool(SolrCLI.java:4248)
vufind701 | at org.apache.solr.util.SolrCLI.main(SolrCLI.java:282)
vufind701 | Failed archiving old console logs
vufind701 |
vufind701 | ERROR: Logs directory /usr/local/vufind/solr/vufind/logs is not writable. Exiting
vufind701 exited with code 1

Most certainly I have several issues going on but I am hoping that you might know how to solve some of them.

Best regards/Fredrik

@bjarman
Copy link
Author

bjarman commented Dec 2, 2020

So I changed the ports for vufindweb and it seems to start. But in addition to the above log I now also get this:

vufindweb | 130.238.189.200 - - [02/Dec/2020:19:33:34 +0000] "GET / HTTP/1.1" 403 495 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.67 Safari/537.36"
vufindweb | [Wed Dec 02 19:33:34.103379 2020] [autoindex:error] [pid 21] [client 130.238.189.200:49642] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.php,index.html) found, and server-generated directory index forbidden by Options directive

vufind and vufinddb still does not start.

@bjarman
Copy link
Author

bjarman commented Dec 2, 2020

This is my docker-compose.yml:

version: "3.3"
services:
vu_solr:
tty: true
image: "openjdk:jdk-buster"
working_dir: /usr/local/vufind
user: 1000:1000
volumes:
- "/home/frebj199/docker-vufind-pgsql/src/vufind:/usr/local/vufind"
container_name: vufind701
environment:
- VUFIND_LOCAL_DIR=/usr/local/vufind
- VUFIND_LOCAL_DIR=/usr/local/vufind/local
- SOLR_ADDITIONAL_START_OPTIONS=-f
ports:
- "8081:8080"
command: "./solr.sh -force start "
vu_web:
image: chialab/php:7.2-apache
container_name: vufindweb
#user: 1000:1000
ports:
- "81:80"
volumes:
- "/home/frebj199/docker-vufind-pgsql/src/vufind:/usr/local/vufind"
- "/home/frebj199/docker-vufind-pgsql/scripts:/usr/local/scripts"
command: "/usr/local/scripts/runwebserver.sh"
vu_db:
image: postgres:12
container_name: vufinddb
user: 1000:1000
# restart: false
volumes:
- /home/frebj199/docker-vufind-pgsql/pgdata:/var/lib/postgresql/data
ports:
- "54323:5432"
environment:
POSTGRES_PASSWORD: vufind

(The reason I have changed some ports is because I run KOHA on 80 and 8080)

@bjarman
Copy link
Author

bjarman commented Dec 3, 2020

Investigating the error:
Exception in thread "main" java.nio.file.AccessDeniedException: /usr/local/vufind/solr/vufind/logs/solr-8983-console.log -> /usr/local/vufind/solr/vufind/logs/archived/solr-8983-console.log

The logfile solr-8983-console.log contains this:
Unrecognized VM option 'UseConcMarkSweepGC'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

So did this:

[root@uub-sll-pws01 docker-vufind-pgsql]# docker run --rm -v "/home/frebj199/docker-vufind-pgsql/src/vufind":/usr/local/vufind -w /usr/local/vufind --name solr -it -p 8081:8081 openjdk:jdk-buster bash
root@22b396ef7714:/usr/local/vufind# java -version
openjdk version "15.0.1" 2020-10-20
OpenJDK Runtime Environment (build 15.0.1+9-18)
OpenJDK 64-Bit Server VM (build 15.0.1+9-18, mixed mode, sharing)

According to internet UseConcMarkSweepGC was removed in OpenJDK 15?

So, should I look for an openjdk:jdk-buster with an older version of OpenJDK?

@bjarman
Copy link
Author

bjarman commented Dec 3, 2020

Ok, so I have edited my docker-compose.yml to use image: "openjdk:11.0.9.1-jdk-buster" and the UseConcMarkSweepGC problem seems to be gone. Other issues remain though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant