VSCode Error: The terminal process failed to launch: Path to shell executable "/usr/bin/tmux" does not exist - visual-studio-code

After VScode installation, when I tried to open my integrated terminal window, each time I am getting error mentioned in the title.
I don't know what is the correct path to shell-executable. Before VSCode installation, the only change I done in terminal is I installed zsh in it.
System Details -
OS: Ubuntu 20.04 LTS
VSCode version: 1.53.2

I solved this issue by changing by default shell for vs-code with following steps:
Open settings-search in VSCode with Cntr + Shift + p
Search for default
clicked Terminal: Select Default Shell
clicked zsh /usr/bin/zsh, I selected zsh as I recently installed it and like to use it, you can use other terminal options as well.
Thank you.

I had the same issue. I resolved it by changing the path of "terminal.integrated.shell.linux" in the settings.json file.
Link : https://code.visualstudio.com/docs/supporting/troubleshoot-terminal-launch

The option "terminal.integrated.shell.linux" is deprecated.
The new VSCode config is (mine is 1.62.3 on Ubuntu):
"terminal.integrated.defaultProfile.linux": "zsh",
"terminal.integrated.profiles.linux": {
"zsh": {
"path": "/usr/bin/zsh",
}
},
If only "terminal.integrated.defaultProfile." is set, it can not find zsh.

everyone.
I had a similar issue, but I wasn't able to identify if something was using the port 5432.
That was the way that I solved the issue:
I used sudo ss -tulwn | grep LISTEN
➜ xxxx-xxxx-xxxxxx git:(main) sudo ss -tulwn | grep LISTEN
tcp LISTEN 0 244 127.0.0.1:5432 0.0.0.0:*
tcp LISTEN 0 511 127.0.0.1:35613 0.0.0.0:*
tcp LISTEN 0 100 127.0.0.1:49152 0.0.0.0:*
tcp LISTEN 0 128 127.0.0.1:30800 0.0.0.0:*
tcp LISTEN 0 128 127.0.0.1:30900 0.0.0.0:*
tcp LISTEN 0 4096 127.0.0.53%lo:53 0.0.0.0:*
tcp LISTEN 0 5 127.0.0.1:631 0.0.0.0:*
tcp LISTEN 0 5 [::1]:631 [::]:*
docker container ls (just checking)
➜ xxxx-xxxx-xxxxxx git:(main) docker container ls
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
docker ps -a (just checking)
➜ xxxx-xxxx-xxxxxx git:(main) docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
docker network prune
➜ xxxx-xxxx-xxxxxx git:(main) docker network prune
WARNING! This will remove all custom networks not used by at least one container.
After that, docker-compose down and docker-compose up --build works
And I was happy using docker... until now.
My next steps:
Configure container's environment for the first time
Run docker-compose run —rm web bash in a separate terminal pane/window. You should now be inside container, which is
indicated by showing you a hashtag before commands.
Run rails db:create within container.
Run rails db:migrate within container.
Run the environment seeds (if you want to)
Run rails db:seed.

Related

awx docker compose phase fails

I am trying to install AWX as part of a docker container image following the guide here but it fails in the docker-compose step like so:
docker-compose -f tools/docker-compose/_sources/docker-compose.yml up --remove-orphans
tools_postgres_1 is up-to-date
tools_redis_1 is up-to-date
Starting tools_awx_1 ...
Starting tools_awx_1 ... error
ERROR: for tools_awx_1 Cannot start service awx_1: driver failed programming external connectivity on endpoint tools_awx_1 (5711eb4a73513b5bd3c27c990761000325f71ae48dbe1e6308d33bf07382415a): Error starting userland proxy: listen tcp4 0.0.0.0:8080: bind: address already in use
ERROR: for awx_1 Cannot start service awx_1: driver failed programming external connectivity on endpoint tools_awx_1 (5711eb4a73513b5bd3c27c990761000325f71ae48dbe1e6308d33bf07382415a): Error starting userland proxy: listen tcp4 0.0.0.0:8080: bind: address already in use
ERROR: Encountered errors while bringing up the project.
make: *** [Makefile:485: docker-compose] Error 1
When I scan for the user of port 8080 it shows this:
$ sudo netstat -pna | grep 8080
tcp6 0 0 :::8080 :::* LISTEN 733/java
This most likely appears to be related to Jenkins since I recollect having installed Jenkins with all default options and I use this port to reach to the Jenkins UI.
So what should be the alternative here without removing Jenkins or changing the port number for the Jenkins daemon (is it a daemon that runs Jenkins btw?) How can I change the endpoint for this AWX docker image? I'm rather new to docker and AWX, not to mention the devops ecosystem in general so would appreciate a bit of context around your suggestions.

Unable to take backup by Cassy

I have been trying to take backup using Cassy, but I could only get metadata backup.
It seems that there's no error-logs on Cassy and the status is "STARTED" on Cassy's BackupList.
Below is the steps I tried for deployment. Is there any lacking steps or something should be correct?
First, I created scalar DL, cassandra and envoy with git clone from below.
git clone https://github.com/scalar-labs/scalar-samples.git
I've chencked that it works and I can execute contract correctly.
Then I added Cassy container as below.
Add ssh to cassandra nodes.
Change commitlog_sync from periodic to batch.
Git clone from below
git clone https://github.com/scalar-labs/cassy
Edit cassy.properties file to add S3 infomation and other paths.
Create container using cloned Dockerfile.
cassy/build/docker/Dockerfile
I'm not fully sure about the environment you are working on.
Is Cassy master in your localhost and other components like Cassandra are in Docker ?
If that is the case, then I doubt that Cassy can connect Cassandra via JMX.
BTW, are there any logs in /var/log/scalar ?
I deployed all nodes on one docker EC2.
Cassandra and Cassy can connect using docker local network.
Also I checked if Cassandra is listening JMX.
172.21.0.2 is the cassandra container's docker network IP.
# netstat -tln
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:9042 0.0.0.0:* LISTEN
tcp 0 0 172.21.0.2:7000 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.11:46715 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:7199 0.0.0.0:* LISTEN
If I deploy cassy using "./gradlew installDist", I can get /var/log/scalar/cassy.log.
It shows only a below log.
2020-07-22 05:35:21.641 [pool-3-thread-1] INFO c.s.c.transferer.AwsS3FileUploader - Uploading /tmp/cassy.db.dump
But If I changed to deploy cassy using "./gradlew docker", there is no such log file on cassy container.

How to list currently running servers that are listening to localhost ports in vscode

I am using VS Code for development. After running the server as usually using npm start command (which was set up to run nodemon and the main 'app' file) I closed the terminal.
I thought that when terminal is shut down nodemon get shut down along with the terminal. Evidently this is not so as when I attempt to run npm start in the new terminal it throws an error that the port I set up my server to listen to is already in use.
Is it possible to see what servers are running currently and which ports they are listening to?
If there is no such command to list the currently running servers is there any way to shut down the running servers on the local machine without shutting down the laptop I am working on?
By the way everything mentioned above is being done on local machine and no remote server is used. Thank you in advance.
If you are on a Linux box you can run this to get the PID of any process running on that port:
Linux:
netstat -tnlp | grep {{PORT}}
This will likely find multiple lines since the number of the {{PORT}} value might show up in a PID, IP address, etc., so look through the list to find what you're looking for. The PID and process name will show up on the far right column of the result.
Example for Linux:
# netstat -tnlp | grep 443
tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN 14384/nginx: master
The column on the right (14384/nginx: master) is the PID of that process, and the process name. Once you have the PID you could do a kill {{PID}} to kill that process.
The Mac version of netstat is different, and doesn't display the PID (at least not that I can tell), and I'm not sure if there's a way to do the same thing on a Windows box.

Could not start Appium server. It's showing [Error Starting appium server: listen EADDRINUSE 0.0.0.0:4723]

I am using Appium version V1.15.0 and have already start the server successfully with the default Host: 0.0.0.0 and Port: 4723
But now when i try to start the server it shows me this error "Error Starting Appium server: listen EADDRINUSE 0.0.0.0:4723"
I have tried to solve this issue by changing the port but could not find any solution.
Suggest me if you guys have any better solution.
I have found the solution. After restarting my computer, i could successfully run the Appium server.
If anyone face the same problem. Please follow below steps:
1. Check if the port is listening to any other services.
Open command prompt: Type netstat -a -b
Either kill that service or try with different port.
If both not working then restart your machine.
This way i have solved this problem.
If EADDRINUSE, Address already in use is the issue,
do
ps aux | grep node
to get the process ids.
Then:
kill -9 PID
Doing the -9 on kill sends a SIGKILL.
That because port 4723 has been used.
We gonna find which process using it
sudo lsof -i :4723
input your Mac user password, press Enter and the result will similar to
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
AppX 68286 huyck 65u IPv4 0x31233f2022a17f56 0t0 TCP *:4723 (LISTEN)
that mean AppX with PID 68286 is using this port
And we are gonna kill it (replace 68286 with your PID)
sudo kill -9 68286
Another easier way, restart the machine could solve this problem
Hope this helps!
The following solution on windows worked for me
C:\Users\username> taskkill /F /IM node.exe
SUCCESS: The process “node.exe” with PID 13992 has been terminated.

Docker toolbox on windows 10. Bind for 0.0.0.0:8081 failed: port is already allocated error

I have setup docker toolbox on windows 10. While building the project I encountered the following error :- Bind for 0.0.0.0:8081 failed: port is already allocated ? The sudo service docker restart command isn't working. Please provide me a solution for the same.
Generally speaking, you need to stop running the current container. For that you are going to know current CONTAINER ID:
$ docker container ls
You get something like:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
97a32e8928ef friendlyhello "python app.py" 51 seconds ago Up 50 seconds 0.0.0.0:4000->80/tcp romantic_tesla
Then you stop the container by:
$ docker stop 97a32e8928ef
Finally, you try to do what you wanted to do, for example:
$ docker run -p 4000:80 friendlyhello
Commonly if this error happens, I restarting my winnat with commands:
$ net stop winnat
// build your project
$ net start winnat
If that doesnt help. I restart whole docker with commands:
wsl --unregister docker-desktop
wsl --unregister docker-desktop-data
Then docker offers to restart docker-service.