Facing issue post upgrading the CoreNLP from 4.5.2 to 4.5.8
We are creating image for CoreNLP from below DockerFile and making it run as a container on an instance. However, we observed that corenlp is working as expected on commercial linux VMs but failing on FIPS enabled linux VMs.
Note :- Issue is occurring only on corenlp version 4.5.8 but working fine with version 4.5.2
Error :- "Can't find /corenlp"
Please reach out to our official mail ids given below. We are licensed customer.
([email protected]) ([email protected]) ([email protected])
`FROM ubuntu:22.04
RUN apt update &&
apt-get install -y wget &&
apt install -y openjdk-11-jre-headless &&
apt-get -y install ubuntu-advantage-tools &&
apt-get install -y unzip
RUN wget http://nlp.stanford.edu/software/stanford-corenlp-4.5.8.zip --no-check-certificate;
unzip stanford-corenlp-4.5.8.zip;
rm -f stanford-corenlp-4.5.8.zip;
mv stanford-corenlp-4.5.8 CoreNLP;
cd CoreNLP;
export CLASSPATH=""; for file in find . -name "*.jar"; do export CLASSPATH="$CLASSPATH:realpath $file"; done
RUN apt-get remove -y wget unzip
WORKDIR CoreNLP
CMD java -mx4g -cp "*" edu.stanford.nlp.pipeline.StanfordCoreNLPServer -port 9000 -timeout 100000 -maxCharLength 2000000 -preload tokenize,ssplit,pos,lemma,ner,depparse`
Can you say more about how it is failing?
My first guess is that it's because of this change:
https://github.com/stanfordnlp/CoreNLP/commit/461db9114d2b1d851cf1572c6139f21d0042d9aa
Used to be, you could go to any page that wasn't directly handled, and it would send you to the server homepage. Our internal security audits kept complaining that this would make it look like we had a WordPress blog on our site (since going to the WordPress URLs would return... something... and those automated security checks were not very sophisticated). Now, instead of going to /corenlp, you can only go to / if you want the main landing page.
There is also this change:
https://github.com/stanfordnlp/CoreNLP/commit/5047ac1a2da44cac4cf4b8b1ac3d41ee32950abb https://github.com/stanfordnlp/CoreNLP/blob/54fec11b6b15288d7849070bdb4f446774534d26/src/edu/stanford/nlp/pipeline/StanfordCoreNLPServer.java#L1001
In this change, we made it so the Brat assets are now shipped with CoreNLP, making it so the server would have fewer external assets as part of its webpage. But I don't think any particular part of that is asking for /corenlp, and I just double checked now.
My suggestion is to look for some part of your CoreNLP usage which is requesting /corenlp and make it request the homepage / instead. You can help verify this is what's causing the error by trying 4.5.7 instead, which I think won't have this issue.
Following up on some old issues. Did downgrading help, or was it easy enough to update the URLs internally, or is there some other work needed here?