Network Error

Network Error

Client sends message to server, which is down, client outputs the following error:

Exception in thread "main" There is no process to read data written to a pipe.

at Method)



at org.yy.socket.TCPEchoClient.main(

Client tries to connect the server which is not started, client outputs the following error

Exception in thread "main" Connection refused: connect

at Method)









at org.yy.socket.TCPEchoClient.main(

When peer connection is closed, remote node outputs the following error:

Exception in thread "main" Connection reset by peer: socket write error

at Method)



at org.yy.socket.TCPEchoClient.main(

Create new socket when the cable is disconnected, it outputs the following error:

Exception in thread "main" Network is unreachable









at org.yy.socket.TCPEchoClient.main(

After use 'ifconfig en0 down' to disable en0, application outputs "IOException: The network is not currently available". The network is not currently available.

at Method)



On AIX, Multicast throws " The socket name is not available on this system'

Exception in thread "main" The socket name is not available on this system.

at Method)



at MulticastThread.getMulticastSocket(

at MulticastThread.<init>(

at MulticastThread.main(

Fix is to add Java commandline Parameter:

Linux Miscs

Linux Miscs

Specail command line parameter --
Example: vi -- -12

A runlevel is a software configuration of the system that allows only a selected group of processes to exist. Init can run the system in one of eight runlevels. These runlevels are 0-6 and S or s. The system runs in only one of these runlevels at a time. Typically these runlevels are used for different purposes. Runlevels 0, 1, and 6 are reserved. For Redhat Linux version 6, the runlevels are:
0 halt
1 Single user mode
2 Multiuser, without NFS (The same as 3, if you don't have networking)
3 Full multiuser mode
4 unused
5 X11
6 Reboot
Each mode has it's own list of settings for what services to start and what services to shutdown.
The inittab file
The "/etc/inittab" file tells init which runlevel to start the system at and describes the processes to be run at each runlevel. An entry in the inittab file has the following format:
action - Describes which action should be taken. Valid actions are listed below
* respawn - The process will be restarted whenever it terminates.
* wait - The process will be started once when the specified runlevel is entered and init will wait for its termination.
* once - The process will be executed once when the specified runlevel is entered
* boot - The process will be executed during system boot. The runlevels field is ignored.
* bootwait - Same as "boot" above, but init waits for its termination.
* off - This does nothing.
* ondemand - This process will be executed whenever the specified ondemand runlevel is called.
* initdefault - Specifies the runlevel which should be entered after system boot. If none exists, init will ask for a runlevel on the console. The process field is ignored.
* sysinit - The process will be executed during system boot. It will be executed before any boot or bootwait entries. The runlevels field is ignored.
* powerwait - The process will be executed when init receives the SIGPWR signal. Init will wait for the process to finish before continuing.
* powerfail - Same as powerwait but init does not wait for the process to complete.
* powerokwait - The process will be executed when init receives the SIGPWR signal provided there is a file called "/etc/powerstatus" containing the word "OK". This means that the power has come back again.
* ctrlaltdel - This process is executed when init receives the SIGINT signal. This means someone on the system console has pressed the "CTRL-ALT-DEL" key combination.
* kbrequest - The process will be executed when init receives a signal from the keyboard handler that a special key combination was pressed on the console keyboard.
* process - Specifies the process to be executed. If the process starts with the '+' character, init will not do utmp and wtmp accounting for that process. This is needed for gettys that insist on doing their own utmp/wtmp housekeeping (a historic bug).

RC.D Directory Explanation
In the folder: /etc/rc.d are all the run level folders starting from rc1.d to rc6.d and including init.d
It is in each of these rc#.d folders where the service run settings are kept. If you change directory into /etc/rc.d/rc3.d all the files that start with a capital S are the services that will start at this runlevel. All the files that start with a K are the services that will be killed at that runlevel.
The reason why services that are not supposed to run are still listed is because it is popular to switch a server from one run level to another instead of just booting into the needed run level
Switching Run Levels
init <Run Level number>
telinit [number of runlevel]
Which runlevel are you in?
sudo runlevel
who -r

Network Miscs

Network Miscs

Classes of IP Addresses, IP Broadcast and IP Multicast

IPv4 Address Classes:

The IPv4 address space can be subdivided into 5 classes - Class A, B, C, D and E. Each class consists of a contiguous subset of the overall IPv4 address range.

The values of the leftmost four bits of an IPv4 address determine its class as follows:

Class Leftmost bits Start address Finish address

A 0xxx

B 10xx

C 110x

D 1110

E 1111

IP Address Class E and Limited Broadcast

The IPv4 networking standard defines Class E addresses as reserved, meaning that they should not be used on IP networks. Nodes that try to use these addresses on the Internet will be unable to communicate properly.

A special type of IP address is the limited broadcast address A broadcast involves delivering a message from one sender to many recipients. Senders direct an IP broadcast to to indicate all other nodes on the local network (LAN) should pick up that message. This broadcast is 'limited' in that it does not reach every node on the Internet, only nodes on the LAN.

Technically, IP reserves the entire range of addresses from through for broadcast, and this range should not be considered part of the normal Class E range.

Some multicast group addresses are assigned as well-known addresses by the IANA. "These are called permanent host groups. means "all systems on this subnet," and means "all routers on this subnet."

The multicast address is for NTP, the Network Time Protocol, is for RIP-2.

IP Address Class D and Multicast

The IPv4 networking standard defines Class D addresses as reserved for multicast. Multicast is a mechanism for defining groups of nodes and sending IP messages to that group rather than to every node on the LAN (broadcast) or just one other node (unicast).

IP Loopback Address

As with broadcast, IP officially reserves the entire range from through for loopback purposes.

Zero Addresses

As with the loopback range, the address range from through should not be considered part of the normal Class A range. 0.x.x.x addresses serve no particular function in IP, but nodes attempting to use them will be unable to communicate properly on the Internet.

Private Addresses

The IP standard defines specific address ranges within Class A, Class B, and Class C reserved for use by private networks (intranets).

Class Private start address Private finish address




IPv6 Addressing Notation

IPv6 addresses may be written in any of the full, shorthand or mixed notation. Many IPv6 addresses are extensions of IPv4 addresses. In these cases, the rightmost four bytes of an IPv6 address (the rightmost two byte pairs) may be rewritten in the IPv4 notation. for example E3D7::51F4:9BC8:

Promiscuous mode

In computing, promiscuous mode or promisc mode is a configuration of a network card that makes the card pass all traffic it receives to the central processing unit rather than just packets addressed to it — a feature normally used for packet sniffing.

Each packet includes the hardware (Media Access Control) address. When a network card receives a packet, it normally drops it unless the packet is addressed to that card. In promiscuous mode, however, the card allows all packets through, thus allowing the computer to read packets intended for other machines or network devices.

Collision domain

A collision domain is a physical network segment where data packets can "collide" with one another for being sent on a shared medium, in particular in the Ethernet networking protocol. A network collision is a scenario wherein one particular device sends a packet on a network segment, forcing every other device on that same segment to pay attention to it. Meanwhile, another device does the same, and the two competing packets are discarded and re-sent one at a time. This becomes a source of inefficiency in the network. [1]

Reverse DNS lookup

Computer networks use the Domain Name System to determine the IP address that is associated with a given domain name. This process is also known as forward DNS resolution. Reverse DNS lookup is the inverse process of this, the resolution of an IP address into its designated domain name.

Serial Line Internet Protocol

The Serial Line Internet Protocol (SLIP) is a mostly obsolete encapsulation of the Internet Protocol designed to work over serial ports and modem connections. It is documented in RFC 1055. On personal computers, SLIP has been largely replaced by the Point-to-Point Protocol (PPP), which is better engineered, has more features and does not require its IP address configuration to be set before it is established. On microcontrollers, however, SLIP is still the preferred way of encapsulating IP packets due to its very small overhead.

Point-to-Point Protocol

In networking, the Point-to-Point Protocol, or PPP, is a data link protocol commonly used to establish a direct connection between two networking nodes. It can provide connection authentication, transmission encryption privacy, and compression.

Most Internet service providers (ISPs) use PPP for customer dial-up access to the Internet. Two encapsulated forms of PPP, Point-to-Point Protocol over Ethernet (PPPoE) and Point-to-Point Protocol over ATM (PPPoA), are used by Internet Service Providers (ISPs) to connect Digital Subscriber Line (DSL) Internet service.

Proxy ARP

Proxy ARP (Address Resolution Protocol) is a technique by which a device on a given network answers the ARP queries for a network address that is not on that network. The ARP Proxy is aware of the location of the traffic's destination, and offers its own MAC address in reply, effectively saying, "send it to me, and I'll get it to where it needs to go." Serving as an ARP Proxy for another host effectively directs LAN traffic to the Proxy. The "captured" traffic is then typically routed by the Proxy to the intended destination via another interface or via a tunnel.

The process which results in the node responding with its own MAC address to an ARP request for a different IP address for proxying purposes is sometimes referred to as 'publishing'.

Windows Commands

Windows Commands

Entering Commands

Command options are generally preceded by a forward slash

Multiple commands may be concatenated by an ampersand: command1 &

command2. The commands are executed in sequence.

Commands may be executed conditionally, based on the success or failure of a

preceding command, by joining them with && or || (respectively).

I/O Redirection

< file, > file, 1> file, >> file, 1>> file, 2 > file, 2 >> file, > file 2 >&1

command1 | command2, command1 0 > command2

Form a pipe, linking the standard output of command1 to the standard input of


Environment Variables

Environment variables are dereferenced by enclosing the name between percent signs.


Help Commands

help command, command /?

net help command

Obtain help for one of the net commands.

net helpmsg nnnn

Explain Windows 2000 message number nnnn.

cmd [options] [ /C | /K [ /S ] command]

Start a new Windows 2000 command interpreter. If command is specified, that command is


date [mm-dd-[yy]yy] [/T] The /T option displays the date without modifying it.

doskey [options]

Recall previous commands or create macros (aliases).

/HISTORY Display the entire command history list.

/LISTSIZE=n Set the size of the history list to n.

find [options] string [files]

/V Display only nonmatching lines.

/I Perform a case-insensitive search

/C Display a count of matching lines only.

/N Display the line number preceding each line.

findstr [options] /C:string | /G:file | strings [files]

/R Interpret search strings as regular expressions.

/L Interpret search strings as literal text.

logoff /F /N End the current logon session, suppressing all confirmation prompts.

more [options] [files]

/C Clear the screen before displaying the first page.

/S Combine (squeeze) multiple blank lines into one.

+n Begin the display at line n of the input or first file.

now string Precede the specified string with the current date and time

path [path] Display or set the search path

sort [options] [< file]

/R Reverse usual sort order.

/+n Start sorting in column n.

time [hr[:min[:sec[.hd]]]] [A | P] [/T]

title string Set the title of the current command (cmd.exe) window.

Whoami Display the username of the currently logged-in user.

assoc [.ext=filestypename] Associate a file extension with a named file type.

ftype [filetypename=command-string]

Display (no parameters) or define file type-specific command invocations.

net computer \\host /ADD | /DELETE

Add or remove the specified computer from the domain database.

net name [name] [/DELETE]

net send who message

shutdown \\remote-host | /L [options] [message]

/R Reboot after shutting down.

/T:n Wait n seconds before shutting down (the default is 20).

/Y Answer yes to all subsequent prompts.

/A Abort a pending shutdown.

attrib [options] [files]

Set DOS file attributes (or display the current attributes if no options are specified). The file

list defaults to all files in the current directory.

comp [options] fileset1 fileset2 Compare two sets of files

compact [options] [files] Compress or uncompress the specified files

copy [options] source destination

If destination is a single file, all source files are concatenated.

del [options] files Delete files. erase is a synonym for del.

dir [options] [path]

/S Recurse subdirectories.

fc [options] fileset1 fileset2

Compare files or sets of files, displaying the differences between them. If multiple source

files are specified, files of the same name in the second file set are compared.

move [/Y] files destination

Move files to new directory location. Use /Y to suppress overwrite confirmation prompts.

net file [id [/CLOSE]]

Without arguments, list all open shared files and their ID numbers. When an id is specified,

information about that item is displayed and the /CLOSE option closes the file.

ren path new-name Rename the specified file. rename is a synonym for ren.

replace source-files destination [options]

Replace/update files in a destination directory.

/A Add new files to the destination directory

type file Display file contents.

xcopy files destination [options] Copy directory trees.

/EXCLUDE: file

/S Recurse nonempty subdirectories.

/E Include empty directories

/C Continue copying even if an error occurs.

Working with Directories

cd [/D] [path]

Display or set the current working directory. Use /D to change to the current directory on the specified drive when it is different from the current drive.

diruse [/*] [dirs]

Compute and display disk space usage by directory for the specified directories (or the top-

level folders within the specified directories, if the option is included).

md[mkdir] path

rd[rmdir] [options] path

/S Remove the entire subtree.

tree dir[options]

Display the tree structure for the specified directory.

/F Include filenames in the display.

Working with Disks and Filesystems

chkdsk x:[options] Check the filesystem on Drive x.

/F [/X] Fix any errors encountered. /X forces a volume dismount before the check.

/R Locate and recover bad sectors.

diskuse [path] [options]

Display disk space usage by user account for the current or specified directory tree.

format x: [options]

Format the disk partition designated by drive letter x (or the diskette in Drive x:).

label [x:] [label]

Assign the volume label for Drive x (defaults to the current drive). If no label is specified, you

are prompted for it.

Managing Shares

net share share-name[=path] [options] [/DELETE]

Make a directory available to the network or revoke shared access (the =path form is used

only when defining a new shared resource).

Without arguments, the command lists all currently shared resources.

net use [device:] [\\host\share] [password | *] [options] [/DELETE]

Map a network resource to a local device, which can be a drive letter or a printer of the form


net view [target]

Display the names of the computers in a domain or network, or display the shared resources

on a specified remote system.


con2prt, lpq, lpr,

print /D:\\server\ print_share files Print text files on the specified remote printer.

Networking-Related Commands

finger [user][@host] Display information about the specified local or remote use

ftp host | IP-address, hostname, telnet

arp Display and manipulate physical address-IP address translation.

arp /A [IP-address] [/N interface-address] Display current mapping

arp /S IP-address physical-address [interface-address]

arp /D IP-address [interface-address]

ipconfig [/ALL]

ipconfig /RENEW | /RELEASE [adapter]


Display or flush the contents of the DNS resolver cache.


Reregister all current DHCP names with the DNS.

net session [\\host] [/DELETE]

Without arguments, display session information for all connections to the local system.

The /DELETE option causes the specified session or all sessions to terminate, closing all associated open local files.

net statistics [SERVER | WORKSTATION]

netsh [context subcommand ...]

The network subsystem administration utility. This facility, which can function either in interactive mode or as a standalone command utility, provides support for command-line/script-based management of many network facilities, including DCHP (dhcp context keyword), network interface (interface), routing (routing), Remote Access Services (ras), and WINS (wins).

Specify the primary DNS server for the local system:

netsh interface ip set dns "Local Area Connection" ^ static ip-addr

Add an exclusion range to an existing DHCP scope:

netsh dhcp server scope name add excluderange ^ ip-addr1 ip-addr2

netstat [options] [n] /N, /R, /P protocol

nslookup [host] [DNS server]

Perform DNS name translation, using the designated DNS server, if specified. Without options, this command enters interactive mode.

pathping [options] destination

Trace routes to the destination, showing the degree of packet loss at each router/link.

ping [options] destinations /l length

route [options] [cmd [dest] [MASK netmask] [gateway] ^ [METRIC hops]]

View or modify the routing table. cmd is one of the following: PRINT, ADD, DELETE, CHANGE

/F Clear all gateway entries from the routing table.

/P Use with ADD to define a persistent route, which survives system reboots.

tracert host | IP-address Display the route to the specified destination.

Administering Users and Groups

net accounts /sync

Force an update of the user accounts database.

net accounts options [/DOMAIN]

Modify the system or domain password policy settings.


net localgroup

net user username [passwd |*] ^ [/ADD [options] | /DELETE]


Create or modify user accounts. As indicated, the username can be followed optionally by a

password or by an asterisk to request a password promp

Managing Processes

at List or schedule delayed and periodic tasks on the specified computer system.

at [\\host] job-ID /DELETE

at [\\host] /DELETE [/YES]

at [\\host] time [options] command

kill [/F] item


Write a listing of all current processes and their memory usage statistics to the file memsnap.log.

net print \\host\shared-printer

List the contents of the specified print queue.

net print [\\host] job-number [/HOLD | /RELEASE | /DELETE]


Continuously display a list of currently running processes, as well as the overall system memory and paging statistics.

runas /user:username command Execute a command as the specified user.

start [window-title] [options] command

/Ddir Set the current working directory for the command.

/B Start the command as a background process—don't create a new window.

net config [SERVER | WORKSTATION] [options]

Set configuration information for or display information about the Server and Workstation services.

net continue[pause, start, stop] service,

Accessing the System Registry

reg op args [options] Perform various registry operations.

netdiag [options] [/Q | /V | /DEBUG,/FIX]

Test various aspects of network connectivity for the local server.

netdom action [options] Manage Windows NT/2000 domains and trust relationships.

Script-Related Constructs


%m The argument number m. (Access arguments above the ninth one via the shift command.)

%* Corresponds to all command parameters.

%var % Value of variable var (local or environment).

Commands Useful in Scripts

call file | :label [args]

Run the specified external script file or labeled subroutine within the current script.

cls Clear the screen.

sleep secs

rem anything

echo message

echo ON | OFF

Enable or disable command echoing (it is enabled by default).

Pause Pause execution until the user presses a key.

prompt text Set the command prompt to text,

$D, $T Current date, current time.

$G Greater than sign (>).

$N Current drive letter.

$P Current drive and working directory.

set [var]

Display the value of the specified variable (or of all defined variables).

set var=string

Set the value of a string variable.

set /A var=numeric-expression

Set the variable to the result of the evaluated numeric expression.

shift [/n]

Shift script or command arguments down one place, starting at argument n (if specified).


Windows 2000 Commands Pocket Reference


Java (162) Lucene-Solr (112) Interview (63) J2SE (53) Algorithm (45) Soft Skills (39) Eclipse (32) Code Example (31) Troubleshooting (27) JavaScript (23) Linux (22) Spring (22) Tools (22) Windows (22) Web Development (20) Nutch2 (18) Bugs (17) Dev Tips (17) Debug (16) Defects (14) Text Mining (14) J2EE (13) Network (13) PowerShell (11) Chrome (10) Problem Solving (10) Google (9) How to (9) Learning code (9) Performance (9) Security (9) UIMA (9) html (9) Design (8) Http Client (8) Maven (8) bat (8) blogger (8) Big Data (7) Database (7) Guava (7) JSON (7) Shell (7) System Design (7) ANT (6) Coding Skills (6) Lesson Learned (6) Programmer Skills (6) Scala (6) css (6) Algorithm Series (5) Cache (5) Continuous Integration (5) IDE (5) Testing (5) adsense (5) xml (5) AIX (4) Become a Better You (4) Code Quality (4) Concurrency (4) GAE (4) Git (4) Good Programming Practices (4) Jackson (4) Life (4) Memory Usage (4) Miscs (4) OpenNLP (4) Project Managment (4) Review (4) Spark (4) ads (4) regular-expression (4) Android (3) Apache Spark (3) Distributed (3) Dynamic Languages (3) Eclipse RCP (3) English (3) Happy Hacking (3) IBM (3) J2SE Knowledge Series (3) JAX-RS (3) Jetty (3) Mac (3) Python (3) Restful Web Service (3) Script (3) regex (3) seo (3) .Net (2) Android Studio (2) Apache (2) Apache Procrun (2) Architecture (2) Batch (2) Bit Operation (2) Build (2) Building Scalable Web Sites (2) C# (2) C/C++ (2) CSV (2) Career (2) Cassandra (2) Fiddler (2) Google Drive (2) Gson (2) How to Interview (2) Html Parser (2) Http (2) Image Tools (2) JQuery (2) Jersey (2) LDAP (2) Logging (2) Software Issues (2) Storage (2) Text Search (2) xml parser (2) AOP (1) Application Design (1) AspectJ (1) Chrome DevTools (1) Cloud (1) Codility (1) Data Mining (1) Data Structure (1) ExceptionUtils (1) Exif (1) Feature Request (1) FindBugs (1) Firefox (1) Greasemonkey (1) HTML5 (1) Httpd (1) I18N (1) IBM Java Thread Dump Analyzer (1) Invest (1) JDK Source Code (1) JDK8 (1) JMX (1) Lazy Developer (1) Machine Learning (1) Mobile (1) My Plan for 2010 (1) Netbeans (1) Notes (1) Operating System (1) Perl (1) Problems (1) Product Architecture (1) Programming Life (1) Quality (1) Redhat (1) Redis (1) RxJava (1) Solutions logs (1) Team Management (1) Thread Dump Analyzer (1) Tips (1) Visualization (1) boilerpipe (1) htm (1) ongoing (1) procrun (1) rss (1)

Popular Posts