Posts

how to find app using port and kill it on windows 10

Image
  problem : cannot find running program using port solution: pres windows + r and type "resmon" then search on tab network search your listening port here now you have pid of the app and then kill it  open "command prompt" press window and type command prompt then kill the program with ID 20032 and here it is the command TASKKILL /F /PID 20032 and its clear  hope it help

failure: repodata/repomd.xml from kubernetes: [Errno 256] No more mirrors to try. [Errno -1] repomd.xml signature could not be verified for kubernetes

 Issue:  when installing kubernetes I got massage like this : kubernetes/signature                                                                                                                                                                                                  |  844 B  00:00:00 Retrieving key from https://packages.cloud.google.com/yum/doc/yum-key.gpg Importing GPG key 0x7AA99B80:  Userid     : "Rapture Automatic Signing Key (cloud-rapture-signing-key-2022-...

how to remote ssh using id_rsa private key Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).

 Issue : I always failed when autthentication using private key I always got message  Permission denied, please try again. Permission denied, please try again. username@194.233.123.65: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password). Soltion : this message caused public key and private key is not match now this is the solution on your client computer type  ssh-keygen   -t  rsa  -b   4096 this code will generate two files on directory ~/.ssh/ id_rsa and id_rsa.pub now we will copy the public id_rsa to the server now you can type  ssh-copy-id server_user @server _ip code above will copy content of id_rsa.pub to ~/.ssh/authorized_keys on server  and now Your can remote your server withour password like this  username@194.233.123.65 [ username @vmi828895 ~]$ hope it help sorry for bad english

How to solve React Hook useEffect has a missing dependency: func Either include it or remove the dependency array

Image
  Issue :  I got this issue on typescript when using hook component function from react React Hook useEffect has a missing dependency: 'getData'. Either include it or remove the dependency array  Solution : Now I found the solution.. it simple because it happened only when we use typescript put this comment above end of function like this // eslint-disable-next-line react-hooks/exhaustive-deps become like this  This comment line aims to ignore the errors in the next line of code useEffect (() => {         getData ();     // eslint-disable-next-line react-hooks/exhaustive-deps }, [location]); and your problem should be gone  thanks hope it help, sorry for bad english

how to solve Waiting for next available executor jenkins

Image
 issue: got message  Waiting for next available executor and it hanpped about 5 minutes , when executing something solution : increase executor on on menu  Manage Jenkins > Manage Nodes and cloud > master-node > configure  by default executor is only 2 but I increase it until 20 and it work again this config will impact on memory usage when many executor run

how to auto reload golang for developer

Image
 issue : every code changed I have to re run my code with command go run main.go  or  go run . solution: now I have a trick to make golang autoreload automatically and it proved it work without any problem than other method I tried solustion 1 using air actually you can use program from air for more detail you can search on google with keyword "golang air autoreload" but when I use it I found a problem that my program sometime cannot run perfecly because used port best solution  for me best solution is using nodemon from nodejs  first step you have to install nodejs from here https://nodejs.org/en/download/ youcan install msi for windows and install it on your computer if you have installed it you have to install tool name nodemon with open your command prompt npm install -g nodemon now you can use  nodemon -e go --exec go run . it mean nodemon will watch your file with extention .go , if any changes it will reload your program and this solution is best for...

How I install python 3.8 on centos 7

 Issue :  when I want to install python 3.8 on my centos server and direct download from server with extension tar.gz it will extract and I will run   sudo ./configure --enable-optimizations and it shown  configure: error: in `/home/user/Python-3.8.12': configure: error: no acceptable C compiler found in $PATH See `config.log' for more details solution : I install old version python 3.6 via yum and it will replaced with newest version from your download sudo yum update -y sudo yum install -y python3 and now python 3.6 installed on your system check with python3 will show  Python 3.6.8 (default, Aug 7 2019, 17:28:10) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> now replace with new one download dependency builder sudo yum install gcc openssl-devel bzip2-devel libffi-devel -y download your python if you dont have gz file  curl -O https://www.python.org...