Please complete these steps and check these boxes (by putting an x inside
the brackets) _before_ filing your issue:
vim --version.:YcmDebugInfo.:YcmToggleLogs command.install.py (or cmake/make/ninja) including its invocationThank you for adhering to this process! It ensures your issue is resolved
quickly and that neither your nor our time is needlessly wasted.
Provide a clear description of the problem, including the following key
questions:
Include steps to reproduce here.
Do a fresh install of YCM on my system via Vundle, as per the README. ./install.py completes with no errors. I used --clang-completer and --rust-completer. This completed without errors.
Open a C or Rust file in Vim.
Almost immediately, I get the following message:
The ycmd server SHUT DOWN (restart with ':YcmRestartServer'). Unexpected exit code 1. Type ':YcmToggleLogs ycmd_41096_stderr_g94lju2q.log' to check the logs.
Include description of a minimal test case, including any actual code required
to reproduce the issue.
Open any C or Rust file (I have tried a few)...
I expected to see no error messages and be able to get completions.
I got the error message posted above pretty much immediately after starting vim, with no user interaction required to cause it.
vim --version$ vim --version
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Nov 24 2016 16:44:48)
Included patches: 1-1689
Extra patches: 8.0.0056
Modified by [email protected]
Compiled by [email protected]
Huge version with GTK2-GNOME GUI. Features included (+) or not (-):
+acl +farsi +mouse_netterm +tag_binary
+arabic +file_in_path +mouse_sgr +tag_old_static
+autocmd +find_in_path -mouse_sysmouse -tag_any_white
+balloon_eval +float +mouse_urxvt +tcl
+browse +folding +mouse_xterm +terminfo
++builtin_terms -footer +multi_byte +termresponse
+byte_offset +fork() +multi_lang +textobjects
+channel +gettext -mzscheme +timers
+cindent -hangul_input +netbeans_intg +title
+clientserver +iconv +packages +toolbar
+clipboard +insert_expand +path_extra +user_commands
+cmdline_compl +job +perl +vertsplit
+cmdline_hist +jumplist +persistent_undo +virtualedit
+cmdline_info +keymap +postscript +visual
+comments +langmap +printer +visualextra
+conceal +libcall +profile +viminfo
+cryptv +linebreak -python +vreplace
+cscope +lispindent +python3 +wildignore
+cursorbind +listcmds +quickfix +wildmenu
+cursorshape +localmap +reltime +windows
+dialog_con_gui +lua +rightleft +writebackup
+diff +menu +ruby +X11
+digraphs +mksession +scrollbind -xfontset
+dnd +modify_fname +signs +xim
-ebcdic +mouse +smartindent +xsmp_interact
+emacs_tags +mouseshape +startuptime +xterm_clipboard
+eval +mouse_dec +statusline -xterm_save
+ex_extra +mouse_gpm -sun_workshop +xpm
+extra_search -mouse_jsbterm +syntax
system vimrc file: "$VIM/vimrc"
user vimrc file: "$HOME/.vimrc"
2nd user vimrc file: "~/.vim/vimrc"
user exrc file: "$HOME/.exrc"
system gvimrc file: "$VIM/gvimrc"
user gvimrc file: "$HOME/.gvimrc"
2nd user gvimrc file: "~/.vim/gvimrc"
system menu file: "$VIMRUNTIME/menu.vim"
fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK -pthread -I/usr/include/gtk-2.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libpng12 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng12 -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/freetype2 -D_REENTRANT -DORBIT2=1 -pthread -I/usr/include/libgnomeui-2.0 -I/usr/include/gnome-keyring-1 -I/usr/include/libbonoboui-2.0 -I/usr/include/libxml2 -I/usr/include/libgnome-2.0 -I/usr/include/libbonobo-2.0 -I/usr/include/bonobo-activation-2.0 -I/usr/include/orbit-2.0 -I/usr/include/libgnomecanvas-2.0 -I/usr/include/gail-1.0 -I/usr/include/libart-2.0 -I/usr/include/gtk-2.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libpng12 -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng12 -I/usr/include/gnome-vfs-2.0 -I/usr/lib/x86_64-linux-gnu/gnome-vfs-2.0/include -I/usr/include/gconf/2 -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -Wdate-time -g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc -L. -Wl,-Bsymbolic-functions -Wl,-z,relro -fstack-protector -rdynamic -Wl,-export-dynamic -Wl,-E -Wl,-Bsymbolic-functions -fPIE -pie -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -o vim -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -latk-1.0 -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lfontconfig -lfreetype -lgnomeui-2 -lSM -lICE -lbonoboui-2 -lgnome-2 -lpopt -lbonobo-2 -lbonobo-activation -lORBit-2 -lgnomecanvas-2 -lart_lgpl_2 -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -latk-1.0 -lcairo -lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lfontconfig -lfreetype -lgdk_pixbuf-2.0 -lgnomevfs-2 -lgconf-2 -lgthread-2.0 -lgmodule-2.0 -lgobject-2.0 -lglib-2.0 -lSM -lICE -lXpm -lXt -lX11 -lXdmcp -lSM -lICE -lm -ltinfo -lnsl -lselinux -lacl -lattr -lgpm -ldl -L/usr/lib -llua5.2 -Wl,-E -fstack-protector-strong -L/usr/local/lib -L/usr/lib/x86_64-linux-gnu/perl/5.22/CORE -lperl -ldl -lm -lpthread -lcrypt -L/usr/lib/python3.5/config-3.5m-x86_64-linux-gnu -lpython3.5m -lpthread -ldl -lutil -lm -L/usr/lib/x86_64-linux-gnu -ltcl8.6 -ldl -lz -lpthread -lieee -lm -lruby-2.3 -lpthread -lgmp -ldl -lcrypt -lm
YcmDebugInfoPrinting YouCompleteMe debug information...
-- Client logfile: /tmp/ycm_54c3rwsi.log
-- Server errored, no debug info from server
-- Server running at: http://127.0.0.1:53422
-- Server process ID: 15807
-- Server logfiles:
-- /tmp/ycmd_53422_stdout_chlbwoa2.log
-- /tmp/ycmd_53422_stderr_t9zsfggd.log
Gist: here
ycmd_53422_stdout_chlbwoa2.log and ycmd_53422_stderr_t9zsfggd.log are completely empty (size = 0B).
Ubuntu 16.04
Linux seclab8 4.4.0-98-generic #121-Ubuntu SMP Tue Oct 10 14:24:03 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
Include link to a gist containing the invocation and entire output of
install.pyif reporting an installation issue.
I didn't have any issues with building/installing, so I didn't save the output. But I can rerun ./install.py and post the output if you want...
Thanks for the report. If the ycmd logfiles are empties, this means that the server crashed before redirecting its standard streams to the logfiles. You should try to start ycmd manually. Run these commands in a terminal:
cd ~/.vim/bundle/YouCompleteMe/third/ycmd
cp ycmd/default_settings.json .
python ycmd --options_file default_settings.json
and paste the output.
$ python ycmd --options_file default_settings.json
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "xxx/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/__main__.py", line 44, in <module>
from ycmd.hmac_plugin import HmacPlugin
File "xxx/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/hmac_plugin.py", line 26, in <module>
import requests
File "xxx/.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/requests/requests/__init__.py", line 53, in <module>
from .packages.urllib3.contrib import pyopenssl
File "xxx/.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/requests/requests/packages/urllib3/contrib/pyopenssl.py", line 54, in <module>
import OpenSSL.SSL
File "/usr/lib/python2.7/dist-packages/OpenSSL/__init__.py", line 8, in <module>
from OpenSSL import rand, crypto, SSL
File "/usr/lib/python2.7/dist-packages/OpenSSL/SSL.py", line 118, in <module>
SSL_ST_INIT = _lib.SSL_ST_INIT
AttributeError: 'module' object has no attribute 'SSL_ST_INIT'
@micbou Thanks for your response... Is there some dependency on a particular version of OpenSSL?
Seems related to issue https://github.com/Valloric/YouCompleteMe/issues/2765. Could you try the suggestion in that comment?
sudo apt purge python-openssl
sudo apt install python-openssl
Hey! That worked 馃帀
Thanks @micbou!
Happy to help.
@mark-i-m
in this same situation i am getting
can't find '__main__' module in 'ycmd'
please help
@DShivansh please see CONTRIBUTING.md
@DShivansh I wish I could help, but I am not really that familiar with the internals of YCM... I just followed the suggestion in the post above.
can't find 'main' module in 'ycmd'
in this same situation i am getting
No, they are totally different and unrelated. @DShivansh make sure that you have run git submodule update --init --recursive and that you're using python 2.7.2 or later (or python 3.4.0 or later)
worked for me: Just run /usr/bin/python install.py in ~/.vim/plugged/YouCompleteMe
I've spent one hour trying to resolve and finally found it. Thanks kirykr
For me the an issue looking like the original issue (on opening rust file) was due to having a corrupt PYTHONPATH set. After unsetting it I could run the ycmd without issue!
in this same situation , i find in third_party/waitress/waitress/server.py at line 206锛宼hen function self.socketmod.gethostbyaddr(server_name)[0] is run error if your computer name contains Chinese characters
had anaconda installed and using python3 install.py worked for me
$ cd ~/.vim/bundle/YouComepleteMe
$ /usr/bin/python install.py
For me the an issue looking like the original issue (on opening rust file) was due to having a corrupt PYTHONPATH set. After unsetting it I could run the ycmd without issue!
Could you please elaborate on how to set PYTHONPATH for ycmd to work? I had no problem with using python elsewhere but not able to get away with the server shut down error with YCM
I also ran into this issue. To fix it I had to:
$ sudo apt install cmake
$ cd ~/.vim/bundle/YouComepleteMe
$ python3 install.py
Most helpful comment
worked for me: Just run
/usr/bin/python install.pyin~/.vim/plugged/YouCompleteMe