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

"Remote end closed connection without response" on any command #393

Closed
eranikid opened this issue Aug 10, 2018 · 9 comments
Closed

"Remote end closed connection without response" on any command #393

eranikid opened this issue Aug 10, 2018 · 9 comments

Comments

@eranikid
Copy link

Hello.

I am trying to get OmnisharpVim working. I am completely new to it, and to vim in general, but I am trying my best. I have chosen to install Omnisharp server automatically, and it succesfully installed and started, as lsof -i shows me that process mono listens on port 36625. My .vimrcis the following:

call plug#begin('~/.vim/plugged')

Plug 'OmniSharp/omnisharp-vim'

call plug#end()

filetype plugin on

let g:OmniSharp_timeout = 5

set completeopt=longest,menuone,preview

set previewheight=5

augroup omnisharp_commands
    autocmd!

    autocmd CursorHold *.cs call OmniSharp#TypeLookupWithoutDocumentation()

    autocmd FileType cs nnoremap <buffer> gd :OmniSharpGotoDefinition<CR>
    autocmd FileType cs nnoremap <buffer> <Leader>fi :OmniSharpFindImplementations<CR>
    autocmd FileType cs nnoremap <buffer> <Leader>fs :OmniSharpFindSymbol<CR>
    autocmd FileType cs nnoremap <buffer> <Leader>fu :OmniSharpFindUsages<CR>

    autocmd FileType cs nnoremap <buffer> <Leader>fm :OmniSharpFindMembers<CR>

    autocmd FileType cs nnoremap <buffer> <Leader>fx :OmniSharpFixUsings<CR>
    autocmd FileType cs nnoremap <buffer> <Leader>tt :OmniSharpTypeLookup<CR>
    autocmd FileType cs nnoremap <buffer> <Leader>dc :OmniSharpDocumentation<CR>
    autocmd FileType cs nnoremap <buffer> <C-\> :OmniSharpSignatureHelp<CR>
    autocmd FileType cs inoremap <buffer> <C-\> <C-o>:OmniSharpSignatureHelp<CR>


    autocmd FileType cs nnoremap <buffer> <C-k> :OmniSharpNavigateUp<CR>
    autocmd FileType cs nnoremap <buffer> <C-j> :OmniSharpNavigateDown<CR>
augroup END

nnoremap <Leader><Space> :OmniSharpGetCodeActions<CR>
xnoremap <Leader><Space> :call OmniSharp#GetCodeActions('visual')<CR>

nnoremap <Leader>nm :OmniSharpRename<CR>
nnoremap <F2> :OmniSharpRename<CR>
command! -nargs=1 Rename :call OmniSharp#RenameTo("<args>")

nnoremap <Leader>cf :OmniSharpCodeFormat<CR>

nnoremap <Leader>ss :OmniSharpStartServer<CR>
nnoremap <Leader>sp :OmniSharpStopServer<CR>

nnoremap <Leader>th :OmniSharpHighlightTypes<CR>

, which is essentially the config from OmnisharpVim main page, without SyntasticCheck with the config necessary to install OmnisharpVim plugin.

All the commands are autocompleted, so the plugin itself seems to have connected, however when trying to execute any command, the bottom status bar says CONNECTION: Remote end closed connection without response. Is there any chance that vim targets the wrong port or something?

:echo has('python3') || has('python') returns 1.
Vim version 8.0
Ubuntu 18.04.1 LTS

Please request any additional information if you need it.
Thanks in advance for any help!

@nickspoons
Copy link
Member

Vim won't be listening on the wrong port, vim has assigned the port and started the server running on it. There are various things you can check but the first thing is to check you have the right server (the HTTP version) since this is what tends to be the problem when people get started with a manually installed server.

Why did you chose to manually install the server? Did you try letting vim install it?

Please include the output of launching your server from the command line like this:

$ /full/path/to/omnisharp/run -v -s /full/path/to/your.sln

@axvr
Copy link
Contributor

axvr commented Aug 10, 2018

I've had some issues using OmniSharp Roslyn v1.32.2 with omnisharp-vim, but I'm not sure if this is related to the problem you are having. I get the error message CONNECTION: '' whenever I try to do anything using v1.32.2, and when running the server manually everything seems to work fine, but omnisharp-vim still fails to connect to it.

You could try and install the previous version (this fixed the problems for me).

/path/to/omnisharp-vim/installer/omnisharp-manager.sh -Hv v1.32.1 -l "$HOME/.omnisharp/omnisharp-roslyn"

@daavidjobe
Copy link

What is the status on this issue? I´m experiencing this to and i have tried multiple versions of omnisharp.
At the bottom of my editor it prints: CONNECTION: remote end closed connection without response

thank you

@nickspoons
Copy link
Member

@daavidjobe "tried multiple versions" doesn't give much information to debug.

Please try getting the latest version of OmniSharp-vim, and using it to install OmniSharp-roslyn by running the following from the vim command line:

:OmniSharpInstall 'v1.32.1'

Also, make sure that g:OmniSharp_server_path is not set in your .vimrc

@yjh0502
Copy link

yjh0502 commented Sep 16, 2018

I'm using Ubuntu 18.10 and my problem is fixed by downgrading omnisharp to v1.32.1. It might be helpful to let Linux users to use v1.32.1 by default, or mention it to README until it fixed.

@nickspoons
Copy link
Member

@yjh0502 it is mentioned in the README

@nickspoons
Copy link
Member

OK I've made OmniSharp-Roslyn v1.32.1 the default for :OmniSharpInstall with no arguments for Linux/Mac. As soon as the roslyn issue is resolved we can roll this change back and start installing the latest version again.

@adrianoviana87
Copy link

Hey, this should not be closed... forcing and older version of omnisharp http is not fixing. I need to use a higher version of omnisharp (cause 1.32.1 fails to load my project) but I happes that any higher version won't work with omnisharp-vim - the error message is the same as this issue.

@nickspoons
Copy link
Member

@adrianoviana87 the issue is closed because we can't do anything about it here. The problem lies with OmniSharp-roslyn, and is being tracked there: OmniSharp/omnisharp-roslyn#1274

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

No branches or pull requests

6 participants