-
Notifications
You must be signed in to change notification settings - Fork 779
OpenGrok webapp fails to start after adding a project #2468
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
Comments
What OpenGrok version are you running ? What do the Tomcat logs say ?
Dne út 30. 10. 2018 10:40 uživatel brightchuh <notifications@github.com>
napsal:
… Dear OpenGrok experts,
At first there're serveral projects under dir SRC already and my OpenGrok
works well. Then I want to add a new project named opengrok, so i refer to
wikipage: https://github.com/oracle/opengrok/wiki/Per-project-management,
and then did the following operations:
1. move opengrok source code into SRC dir;
2. run following command one by one:
***@***.***:~/work/tools/opengrok/bin$ ./projadm.py \
-U http://localhost:8080/opengrok \
-b $OPENGROK -R $OPENGROK/etc/readonly_configuration.xml \
-a opengrok \
--jar $OPENGROK/lib/opengrok.jar
Lock 139740936275448 acquired on /tmp/projadm.py.lock
Adding project opengrok
Refreshing configuration (merging with read-only config)
Lock 139740936275448 released on /tmp/projadm.py.lock
***@***.***:~/work/tools/opengrok/bin$ ./reindex-project.py \
-U http://localhost:8080/opengrok \
-t $OPENGROK/doc/logging.properties -p '%PROJ%' -d $OPENGROK/log \
-P opengrok \
--jar $OPENGROK/lib/opengrok.jar -- \
-H -P -S -G -v --progress -t 4
***@***.***:~/work/tools/opengrok/bin$ ./projadm.py \
-U http://localhost:8080/opengrok \
-b $OPENGROK \
-R $OPENGROK/etc/readonly_configuration.xml \
-r \
--jar $OPENGROK/lib/opengrok.jar
Lock 139901594406584 acquired on /tmp/projadm.py.lock
Refreshing configuration (merging with read-only config)
Lock 139901594406584 released on /tmp/projadm.py.lock
finally, i refreshed my OpenGrok webpage: http://localhost:8080/opengrok/,
and then it goes wrong, even if i restart tomcat server.
it says:
HTTP Status 404 – Not Found
Type Status Report
Message /opengrok/
Description The origin server did not find a current representation for
the target resource or is not willing to disclose that one exists.
Apache Tomcat/9.0.10
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#2468>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACzGDP71GHDHu250FLOuNUk972q2IZbNks5uqB5ngaJpZM4YBhma>
.
|
Also, how exactly was the webapp deployed ? Did the web app work after deployment ? |
v1.1-rc58 $ java -jar ../lib/opengrok.jar -V
10月 31, 2018 9:08:51 上午 org.opengrok.indexer.index.Indexer parseOptions
信息: Indexer options: [-V]
OpenGrok v1.1-rc58 rev ea3276555c6b40174cb20dc41d15677997f1cc79 |
There're several projects under SRC dir at first. Then I deploy OpenGrok webapp using command: $ ./deploy.py \
-c "$OPENGROK/etc/configuration.xml" \
$OPENGROK/lib/source.war \
$TOMCAT/webapps/opengrok.war After webapp is deployed, I ran initial indexing using command: $ ./indexer.py \
-J=-Djava.util.logging.config.file=$OPENGROK/doc/logging.properties \
-a $OPENGROK/lib/opengrok.jar -- \
-s $CODE -d $OPENGROK/data \
-R $OPENGROK/etc/readonly_configuration.xml \
-W $OPENGROK/etc/configuration.xml \
-U http://localhost:8080/opengrok \
-H -P -S -G -v -t 4 After all these are done, opengrok can be accessed at "http://localhost:8080/opengrok/", it works well. Several days later, i added a new project just as what i said in my first comment, And it goes wrong. |
I'm not familiar with tomcat, so i attach all logs of yesterday. |
In
What are the contents of |
Also, there are some curious errors like:
What is the Java version on the system ? |
The
|
JAVA version $ java --version
openjdk 10.0.1 2018-04-17
OpenJDK Runtime Environment (build 10.0.1+10-Ubuntu-3ubuntu1)
OpenJDK 64-Bit Server VM (build 10.0.1+10-Ubuntu-3ubuntu1, mixed mode) |
configuration.xml and readonly_configuration.xml |
I guess some of the failures can be attributed to running with Java 10 - this is not well tested. |
I think I see the reason for
looks like a bug. The read-only configuration contains a sample as in https://github.com/oracle/opengrok/wiki/Per-project-configuration - project (without a name) in a project map. Usually, when you run indexer the project should be filled with name in Indexer.java#934-942. However, the way you use it, running reindex-project (where is no option for This in the end means, that the configuration is invalid and any operation with |
Yes, this is actually a dup of #2147 for which the workaround is to comment out the per-project settings in read-only configuration after the first global reindex and then set per project properties using RESTful API. |
Does the latest opengrok version resolve this issue? |
No, I don't think so. |
We need to make the code more resilient against invalid project configuration first. |
@vladak So, you mean that if i want to add a new project, i need to run initial index once more? |
The workaround is to comment out any per-project configuration in read-only configuration and re-merge. Using per-project properties only works when running the indexer for the whole source root. E.g. in our production's read-only config we have this part: <!-- Linux repositories have too rich history - disable handling of renamed files
However, this can only be enabled during initial reindex of the whole source root.
After that this section has to be commented out, see https://github.com/oracle/opengrok/issues/2147
-->
<!--
<void property="projects">
<void method="put">
<string>linux-mainline</string>
<object class="org.opengrok.indexer.configuration.Project">
<void property="handleRenamedFiles">
<boolean>false</boolean>
</void>
</object>
</void>
<void method="put">
<string>linux-mainline-next</string>
<object class="org.opengrok.indexer.configuration.Project">
<void property="handleRenamedFiles">
<boolean>false</boolean>
</void>
</object>
</void>
--> |
Dear OpenGrok experts,
At first there're serveral projects under dir SRC already and my OpenGrok works well. Then I want to add a new project named opengrok, so i refer to wikipage: https://github.com/oracle/opengrok/wiki/Per-project-management, and then did the following operations:
finally, i refreshed my OpenGrok webpage: http://localhost:8080/opengrok/, and then it goes wrong, even if i restart tomcat server.
it says:
The text was updated successfully, but these errors were encountered: