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

Failed to start Jedi EPC Server #312

Open
julzheng opened this issue Apr 26, 2018 · 13 comments
Open

Failed to start Jedi EPC Server #312

julzheng opened this issue Apr 26, 2018 · 13 comments

Comments

@julzheng
Copy link

julzheng commented Apr 26, 2018

My jedi setup info

;; Emacs Lisp version:                                                                                                                                                                                         
(:emacs-version "25.3.50.2" :jedi-version "0.2.7" :python-environment-version "0.0.2alpha0")                                                                                                                   
;; Python version:                                                                                                                                                                                             
nil                                                                                                                                                                                                            
;; EPC error:                                                                                                                                                                                                  
(:get-epc-error                                                                                                                                                                                                
 (error "Server may raise an error. Use \"M-x epc:pop-to-last-server-process-buffer RET\" to see full traceback:\nTraceback (most recent call last):\n  File \"/home/ylto/.emacs.d/.python-environments/defaul\
t/bin/jediepcserver\", line 11, in <module>\n    sys.exit(main())\n  File \"/home/ylto/.emacs.d/.python-environments/default/lib/python3.5/site-packages/jediepcserver.py\", line 321, in main\n"))            
;; Command line:                                                                                                                                                                                               
(:virtualenv "/usr/local/bin/virtualenv" :virtualenv-version "15.1.0\n")                                                                                                                                       
;; Customization:                                                                                                                                                                                              
((jedi:complete-on-dot)                                                                                                                                                                                        
 (jedi:doc-display-buffer . display-buffer)                                                                                                                                                                    
 (jedi:doc-hook view-mode)                                                                                                                                                                                     
 (jedi:doc-mode . rst-mode)                                                                                                                                                                                    
 (jedi:environment-root)                                                                                                                                                                                       
 (jedi:environment-virtualenv)                                                                                                                                                                                 
 (jedi:get-in-function-call-delay . 1000)                                                                                                                                                                      
 (jedi:get-in-function-call-timeout . 3000)                                                                                                                                                                    
 (jedi:goto-definition-config                                                                                                                                                                                  
  (nil nil nil)                                                                                                                                                                                                
  (t nil nil)                                                                                                                                                                                                  
  (nil definition nil)                                                                                                                                                                                         
  (t definition nil)                                                                                                                                                                                           
  (nil nil t)                                                                                                                                                                                                  
 (t nil t)                                                                                                                                                                                                    
 (nil definition t)                                                                                                                                                                                           
 (t definition t))                                                                                                                                                                                            
(jedi:goto-definition-marker-ring-length . 16)                                                                                                                                                                
(jedi:imenu-create-index-function . jedi:create-nested-imenu-index)                                                                                                                                           
(jedi:import-python-el-settings . t)                                                                                                                                                                          
(jedi:install-imenu)                                                                                                                                                                                          
(jedi:install-python-jedi-dev-command "pip" "install" "--upgrade" "git+https://github.com/davidhalter/jedi.git@dev#egg=jedi")                                                                                 
(jedi:key-complete .                                                                                                                                                                                          
                   [C-tab])                                                                                                                                                                                   
(jedi:key-goto-definition .                                                                                                                                                                                   
                          [67108910])                                                                                                                                                                         
(jedi:key-goto-definition-pop-marker .                                                                                                                                                                        
                                     [67108908])                                                                                                                                                              
(jedi:key-related-names . "^Cr")                                                                                                                                                                              
(jedi:key-show-doc . "^Cd")                                                                                                                                                                                   
(jedi:server-args)                                                                                                                                                                                            
(jedi:server-command "/home/ylto/.emacs.d/.python-environments/default/bin/jediepcserver")                                                                                                                    
(jedi:setup-keys)                                                                                                                                                                                             
(jedi:tooltip-method pos-tip popup)                                                                                                                                                                           
(jedi:use-shortcuts)                                                                                                                                                                                          
(python-environment-default-root-name . "default")                                                                                                                                                            
(python-environment-directory . "~/.emacs.d/.python-environments")                                                                                                                                            
(python-environment-virtualenv "virtualenv" "--system-site-packages" "--quiet"))  

My jedi is showing these errors

Error (jedi): Failed to start Jedi EPC server.                                        
*** You may need to run "M-x jedi:install-server". ***                                
This could solve the problem especially if you haven't run the command yet            
since Jedi.el installation or update and if the server complains about                
Python module imports.  

deferred error : (error "Server may raise an error. Use \"M-x epc:pop-to-last-server-proc\
ess-buffer RET\" to see full traceback:                                                   
Traceback (most recent call last):                                                        
  File \"/home/ylto/.emacs.d/.python-environments/default/bin/jediepcserver\", line 11, i\
n <module>                                                                                
    sys.exit(main())                                                                      
  File \"/home/ylto/.emacs.d/.python-environments/default/lib/python3.5/site-packages/jed\
iepcserver.py\", line 321, in main                                                        
")  

then after I do M-x epc:pop-to-last-server-process-buffer

Traceback (most recent call last):                                                        
  File "/home/ylto/.emacs.d/.python-environments/default/bin/jediepcserver", line 11, in \
<module>                                                                                  
    sys.exit(main())                                                                      
  File "/home/ylto/.emacs.d/.python-environments/default/lib/python3.5/site-packages/jedi\
epcserver.py", line 321, in main                                                          
    server = jedi_epc_server(**vars(ns))                                                  
  File "/home/ylto/.emacs.d/.python-environments/default/lib/python3.5/site-packages/jedi\
epcserver.py", line 230, in jedi_epc_server                                               
    server = epc.server.EPCServer((address, port))                                        
  File "/home/ylto/.emacs.d/.python-environments/default/lib/python3.5/site-packages/epc/\
server.py", line 121, in __init__                                                         
    self, server_address, RequestHandlerClass, bind_and_activate)                         
  File "/usr/lib/python3.5/socketserver.py", line 440, in __init__                        
    self.server_bind()                                                                    
  File "/usr/lib/python3.5/socketserver.py", line 454, in server_bind                     
    self.socket.bind(self.server_address)                                                 
OSError: [Errno 99] Cannot assign requested address                                       
                                                                                          
Process epc:server:4 exited abnormally with code 1  

It cannot assign the requested address. Can anyone figure out what is wrong?

@immerrr
Copy link
Collaborator

immerrr commented Nov 3, 2018

Apologies for such a long wait. I have only started picking up the backlog. Looks like your system has a problem with the localhost alias. Are you sure it's configured properly?

@tree-fiddy
Copy link

I have the same problem and my log is showing the same exact results. What do you mean there may be a problem with the localhost alias? I'm actually not sure it's configured properly.

@immerrr
Copy link
Collaborator

immerrr commented Nov 21, 2018

@tree-fiddy

What's your OS?
what does it say when you do ping localhost?
what does it say when you do ping 127.0.0.1?

@tree-fiddy
Copy link

@immerrr

MacOS Mojave 10.14

ping localhost outputs:
64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.042 ms
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.081 ms
64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.072 ms
...
...

ping 127.0.0.1 outputs the same thing.

In my hunt to remedy this jedi issue, I've messed around with so much, that I've opened up a pandora's box of errors. Now, I am getting:

deferred error : (error "Deferred process exited abnormally:
  command: virtualenv
  exit status: exit 127

which hangs up emacs for 30 seconds at a time, at random times. I'm afraid I'll have to do a clean install of emacs and start my init.el from scratch.

@immerrr
Copy link
Collaborator

immerrr commented Nov 22, 2018

Ok, so it's not about localhost per se. Could you try with the current master version? It should have more troubleshooting information.

@prologueyan-hr
Copy link

I have met same issue,have u solved it

@immerrr
Copy link
Collaborator

immerrr commented May 19, 2019

@Prologueyan not sure if the original reporter was able to fix this on their side, but there certainly were no additional fixes in the code.

Are you seeing the same error messages as originally reported? Do the messages change if you use the latest code from master branch?

@prologueyan-hr
Copy link

@immerrr thanks , I solved this

@immerrr
Copy link
Collaborator

immerrr commented May 20, 2019

@Prologueyan would you be able to share what was the problem and how did you fix this so that people that come after you have more troubleshooting material to work with?

@prologueyan-hr
Copy link

I use flask to setup a web server ,but i forgot to change the ip address setting to my own machine.

@dariushazimi
Copy link

I have the same issue:
OS = Mac OS Catalina
python = 3.7
is there a solution for this?

thank you all.

Error (jedi):

Failed to start Jedi EPC server.

*** EPC Error ***
Server may raise an error. Use "M-x epc:pop-to-last-server-process-buffer RET" to see full traceback:
No handlers could be found for logger "jediepcserver"

*** EPC Server Output (last 10 lines) ***
No handlers could be found for logger "jediepcserver"

*** EPC Server Config ***
Server arguments: ("/Users/darius/.emacs.d/.python-environments/default/bin/jediepcserver")
Actual command: /Users/darius/.emacs.d/.python-environments/default/bin/jediepcserver
VIRTUAL_ENV envvar: "/Users/darius/.local/share/virtualenvs/streamlittut-oarDHXSx"

*** jedi-mode is disabled in # ***
Fix the problem and re-enable it.

*** You may need to run "M-x jedi:install-server". ***
This could solve the problem especially if you haven't run the command yet
since Jedi.el installation or update and if the server complains about
Python module imports.

@immerrr
Copy link
Collaborator

immerrr commented Apr 27, 2020

@dariushazimi I believe your failure is different. What do you see if you run

/Users/darius/.emacs.d/.python-environments/default/bin/jediepcserver

in your terminal?

@yefeiyu
Copy link

yefeiyu commented May 31, 2021

$ ./.python-environments/default/bin/jediepcserver
dyld: Library not loaded: @executable_path/../.Python
Referenced from: /Users/darius/.emacs.d/.python-environments/default/bin/python3.7
Reason: image not found
Abort trap: 6

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

No branches or pull requests

6 participants