-
Notifications
You must be signed in to change notification settings - Fork 893
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
PermanentlyFailedException: Timed out waiting for service to come alive. Part3 #245
Comments
Can you try to remove the double quotation marks in the classpath='/home/naive/Documents/shrikant/Dialogue_Implement/DST/stanford-corenlp-full-2018-10-05/*' |
In fact, since you have already set the |
I changed the code as suggested :
But error still persists:
And when I use terminal to run the java command:
The error comes again which did not come before on its terminal use:
But when I run with classpath in quotes, it runs again sucessfully:
Run with success:
I am stuck with some silly error, Please help. |
If nothing else, you have typoed
`be_quiet=False`
and that is turning off the debugging information which would tell us a bit
more about what is going wrong.
|
This works for me:
`
client.stuff(...
classpath='/home/john/corenlp/stanford-corenlp-full-2018-10-05/*',
...)
`
as does having a copy of corenlp in my $CLASSPATH and passing in this:
`
client.stuff(...
classpath='$CLASSPATH',
...)
`
as does having $CORENLP_HOME set to the same path and passing in nothing at
all.
Frankly I'm a little confused how it managed to produce
`-cp "/home/naive/Documents/shrikant/Dialogue_Implement/
DST/stanford-corenlp-full-2018-10-05"/* `
from your original invocation. The extra `/*` coming after the quote is not
something that should exist. If you could try that again and turn on the
debug info, that might help.
|
Oh, troublesome typos! I corrected it and ran again with success this time :)
|
Guess it needs more time. The ner annotator is kind of slow to load
|
What would be its suitable value in order to resolve the issue, as I set the -timeout 1500000. But still the same error, I am getting... |
Honestly that seems really weird. It takes 25s on my laptop, which was
pretty good 2 years ago. How much memory do you have?
|
I have sufficient memory, working on a server with 256 GB RAM. Following sys.conf:
The problem is very silly, I know that. But I unable to see it. |
Others have mentioned different running environments being the problem.
Are you running this from within Jupyter or from the command line?
What happens if you start the server at the command line and then try to
communicate with it with the client?
|
Maybe, the problem was due to running 'python stanza_en.py' remotely on the server.
I do not know the exact reason. It was really difficult to assess & debug. Thank you all for being on my side. |
@skmalviya do you have sufficient permissions on that server to bind processes to localhost ports? If not, then unfortunately the CoreNLP server won't start properly. |
Good suggestion! Any idea to see my permissions on the server? |
I also have the same problem while I am trying a sample snippet from the tutorial. I tweaked with different values for the parameter, but it is still same timeout problem. I do have permission to bind localhost port also. (I used other python wrapper for CoreNLP before). Here is my code snippet:
Here is the error:
|
@LiuYuLOL you can check whether or not it is possible to bind services in a couple ways. One would be to start a flask service within python. Another would be to run StanfordCoreNLPServer at a command line (the python process will give you the command line) and direct your browser to the appropriate localhost port. |
@TAPOS12 we need to know more about your configuration, such as OS, whether you are running from inside jupyter, etc |
Thanks for your reply. Could you explain more about the first one, the flask one? Besides, the command line (given by the python process) cannot run and got the ``Error: Could not find or load main class''. However, I can run the java server directly with the command
|
In that case, the problem is almost definitely that you are passing an
incorrect classpath to python. It should be printing out the java command
used. Would you try that command and see what happens?
…On Mon, May 4, 2020, 12:50 AM LiuYuLOL ***@***.***> wrote:
@LiuYuLOL <https://github.com/LiuYuLOL> you can check whether or not it
is possible to bind services in a couple ways. One would be to start a
flask service within python. Another would be to run StanfordCoreNLPServer
at a command line (the python process will give you the command line) and
direct your browser to the appropriate localhost port.
Thanks for your reply. Could you explain more about the first one, the
flask one?
Besides, the command line (given by the python process) cannot run and got
the ``Error: Could not find or load main class''. However, I can run the
java server directly with the command
java -mx4g -cp "*" edu.stanford.nlp.pipeline.StanfordCoreNLPServer -port
9000 -timeout 15000
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#245 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA2AYWLEGGYAPM447YQZXEDRPZXUBANCNFSM4MGYCGUQ>
.
|
Yes, this java error is about CLASSPATH, however, the python command is already set with -cp. Below is the command: If run it directly,
|
When run at the command line, you would need to put quotes around the -cp,
such as
java -Xmx5G -cp
"/home/uqyliu42/resources/stanfordnlp_resources/stanford-corenlp-full-2018-10-05/*"
edu.stanford.nlp.pipeline.StanfordCoreNLPServer -port 8900 -timeout 30000
-threads 5 -maxCharLength 100000 -quiet False -serverProperties
corenlp_server-9786450377a548c7.props -preload
tokenize,ssplit,pos,lemma,ner,parse,depparse,dcoref
|
I am also recieving the same issue. When I start the server with java command (path enclosed in double quotes) than the server starts and it logs StanfordCoreNLPServer listening at /0:0:0:0:0:0:0:0:8088. Solved it using export NO_PROXY='localhost' and also export no_proxy='localhost' |
What happens when you go to localhost:8088 using your browser?
What happens when you start the server in a different shell, then try using
the python script with start_server=False in the CoreNLPClient constructor?
|
Actually I was running it on ubuntu server, so I was having no GUI. |
@qipeng On your suggestion, I tried it with sudo this time and Guess it ran with success. Thanks for the advice. But still one doubt, on my system, the same program ran sucessfully even without sudo, but on the server, it was unsuccessful until ran it with the sudo permission. The comment, by @AngledLuffa, could be followed to explore it further. |
How I sorted out the things,1. When running on my system locally (Checked on python3.6.9):
2. When running on a remote server (Checked on python3.6.9):
|
I solved the issue by disabling the proxy env variables:
My university uses a different proxy and thus cannot visit localhost, which leads the time-out issue. |
If you need to use sudo to get it to run, that is a clear sign you don't
have permissions to use that port as your regular user. The better fix
would be to get the appropriate permissions, not to use sudo.
|
Maybe a bug from self.ensure_alive(),remove this code line should work. |
ensure_alive includes turning it on if it hasn't already been started, so I
can't recommend this course of action
|
There are two problems I found in my env
Solution Uninstalled 32bit runtime and installed 64bit, then started the server outside the python code, And use local server like this
It worked, one check in the browser localhost:9000 if all works well run the python code Also, java need Windows permission for port access, don't ignore the popup! |
This did it for me, i.e.
at the top of my notebook |
Hi! I know this is similar to #52 and #91 but I am unable to understand how that was solved.
When I run it on the commandline (Ubuntu : Ubuntu 16.04.6 LTS), it runs with success as below:
But when I run it with python script, it fail with error as below:
Error:
Python 3.6.10
asn1crypto==1.3.0
certifi==2020.4.5.1
cffi==1.14.0
chardet==3.0.4
cryptography==2.8
embeddings==0.0.8
gast==0.2.2
idna==2.9
numpy==1.18.2
protobuf==3.11.3
pycparser==2.20
pyOpenSSL==19.1.0
PySocks==1.7.1
requests==2.23.0
six==1.14.0
stanza==1.0.0
torch==1.4.0
tqdm==4.44.1
urllib3==1.25.8
vocab==0.0.4
I am unable to understand the issue here...
The text was updated successfully, but these errors were encountered: