Find Out What Process is Listening on a Specific TCP Port

There are two commands which are popular to get the result: netstat and lsof. We probably already have been familiar with

netstat -nlp

to list all the listening ports. We actually could do

lsof -Pnl +M -i4

to list all IPv4 ports or

lsof -Pnl +M -i6

to list all IPv6 ports as well.

“Last build was not on tied node, forcing rebuild”

Last build was not on tied node, forcing rebuild.

Once you have restarted your Hudson/Jenkins, you may get your build always rebuild even though there’s no change at all because the polling SCM fails.

The solution is tricky and simple: try to rename the node which you tied your hudson job, and tie the job again. (or in additional, rename the node back.)

Why my iPhone camera roll take so much storage?

I have a iPhone 6 and ~100 photos in it, but when I check out the storage usage, it says my camera roll takes 8 Gb storage… That is insane… Also there’s nothing in Recently Deleted folder.

After googling, I figured it out it was a bug of iOS. The solution is:

  1. Go to Settings
  2. Date & Time
  3. Untoggle “Set Automatically”
  4. Manually change the date back. For example, if today is March 15, 2015, choose August 1, 2014. (You can change it back once we’re done)
  5. Close out of that
  6. Open “Photos” (Make sure you have terminated this App before relaunching it)
  7. Select “Albums”
  8. If, like me, you had already cleared out everything from the Camera Roll and “Recently Deleted” folder, you’ll smile to see that your “Recently Deleted” folder now has thousands of images back. Those are your phantom photos
  9. Open it, “Select” and start deleting
  10. Now, go back into Settings – General – Usage – Storage – Manage Storage – and you’ll notice your Photo & Camera is empty if you deleted everything

via Apple forum here.