You are not logged in.

#1 2020-06-10 19:22:05

Eule
Member
Registered: 2015-07-22
Posts: 8

[Solved] Vim YouCompleteMe server shuts down when starting (Error 111)

I have installed YouCompleteMe from the AUR (vim-youcompleteme-git):

pacuar -S vim-youcompleteme-git
cd ~/.vim/plugged/YouCompleteMe/
python3 install.py --all

When starting Vim, I receive the following error:

The ycmd server SHUT DOWN (restart with ':YcmRestartServer'). Unexpected exit code 1. Type ':YcmToggleLogs ycmd_48855_stderr_le1wu9rl.log' to check the logs.

Here is the output of the ycm_*.log file. The mentioned ycmd_*_stderr_*.log file does not exist.

2020-06-10 12:05:21,834 - ERROR - HTTPConnectionPool(host='127.0.0.1', port=48855): Max retries exceeded with url: /ready (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f0af8be9d00>: Failed to establish a new connection: [Errno 111] Connection refused'))
2020-06-10 12:05:21,933 - ERROR - The ycmd server SHUT DOWN (restart with ':YcmRestartServer'). Unexpected exit code 1. Type ':YcmToggleLogs ycmd_48855_stderr_le1wu9rl.log' to check the logs.
2020-06-10 12:05:46,478 - ERROR - HTTPConnectionPool(host='127.0.0.1', port=48855): Max retries exceeded with url: /debug_info (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f0af8c14550>: Failed to establish a new connection: [Errno 111] Connection refused'))
2020-06-10 12:06:05,559 - ERROR - HTTPConnectionPool(host='127.0.0.1', port=48855): Max retries exceeded with url: /debug_info (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f0af8c14d60>: Failed to establish a new connection: [Errno 111] Connection refused'))

I am using Vim with vim-plug. Here are the relevant portions of my .vimrc file:

...
" vim-plug
call plug#begin('~/.vim/plugged')
...
" Plugin YouCompleteMe
Plug 'Valloric/YouCompleteMe'
...
call plug#end()
...
" YouCompleteMe
let g:ycm_server_python_interpreter='/usr/bin/python3'

" YouCompleteMe shortcuts
let g:ycm_autoclose_preview_window_after_completion=1
map <leader>g  :YcmCompleter GoToDefinitionElseDeclaration<CR>

" YouCompleteMe Python virtualenv support
py3 << EOF
import os
import sys
if 'VIRTUAL_ENV' in os.environ:
  project_base_dir = os.environ['VIRTUAL_ENV']
  activate_this = os.path.join(project_base_dir, 'bin/activate_this.py')
  execfile(activate_this, dict(__file__=activate_this))
EOF
...

I have tried installing with the --clang-complete and systemd-libclang options as suggested in other posts, but with no luck. I have also tried installing from the original Git repository, but receive the same error (Errno 111) each time. Any help solving this problem would be greatly appreciated. Thank you.

Last edited by Eule (2020-06-10 20:35:34)

Offline

#2 2020-06-10 20:33:36

Eule
Member
Registered: 2015-07-22
Posts: 8

Re: [Solved] Vim YouCompleteMe server shuts down when starting (Error 111)

Solved! It turns out my /etc/hosts file had become corrupted somehow. I had to fix it, according to the directions in the Installation Guide.

Offline

Board footer

Powered by FluxBB