Unable to run confluent Kafka platform - apache-kafka

I am following this tutorial.
And as instructed, I have downloaded the platform from here, and cloned the github repository for code.
Downloaded platform is in zipped form, so I unzipped it and added its bin folder to PATH system variable.
Now, I try to run start.sh as asked in 'Exercise 0: Run end-to-end demo'. But nothing happens.
A command window pops up and immediately disappears.
What am I missng here?

The tutorial assumes you're already in a terminal and typing those commands.
Sounds like you're simply clicking the shell script, and there's some error

Related

Is it possible to use DocumentLink and registerUriHandler when using the remote containers?

I installed laravel goto config extension in the remote containers and whenever I click on the link that extension generates and that should jump to another file vscode crashes and restarts
I've created the github issue with the extension creator but author doesn't have any experience with remote extensions. In the github issue I also linked github repository that you can use to reproduce the issue. Note that instead of
./vendor/bin/sail up -d --build
you can use
docker-compose up -d --build
to start the containers
Once containers start you can follow the readme or you can directly open example link below that crashes the vscode
vscode://ctf0.laravel-goto-config/var/www/html/config/app.php?name
File /var/www/html/config/app.php exists in the docker container
I don't know too much about developing vscode extensions but I managed to find out that extension uses DocumentLink and registerUriHandler under the hood to generate the link to the file and to handle incoming links. I even downloaded the extensions and tried to debug the issue, but I only managed to get the debugger and breakpoints working when using vscode directly on the host. Once I connect to remote container debugging doesn't stop on breakpoints anymore and vscode crashes when I use the vscode://... link
Is it possible to use vscode://... with remote containers to open the files?
EDIT:
I found one example where opening files trough links work. In the file .devcontainer/devcontainer.json when I hover on the files in the "dockerComposeFile": [...] list I can see the link and when I click on it it will open the file. Hovering on the link shows following value
vscode-remote://dev-container+2f55...../<absolute-path-to-file>
but this handles link with vscode and not with registerUriHandler
I managed to pinpoint the issue. In the extension there was a line
vscode.commands.executeCommand('vscode.openFolder', vscode.Uri.file(path))
that was causing vscode to reload even if it's the same folder. This only happened in remote containers
Changing this line to
vscode.commands.executeCommand('vscode.open', vscode.Uri.file(path))
solved the issue.
Command vscode.openFolder should be changed to vscode.open
I found more info about these commands in the docs

VS Code's file changes watcher stopped working

I have vsc version 1.63.2. I'm getting the following notification:
"File changes watcher stopped unexpectedly. A reload of the window may enable the watcher again unless the workspace cannot be watched for file changes."
When I click the reload button, the issue is temporarily fixed and Source Control shows changes to my files. Git in CLI is working fine; git log --raw shows changes to my files correctly. I've tested brand new and old repositories and workspaces. The problem occurs in all of them. Any help troubleshooting this is greatly appreciated!
I just ran into this issue today and found my solution by viewing the "Window" logs using the "Developer: Open Log File..." command from the Command Palette.
In my case, the problem was that I had added a folder to my workspace that I had since deleted on the file system. The log in question looked something like:
... [error] [File Watcher (parcel)] Unexpected error: Invalid handle (EUNKNOWN) (path: \path\that\no\longer\exists)
... [error] [File Watcher (parcel)] restarting watcher after error: Invalid handle
Hopefully viewing this log helps you find out what's breaking in your specific case.
I also encountered this problem. I was using VSCode and opening a folder in it on WSL Ubuntu 20.04. The solution for me was to install the VS Code Remote - WSL extension.
I hope this will be useful for someone.
TLDR : on Windows 10, if you have Cygwin64 installed and you got a Git For Windows update, check Git for Windows path comes before Git from Cygwin path in environment variables.
Long version : Just got into the same error today. The Git Lens extension was not working anymore.
I'm on Win 10, so there is no way (at least I didn't find one) to increase the limit of watchers like on linux. My VS Code is v1.66.2, Git Lens extension is v12.0.6.
In my case, the logs said :
... [error] [File Watcher (parcel)] Unexpected error: Invalid handle (EUNKNOWN) (path: cygwin\g\path\that\exists)
Notice that ENOSPC !== EUNKNOWN
So I searched everywhere with little to no success, except here where Gordon Christopher Weeks's answer actually hinted me towards that logs.
Then I remembered several things :
I have a terminal installed that's called cygwin64 and that allows me to use some linux utilities otherwise not available on Win (like rsync);
two days ago, I authorized an update for Git for Windows (2.35.2);
when I installed cygwin, the tutorial I followed told me about following a certain sequence in the Windows path environment variable
So I checked the path variable, noticed the Git update deleted the initial path to git and put it in the last place. I only had to move it up, before the cygwin64 path to git.exe (a git utility is included with cygwin) and everything's back to normal.
Hope this helps and so you won't waste the time I did !
[Possible quick solution] First thing to check is to see if you are tracking a WSL folder in a Visual Studio Code Explorer workspace AND you switched VS Code back to windows (was in a WSL distro).
If so, then right-clicking on it and selecting "remove from workspace" will also remove it from the file change watcher.
Refresh the file change watcher (bell icon, lower right corner of window) to see if it cleans up the problem.
This was the issue I had with the system.

Failed to connect to the remote extension host server (Error: Handler already set!)

I went to open a repo using Vs Code on a remote ssh host. I can ssh in successfully but when I try to open a repo I get Failed to connect to the remote extension host server (Error: Handler already set!). I've tried un installing and re installing Vs Code. Does anyone have a fix other than switching ides.
avenmore comment helped me:
I started getting this message with v1.57.0 when trying to run a Vue
project. Long story short: I usually have my DEBUG CONSOLE window
docked inside to the right of my TERMINAL (powershell), and upon
opening VSCode it wouldn't be visible and I'd get this message after
building successfully and trying to launch. The work-around is to
close VSCode, navigate to folder
USERPROFILE%\AppData\Roaming\Code\User\workspaceStorage and delete the
contents (notably state.vscdb) and then restart VSCode. The DEBUG
CONSOLE then shows itself again and all is fine unless I dock it again
and close VSCode and there is a good chance of it happening again next
time VSCode is opened. I have stopped docking the window inside the
terminal and it hasn't happened since.
For me what solved this was to go into the 'remote explorer' and clear out the SSH Targets that I already had in there before the upgrade, and then just paste them in again. Now I can connect. For example, a re-pasted SSH command looked like:
ssh -i "/Users/myuseraccount/abc.pem" someuser#ec2-ip-instance1.compute.amazonaws.com
A few days later this stopped working again. I think maybe because my SSH targets config saved what I pasted in as my SSH connection command. It appears "sometimes" if there are any entries in the SSH target config file, that this error occurs.
I find to ensure this error never occurs do
rm ~/.ssh/config
every time before you open Vs Code. Assuming ~/.ssh/config is where your Vs Code is reading its SSH entries from. There is one other place possible under /etc/$somewhere (I dont know where).
Then when you go to your empty SSH Target and hit the (+) button to connect, paste in the entire ssh connection request at the top of this file. I think you have to clear out the SSH targets every time otherwise I get this error coming up again days later.
Try in settings.json add item "security.workspace.trust.enabled": false
Windows, VSCode 1.57.1
I've just remove and added the host again in ssh configuration:
If you are using MacOS, I found a way.
Close Visual Studio Code, delete files in these two folder, then restart Visual Studio Code.
rm -rf $HOME/Library/Application\ Support/Code
rm -rf $HOME/.vscode
I tried all solution on this post, and can't get success. Then cloned another repo on my WSL folder then open, it was fine. So I changed my repo name, then problem gone. Maybe it may dumb solution. But it works me.
You gonna have to change the "debug.terminal.clearBeforeReusing" to true on setting.json. It works for me
I noticed there was a workspace folder in the folder above, deleted that and it resolved the issue
On the remote system, after various things had happened, I did mv .vscode .vscode-old to basically reset the remote .vscode (over ssh). I had also renamed the remote folder for the project -- not sure if that matters. Then I was was able to connect to it again.
I can't be scientific about those "various things that happened", but I'll to list some:
I had created a second project alongside the first and had connected to it - this was for unrelated reasons and preceded the "handler" error
it was then that I had issues connecting to the first one, even though it had worked for months and months without me ever having this Handler already set error -- related to creating the 2nd one? Not sure. The 2nd one worked fine throughout.
I tried File: Open Folder... from the second remote project and opened the first; it opened but got 2 python exception errors in a python extension - unfortunately I can't remember what they were. This could be noise / unrelated. I happen to have both MS python and pylance extensions installed remotely, I think it was the pylance once that was not happy.
during this, I had also renamed the 1st folder which didn't work; I'm not sure if the rename triggered the different behaviour ie python ext errors instead of the "handler" error
I then replaced .vscode in the first remote project (with the new folder name)
... and that was when it worked, with no "handler" error and no complaints from the python extension(s)

Visual Studio Code only compiles when launched from project folder on Linux

I have Visual Studio Code installed in Ubuntu 20.04. I love how it works. I installed it from the tar ball. Same with the SDK. I just found that those appear to work better than installing from deb packages.
I created a desktop file so I could add Visual Studio Code to the dock and launch it that way, but what I've noticed is that projects won't compile. I get errors stating it can't find the project even though the errors are listing the folder where the items exist.
The only way I can get it to work is to:
Open a terminal.
Navigate to the folder where the project files reside.
Launch code from the command line.
Then it works. Otherwise, I get a pop-up error that says "The preLaunchTask 'build' terminated with exit code -2" and then the terminal window is filled with errors.
Here's the last of the error messages and then I opened up a terminal and it shows that I'm in the folder for the project and the csproj exists there:
This also happens if I install Visual Studio code from a repository. It seems launching it from the Unity desktop breaks something. But if I launch it from the command line in a terminal session from the folder where the project resides, then the problem goes away.
I can also reproduce this error from the command line if I launch Visual Studio Code from a different folder than the project I'm trying to compile.
Is this common? Just curious. I'm wondering if because when I launch it from the Unity desktop, it's launching under a different
I got it working under 20.04. I must have done something wrong so I did a wipe of the .NET Core install and reinstalled it all using the bash shell script and then was able to install Code via Software Installer tool. Not sure why it didn't work before, but it works now.

How to open Visual Studio Code from the command line on linux?

I know I can use command "code" to open VS code or file, but I don't know what should I do to make it possible after I install VS code in Ubuntu.Thanks.
Launching from the Command Line
You can launch VS Code from the command line to quickly open a file, folder, or project. Typically, you open VS Code within the context of a folder. We find the best way to do this is to simply type:
code .
Tip: We have instructions for Mac users in our Setup topic that enable you to start VS Code from within a terminal. We add the VS Code executable to the PATH environment variable on Windows and Linux automatically during installation.
Sometimes you will want to open or create a file. If the specified files does not exist, VS Code will create them for you:
code index.html style.css readme.md
Tip: You can have as many file names as you want separated by spaces.
Source: https://code.visualstudio.com/Docs/editor/codebasics
So, there are a couple of solutions for this.
I've linked a video that shows you how to add vscode to $PATH
(which didn't work for me because I couldn't find the "shell:install path" command)
I uninstalled the vscode from my ubuntu and re-installed using sudo snap install --classic code
(This method worked for me)
Tell me which one works for you... and if you have extensions installed to your vscode then i guess you ought to make a backup or something.
Link to the video: https://youtu.be/iP5FKZXtDBs