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

Make /data/blacklab-corpora permissions command recursive in getting started guide #524

Closed
wants to merge 1 commit into from

Conversation

oscar345
Copy link

@oscar345 oscar345 commented Jul 4, 2024

The current command for giving BlackLab read access to the corpora is not recursive. When I ran the BlackLab server I got an error. After running the command as follows: chmod -R a+rx /data/blacklab-corpora the error was fixed.

A little bit of background: I was running BlackLab version 4 on a VPS from TransIP. Without adding the recursive option to the chmod command I got this error:

<!doctype html><html lang="en"><head><title>HTTP Status 500 – Internal Server Error</title><style type="text/css">body {font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b {color:white;background-color:#525D76;} h1 {font-size:22px;} h2 {font-size:16px;} h3 {font-size:14px;} p {font-size:12px;} a {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style></head><body><h1>HTTP Status 500 – Internal Server Error</h1><hr class="line" /><p><b>Type</b> Exception Report</p><p><b>Description</b> The server encountered an unexpected condition that prevented it from fulfilling the request.</p><p><b>Exception</b></p><pre>java.lang.NullPointerException
	nl.inl.blacklab.server.BlackLabServer.initializationErrorResponse(BlackLabServer.java:321)
	nl.inl.blacklab.server.BlackLabServer.handleRequest(BlackLabServer.java:218)
	nl.inl.blacklab.server.BlackLabServer.doGet(BlackLabServer.java:182)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:634)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
	org.apache.logging.log4j.web.Log4jServletFilter.doFilter(Log4jServletFilter.java:71)
</pre><p><b>Note</b> The full stack trace of the root cause is available in the server logs.</p><hr class="line" /><h3>Apache Tomcat/9.0.31 (Ubuntu)</h3></body></html>

The current command for giving BlackLab read access to the corpora is not recursive. So when running the BlackLab server it will return an error. With the change it will also be able to read the corpora that are added to the `/data/blacklab-corpora` directory.
@jan-niestadt
Copy link
Member

Thanks for the report. I've fixed the internal error; it should now produce a clearer error message, indicating the permissions problem.

I've also updated the example example command lines in the documentation. In the example given, the directory is empty, so -R won't do anything, but it doesn't hurt either, of course.

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

Successfully merging this pull request may close these issues.

None yet

2 participants