Search

Total Pageviews

Categories

Linux (8) Windows (5) Container (4) Development (4) Database (3) Docker (3) Mac OS (3) QuickStart (3) Ubuntu (3) AWS (1) Fedora (1) FreeBSD (1) Git (1) Java (1) MyBatis (1) Oracle Linux (1) Spring Boot (1) Unix (1) VMware (1) Virtualization (1) kdevtmpfsi (1) kinsing (1)

Featured Post

Your container's CPU usage is more than 100%, "kdevtmpfsi" the cryptomining malware is running | So how to resolve

How to resolve when "kdevtmpfsi" the crypto-mining malware is running and taking all CPU load of your server (container). One d...

Wednesday, July 3, 2019

How to find and kill the program that's using a specific port number Windows and Linux

Windows:

1. Find the program that is using a port number:

D:\>netstat -ano | findstr 8090
  TCP    0.0.0.0:8090           0.0.0.0:0              LISTENING       10716
  TCP    [::]:8090              [::]:0                 LISTENING       10716

2. Kill the program:

D:\>taskkill /F /pid 10716
SUCCESS: The process with PID 10716 has been terminated.

Linux:

1. Find the program that is using a port number:

[koacervate@SVT00005523 ~]$ sudo netstat -lnp | grep 6379
tcp        0      0 10.16.30.76:6379        0.0.0.0:*               LISTEN      24982/redis-server
tcp        0      0 127.0.0.1:6379          0.0.0.0:*               LISTEN      24982/redis-server

2. Kill the program:

[koacervate@SVT00005523 ~]$ ps -aef | grep redis
root     24982     1  0 13:31 ?        00:00:00 /usr/local/bin/redis-server 127.0.0.1:6379
htct     25086 24560  0 13:31 pts/0    00:00:00 grep --color=auto redis
[koacervate@SVT00005523 ~]$ sudo kill -9 24982

:))

"The action can't be completed because the folder or a file in it is open in another program Close the folder or file and try again." -> You are trying to move or delete a folder in Windows 10 but you get the message.

"The action can't be completed because the folder or a file in it is open in another program  Close the folder or file and try again."

git bash: "Unlink of file 'lib/ojdbc8.jar' failed. Should I try again? (y/n)"




So follow the steps below to resolve the issue:

1. From the Windows Start menu, open "Resource Monitor" program.



2. Choose the "CPU" tab.




3. Enter the file name or folder name to "Search Handles" box.




4. Choose from the result to kill (End Process) the programs which access to the files or folders.



Now you can modify, move or delete the files or folders as normal.

:))

Saturday, January 26, 2019

QuickStart: The fastest and easiest way to run an Instance of Oracle Database on Mac OS

Run Oracle Database on your Mac.


Need an instance of Oracle Database Server running on your Mac for your testing or development purpose?
-> Via Docker and Oracle Database Enterprise Edition Image with few steps in minutes.

Install Docker CE for Mac and log in to Docker Hub.

- Register a Docker ID if you don't have.
- Skip this step if Docker already installed on your Mac and you already logged in Docker Hub.







Pull and run Oracle Database Enterprise Edition Image from Docker Hub.

- Search for "Oracle Database Enterprise Edition" in Docker Hub and Checkout the document for more details.




- Run the command below to starting an Oracle Database Server Instance as a Docker container named "Oracle-DB" and mapping port 1521 from the container to port 1521 on your Docker host (your Mac). This will take you a few minutes to download the image and Starting the container.

docker run -d -it --name Oracle-DB -p 1521:1521/tcp  store/oracle/database-enterprise:12.2.0.1



- After the download is done and the container started, you can check the image already pulled and the container running as below:



- Now you can connect to the Oracle Instance via Oracle SQL Developer Tool with username: "sys as sysdba", password: Oradoc_db1 as below:



- Ok, So now you already have an instance of Oracle Database server in your Mac for testing or development. When you don't want the instance running and saving your Mac performance, you can stop the container or want to start the instance again as below:


- If your project is done and you don't want to use the instance any more, you should stop the container and delete the image as below:


- And remove unused volume:
docker volume prune

Error Notes: When you connect from Oracle SQL Developer Tool to the Oracle Database Server Instance, if you get a message "Status: Failure -Test failed: IO Error: Got minus one from a read call" or "Status: Failure -Test failed: Listener refused the connection with the following error:
ORA-12505, TNS: listener does not currently know of SID given in connect descriptor" -> So please wait in moments, the instance is preparing in the container, you can connect success very soon after that, don't worry :). Good luck and fun.

References:
- https://docs.docker.com
- https://hub.docker.com/_/oracle-database-enterprise-edition?tab=resources