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

ycmd server SHUT DOWN. Unexpected exit code -6. Type - on MacOS High Sierra #2890

Closed
joaoh82 opened this issue Feb 2, 2018 · 13 comments
Closed

Comments

@joaoh82
Copy link

joaoh82 commented Feb 2, 2018

Issue Prelude

Please complete these steps and check these boxes (by putting an x inside
the brackets) before filing your issue:

  • [ x ] I have read and understood YCM's CONTRIBUTING document.
  • [ x ] I have read and understood YCM's CODE_OF_CONDUCT document.
  • [ x ] I have read and understood YCM's README, especially the
    Frequently Asked Questions section.
  • [ x ] I have searched YCM's issue tracker to find issues similar to the one I'm
    about to report and couldn't find an answer to my problem. (Example Google
    search.
    )
  • [ x ] If filing a bug report, I have included the output of vim --version.
  • [ x ] If filing a bug report, I have included the output of :YcmDebugInfo.
  • [ x ] If filing a bug report, I have attached the contents of the logfiles using
    the :YcmToggleLogs command.
  • [ x ] If filing a bug report, I have included which OS (including specific OS
    version) I am using.
  • [ x ] If filing a bug report, I have included a minimal test case that reproduces
    my issue, including what I expected to happen and what actually happened.
  • [ x ] If filing a installation failure report, I have included the entire output
    of install.py (or cmake/make/ninja) including its invocation
  • [ x ] I understand this is an open-source project staffed by volunteers and
    that any help I receive is a selfless, heartfelt gift of their free time. I
    know I am not entitled to anything and will be polite and courteous.
  • [ x ] I understand my issue may be closed if it becomes obvious I didn't
    actually perform all of these steps.

Thank you for adhering to this process! It ensures your issue is resolved
quickly and that neither your nor our time is needlessly wasted.

Issue Details

Provide a clear description of the problem, including the following key
questions:

  • What did you do?
    Opened VIM and immediately got this message:
    The ycmd server SHUT DOWN (restart with ':YcmRestartServer'). Unexpected exit code -6. Type ':YcmToggleLogs ycmd_55130_stderr_FYT1q1.log' to check the logs.

Include steps to reproduce here.

  • New macbook with High Sierra
  • Installed YouCompleteMe with VimPlug by adding the line Plug 'Valloric/YouCompleteMe'
  • Then went to the ~.vim/plugged/YouCompleteMe and ran ./install.sh --clang-completer
  • Without error
  • But when open VIM I get the above message immediately.
  • And I get not semantic completion by YouCompleteMe

Include description of a minimal test case, including any actual code required
to reproduce the issue.

  • What did you expect to happen?
  • Not to get any error message when I opened VIM.
  • What actually happened?
    Described above

Include description of the observed behaviour, including actual output,
screenshots, etc.

Diagnostic data

Output of vim --version

VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Jul 26 2017 19:10:24)
Included patches: 1-503, 505-642
Compiled by root@apple.com
Normal version without GUI.  Features included (+) or not (-):
+acl             +file_in_path    -mouse_sgr       +tag_old_static
-arabic          +find_in_path    -mouse_sysmouse  -tag_any_white
+autocmd         +float           -mouse_urxvt     -tcl
-balloon_eval    +folding         +mouse_xterm     -termguicolors
-browse          -footer          +multi_byte      +terminfo
+builtin_terms   +fork()          +multi_lang      +termresponse
+byte_offset     -gettext         -mzscheme        +textobjects
+channel         -hangul_input    +netbeans_intg   +timers
+cindent         +iconv           +num64           +title
-clientserver    +insert_expand   +packages        -toolbar
-clipboard       +job             +path_extra      +user_commands
+cmdline_compl   +jumplist        -perl            +vertsplit
+cmdline_hist    -keymap          +persistent_undo +virtualedit
+cmdline_info    +lambda          +postscript      +visual
+comments        -langmap         +printer         +visualextra
-conceal         +libcall         -profile         +viminfo
+cryptv          +linebreak       +python/dyn      +vreplace
+cscope          +lispindent      -python3         +wildignore
+cursorbind      +listcmds        +quickfix        +wildmenu
+cursorshape     +localmap        +reltime         +windows
+dialog_con      -lua             -rightleft       +writebackup
+diff            +menu            +ruby/dyn        -X11
+digraphs        +mksession       +scrollbind      -xfontset
-dnd             +modify_fname    +signs           -xim
-ebcdic          +mouse           +smartindent     -xpm
-emacs_tags      -mouseshape      +startuptime     -xsmp
+eval            -mouse_dec       +statusline      -xterm_clipboard
+ex_extra        -mouse_gpm       -sun_workshop    -xterm_save
+extra_search    -mouse_jsbterm   +syntax
-farsi           -mouse_netterm   +tag_binary
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
  fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H   -DMACOS_X_UNIX  -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc   -L/usr/local/lib -o vim        -lm -lncurses  -liconv -framework Cocoa

Output of YcmDebugInfo

Printing YouCompleteMe debug information...
-- Client logfile: /var/folders/_j/kqfq2jbs3g75s04gzvylk5lc0000gp/T/ycm_GxZ2IP.log
-- Server errored, no debug info from server
-- Server running at: http://127.0.0.1:55082
-- Server process ID: 39977
-- Server logfiles:
--   /var/folders/_j/kqfq2jbs3g75s04gzvylk5lc0000gp/T/ycmd_55082_stdout_6O1SSS.log
--   /var/folders/_j/kqfq2jbs3g75s04gzvylk5lc0000gp/T/ycmd_55082_stderr_ty4e7w.log

Contents of YCM, ycmd and completion engine logfiles

Content of Client logfile:

cat /var/folders/_j/kqfq2jbs3g75s04gzvylk5lc0000gp/T/ycm_GxZ2IP.log
\2018-02-02 05:39:09,126 - ERROR - Unable to connect to server
Traceback (most recent call last):
  File "/Users/joaoh82/.vim/plugged/YouCompleteMe/autoload/../python/ycm/client/base_request.py", line 223, in HandleServerException
    yield
  File "/Users/joaoh82/.vim/plugged/YouCompleteMe/autoload/../python/ycm/youcompleteme.py", line 236, in CheckIfServerIsReady
    'ready' )
  File "/Users/joaoh82/.vim/plugged/YouCompleteMe/autoload/../python/ycm/client/base_request.py", line 69, in GetDataFromHandler
    timeout ) )
  File "/Users/joaoh82/.vim/plugged/YouCompleteMe/autoload/../python/ycm/client/base_request.py", line 189, in JsonFromFuture
    response = future.result()
  File "/Users/joaoh82/.vim/plugged/YouCompleteMe/third_party/pythonfutures/concurrent/futures/_base.py", line 404, in result
    return self.__get_result()
  File "/Users/joaoh82/.vim/plugged/YouCompleteMe/third_party/pythonfutures/concurrent/futures/_base.py", line 356, in __get_result
    raise self._exception
ConnectTimeout: HTTPConnectionPool(host='127.0.0.1', port=55082): Max retries exceeded with url: /ready (Caused by ConnectTimeoutError(<requests.packages.urllib3.connection.HTTPConnection object at 0x1013d6e50>, 'Connection to 127.0.0.1 timed out. (connect timeout=0.01)'))
2018-02-02 05:39:09,239 - ERROR - Unable to connect to server
Traceback (most recent call last):
  File "/Users/joaoh82/.vim/plugged/YouCompleteMe/autoload/../python/ycm/client/base_request.py", line 223, in HandleServerException
    yield
  File "/Users/joaoh82/.vim/plugged/YouCompleteMe/autoload/../python/ycm/youcompleteme.py", line 236, in CheckIfServerIsReady
    'ready' )
  File "/Users/joaoh82/.vim/plugged/YouCompleteMe/autoload/../python/ycm/client/base_request.py", line 69, in GetDataFromHandler
    timeout ) )
  File "/Users/joaoh82/.vim/plugged/YouCompleteMe/autoload/../python/ycm/client/base_request.py", line 189, in JsonFromFuture
    response = future.result()
  File "/Users/joaoh82/.vim/plugged/YouCompleteMe/third_party/pythonfutures/concurrent/futures/_base.py", line 404, in result
    return self.__get_result()
  File "/Users/joaoh82/.vim/plugged/YouCompleteMe/third_party/pythonfutures/concurrent/futures/_base.py", line 356, in __get_result
    raise self._exception
ConnectTimeout: HTTPConnectionPool(host='127.0.0.1', port=55082): Max retries exceeded with url: /ready (Caused by ConnectTimeoutError(<requests.packages.urllib3.connection.HTTPConnection object at 0x1013d6890>, 'Connection to 127.0.0.1 timed out. (connect timeout=0.01)'))
2018-02-02 05:39:09,344 - ERROR - The ycmd server SHUT DOWN (restart with ':YcmRestartServer'). Unexpected exit code -6. Type ':YcmToggleLogs ycmd_55082_stderr_ty4e7w.log' to check the logs.
2018-02-02 05:39:19,226 - ERROR - Unable to connect to server
Traceback (most recent call last):
  File "/Users/joaoh82/.vim/plugged/YouCompleteMe/autoload/../python/ycm/client/base_request.py", line 223, in HandleServerException
    yield
  File "/Users/joaoh82/.vim/plugged/YouCompleteMe/autoload/../python/ycm/client/debug_info_request.py", line 41, in Start
    self._response = self.PostDataToHandler( request_data, 'debug_info' )
  File "/Users/joaoh82/.vim/plugged/YouCompleteMe/autoload/../python/ycm/client/base_request.py", line 79, in PostDataToHandler
    timeout ) )
  File "/Users/joaoh82/.vim/plugged/YouCompleteMe/autoload/../python/ycm/client/base_request.py", line 189, in JsonFromFuture
    response = future.result()
  File "/Users/joaoh82/.vim/plugged/YouCompleteMe/third_party/pythonfutures/concurrent/futures/_base.py", line 404, in result
    return self.__get_result()
  File "/Users/joaoh82/.vim/plugged/YouCompleteMe/third_party/pythonfutures/concurrent/futures/_base.py", line 356, in __get_result
    raise self._exception
ConnectTimeout: HTTPConnectionPool(host='127.0.0.1', port=55082): Max retries exceeded with url: /debug_info (Caused by ConnectTimeoutError(<requests.packages.urllib3.connection.HTTPConnection object at 0x10141a4d0>, 'Connection to 127.0.0.1 timed out. (connect timeout=0.01)'))

Both Server logsfiles are empty

Include link here to a gist containing the entire logfiles for ycm, ycmd
and any completer logfiles listed by :YcmToggleLogs.

OS version, distribution, etc.

Mac OS 10.13 (17A405) High SIerra

Include system information here.

Output of build/install commands

Include link to a gist containing the invocation and entire output of
install.py if reporting an installation issue.

@joaoh82
Copy link
Author

joaoh82 commented Feb 3, 2018

I got it/
I anaconda installed before setting up Vim and installing all my plugins.
So YouCompleteMe was using Anaconda’s python to compile Ycm Core.
But without error… even so, Ycm was crashing every time Vim opened.
So I had to disable Anaconda’s python’s for a moment and run the setup again.

Worked!

@joaoh82 joaoh82 closed this as completed Feb 3, 2018
@tgzhou98
Copy link

@joaoh82 I have the same issue, but I can't get it work. Do you just recompile the YCM core use anaconda python and get it work?

@jabalazs
Copy link

I had the same issue.

Running /usr/bin/python install.py within ~/.vim/plugged/YouCompleteMe did the trick.

@likeshumidity
Copy link

I was getting this error since I didn't have some dependencies installed globally such as nose and Flake8. I was able to discover which dependencies I was missing by running ~/.vim/plugged/YouCompleteMe/run_tests.py

@puremourning
Copy link
Member

None of those dependencies are required unless you want to run the tests.

@shinux
Copy link

shinux commented May 18, 2018

@jabalazs save my day

@jaidevd
Copy link

jaidevd commented Oct 29, 2018

Thanks for the fix, @jabalazs.
@Valloric @puremourning - does this mean that YCM cannot be compiled with an Anaconda Python installation? Why does it need the system python to run the server?

Thanks again!

@bstaletic
Copy link
Collaborator

does this mean that YCM cannot be compiled with an Anaconda Python installation?

Sometimes. Anaconda comes with its own bundle of joy shared objects/dll files. Sometimes the versions of libraries you get in Anaconda are too old to support the latest libclang on which YCM's server depends on. Other times it's a boost bug and a user really wanted to use --system-boost. Therefore, anaconda simply breaks itself and we just can't support it.

Why does it need the system python to run the server?

It doesn't. virtualenv works perfectly, as does any custom built python I've ever compiled. It's just that

anaconda simply breaks itself

@jaidevd
Copy link

jaidevd commented Oct 29, 2018

Thanks for the clarification @bstaletic - makes sense.
I guess it's easiest to build YCM as usual and then switch the Python interpreter as described here: https://github.com/Valloric/YouCompleteMe#configuring-through-vim-options

@bstaletic
Copy link
Collaborator

Note that the interpreter used for running the server is completely separate from the interpreter used for your project's completion.

@jacksonlanecole
Copy link

@jabalazs Anaconda's python was causing the issue for me as well, thank you.

@wty20060888
Copy link

Running /usr/bin/python install.py does not work for me. Still having that problem.

@bstaletic
Copy link
Collaborator

@wty20060888 We'll need more information. Go to the gitter channel instead.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants