2008-04-29 05:56:37     telnetd: All network ports in use.

Document created by Aaronwu Employee on Aug 22, 2013
Version 1Show Document
  • View in full screen mode

2008-04-29 05:56:37     telnetd: All network ports in use.

Vincent Puig (SPAIN)

Message: 55211    Hi all,

 

I can't telnet to the target:

 

telnet xxxxxxxxx

Trying xxxxxxxxx...

Connected to xxxxxxxxxx.

Escape character is '^]'.

telnetd: All network ports in use.

Connection closed by foreign host.

 

CONFIG_USER_TELNETD_TELNETD=y

CONFIG_USER_TELNETD_DOES_NOT_USE_OPENPTY=y

CONFIG_USER_TELNET_TELNET=y

# CONFIG_USER_BUSYBOX_TELNET is not set

# CONFIG_USER_BUSYBOX_TELNETD is not set

 

 

root:/> cat etc/inetd.conf

shell   stream tcp nowait root /bin/rshd

ftp     stream tcp nowait root /bin/ftpd -l

telnet  stream tcp nowait root /bin/telnetd

 

I asked this before, but I've already upgraded the kernel to the 2008R1.

 

I am using a nfs to the rootfs, maybe that's the reason I can't connect.

 

I also want to disable the console.

 

Any idea?

 

Thanks.

QuoteReplyEditDelete

 

 

2008-04-29 06:21:52     Re: telnetd: All network ports in use.

Yi Li (CHINA)

Message: 55213    On the board, could you see /dev/ptmx and /dev/pts/?

QuoteReplyEditDelete

 

 

2008-04-29 06:25:08     Re: telnetd: All network ports in use.

Vincent Puig (SPAIN)

Message: 55214    root:/dev> ls -l

crwxr-xr-x    1 root     root       5,   1 Feb 24  2007 console

crw-r-----    1 root     root       1,   3 Feb 24  2007 null

drwxr-xr-x    2 root     root            0 Jan  1 00:00 pts

crw-r-----    1 root     root       1,   5 Feb 24  2007 zero

 

ptmx is missing, could that be the problem?

 

root:/> cat etc/inetd.conf

shell   stream tcp nowait root /bin/rshd

ftp     stream tcp nowait root /bin/ftpd -l

telnet  stream tcp nowait root /bin/telnetd

QuoteReplyEditDelete

 

 

2008-04-29 18:57:03     Re: telnetd: All network ports in use.

Mike Frysinger (UNITED STATES)

Message: 55253    if you're using a nfs root, then you need to create all the device nodes by hand, or make sure mdev is enabled in your /etc/rc file

 

refer to the rc file that comes with the ADI boards

QuoteReplyEditDelete

 

 

2008-04-30 04:20:15     Re: telnetd: All network ports in use.

Vincent Puig (SPAIN)

Message: 55279    Hi, I am trying to build a jffs2 root.

 

I made the changes in the kernel configuration, but when I do "make", it doesn't build the "uImage", why is it?.

 

These are the files that are build:

 

-rwxr-xr-x 1 vincent vincent 7.2M 2008-04-30 10:04 linux.ext2

-rw-r--r-- 1 vincent vincent 5.0M 2008-04-30 10:04 rootfs.ext2

-rw-r--r-- 1 vincent vincent 1.5M 2008-04-30 10:04 rootfs.jffs2

-rw-r--r-- 1 vincent vincent 927K 2008-04-30 10:04 vmImage

-rwxr-xr-x 1 vincent vincent 2.2M 2008-04-30 10:04 vmlinux

QuoteReplyEditDelete

 

 

2008-04-30 15:47:43     Re: telnetd: All network ports in use.

Mike Frysinger (UNITED STATES)

Message: 55312    please consult the documentation as it explains this:

  docs.blackfin.uclinux.org/doku.php?id=enabling_jffs2

QuoteReplyEditDelete

 

 

2008-05-05 05:17:47     Re: telnetd: All network ports in use.

Vincent Puig (SPAIN)

Message: 55486   

 

Yes, I did.

 

Device Drivers ---> Memory Technology Devices (MTD) --->

 

<*> Memory Technology Device (MTD) support

 

[*] MTD partitioning support

 

[*] Command line partition table parsing

 

[*] Direct char device access to MTD devices

 

[*] Caching block device access to MTD devices

 

         Parallel NOR Flash

 

RAM/ROM/Flash chip drivers --->

 

<*> Detect flash chips by Common Flash Interface (CFI) probe

 

<*> Support for Intel/Sharp flash chips

 

<*> Support for AMD/Fujitsu flash chips

 

<*> Support for RAM chips in bus mapping

 

<*> Support for ROM chips in bus mapping Mapping drivers for chip access --->

 

<*> CFI Flash device in physical memory map (the address/length options are ignored)

 

File systems ---> Miscellaneous filesystems --->

 

<*> Journalling Flash File System v2 (JFFS2) support

 

And after compiling and copying the images, in U-boot:

 

CM-BF537> tftpboot 0x1000000 rootfs.jffs2

CM-BF537> protect off 0x20100000 0x203FFFFF

CM-BF537> erase 0x20100000 0x203FFFFF

CM-BF537> cp.b 0x1000000 0x20100000 0xBE019      *** the size of vmImage is 0xBE018

 

CM-BF537> md.b 0x20100000 0x02

20100000: 85 19    ..                                       *** so it's correct

 

CM-BF537> erase 0x20040000 0x200FFFFF

CM-BF537> tftp 0x1000000 vmImage

CM-BF537> cp.b 0x1000000 0x20040000 0xBE019

 

bootargs=root=/dev/mtdblock2 rw rootfstype=jffs2 ip=${ipaddr}:${serverip}:${gateway}:${netmask}:${hostname}::off console=ttyBF0,115200

 

 

I get this:

 

List of all partitions:

No filesystem could mount root, tried:  jffs2

Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

PHY: 0:01 - Link is Up - 100/Full

 

 

what should I modify?, bootargs? or it is a kernel configuration problem?.

 

 

QuoteReplyEditDelete

 

 

2008-05-05 08:57:43     Re: telnetd: All network ports in use.

Mike Frysinger (UNITED STATES)

Message: 55501   

 

i dont know, you need to post the entire boot log rather than the last 3 lines

QuoteReplyEditDelete

 

 

2008-05-06 03:23:40     Re: telnetd: All network ports in use.

Vincent Puig (SPAIN)

Message: 55532   

 

Ok, I am sorry. this is the boot log:

 

## Booting image at 20040000 ...

   Image Name:   Linux-2.6.22.18-ADI-2008R1-svn

   Image Type:   Blackfin Linux Kernel Image (gzip compressed)

   Data Size:    778200 Bytes = 760 kB

   Load Address: 00001000

   Entry Point:  00144000

   Verifying Checksum ... OK

   Uncompressing Kernel Image ... OK

Starting Kernel at = 144000

Linux version 2.6.22.18-ADI-2008R1-svn (vincent@canutet) (gcc version 4.1.2 (ADI svn)) #12 Wed Apr 30 12:44:24 CEST 2008

Hardware Trace Active and Enabled

Warning: limiting memory to 31MB due to hardware anomaly 05000263

Blackfin support (C) 2004-2007 Analog Devices, Inc.

Compiled for ADSP-BF537 Rev 0.2

Blackfin Linux support by   blackfin.uclinux.org/

Processor Speed: 500 MHz core clock and 100 MHz System Clock

Board Memory: 32MB

Kernel Managed Memory: 32MB

Memory map:

  text      = 0x00001000-0x001066a0

  rodata    = 0x00107000-0x001359c4

  data      = 0x00136000-0x00144000

    stack   = 0x00136000-0x00138000

  init      = 0x00144000-0x00156000

  bss       = 0x00156000-0x00162c50

  available = 0x00162c50-0x01eff000

  DMA Zone  = 0x01f00000-0x02000000

Instruction Cache Enabled

Data Cache Enabled (write-through)

Built 1 zonelists.  Total pages: 7874

Kernel command line: root=/dev/mtdblock2 rw rootfstype=jffs2 ip=${ipaddr}:${serverip}:${gateway}:${netmask}:${hostname}::off console=ttyBF0,115200

Configuring Blackfin Priority Driven Interrupts

PID hash table entries: 128 (order: 7, 512 bytes)

Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)

Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)

Memory available: 30024k/32768k RAM, (72k init code, 1045k kernel code, 298k data, 1024k dma, 308k reserved)

Blackfin Scratchpad data SRAM: 4 KB

Blackfin Data A SRAM: 16 KB (9 KB free)

Blackfin Data B SRAM: 16 KB (16 KB free)

Blackfin Instruction SRAM: 48 KB (40 KB free)

Security Framework v1.0.0 initialized

Capability LSM initialized

Mount-cache hash table entries: 512

NET: Registered protocol family 16

Blackfin GPIO Controller

Blackfin DMA Controller

cm_bf537_init(): registering device resources

Generic PHY: Registered new driver

NET: Registered protocol family 2

IP route cache hash table entries: 1024 (order: 0, 4096 bytes)

TCP established hash table entries: 1024 (order: 1, 8192 bytes)

TCP bind hash table entries: 1024 (order: 0, 4096 bytes)

TCP: Hash tables configured (established 1024 bind 1024)

TCP reno registered

JFFS2 version 2.2. © 2001-2006 Red Hat, Inc.

io scheduler noop registered (default)

io scheduler cfq registered

pfx: pfbits driver for bf5xx

Serial: Blackfin serial driver

bfin-uart.1: ttyBF0 at MMIO 0xffc00400 (irq = 18) is a BFIN-UART

bfin-uart.1: ttyBF1 at MMIO 0xffc02000 (irq = 20) is a BFIN-UART

RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize

arch/blackfin/mach-bf537/boards/cm_bf537.c:bfin_get_ether_addr: Setting Ethernet MAC to a random one

bfin_mac_mdio: probed

bfin_mac: attached PHY driver [Generic PHY] (mii_bus:phy_addr=0:01, irq=-1, mdc_clk=2500000Hz(mdc_div=19)@sclk=100MHz)

bfin_mac: Version 1.1, Blackfin BF53[67] BF527 on-chip Ethernet MAC driver

bfin-spi bfin-spi.0: Blackfin BF5xx on-chip SPI Contoller Driver, Version 1.0, regs_base@ffc00500, dma channel@7

TCP cubic registered

NET: Registered protocol family 1

NET: Registered protocol family 17

IP-Config: Unable to set interface netmask (-22).

List of all partitions:

No filesystem could mount root, tried:  jffs2

Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

PHY: 0:01 - Link is Up - 100/Full

 

QuoteReplyEditDelete

 

 

2008-05-06 07:28:48     Re: telnetd: All network ports in use.

Mike Frysinger (UNITED STATES)

Message: 55556   

 

you didnt enable any flash drivers, thus no mtd mappings were created, thus the root filesystem couldnt be found as "mtdblock2" doesnt represent any device

 

if you want root devices to be available during booting, you need to build the relevant drivers into the kernel

 

please consult the documentation:

  docs.blackfin.uclinux.org/doku.php?id=enabling_jffs2

QuoteReplyEditDelete

 

 

2008-07-28 18:01:43     Re: telnetd: All network ports in use.

Ben Burleson (UNITED STATES)

Message: 59499   

 

Hi,

 

I just wanted to add my solution to this.  It goes along with what Mike said about enabling mdev.  However, this is the section in my /etc/rc that was supposed to enable mdev:

 

if [ -e /bin/mdev ] && [ -e /proc/sys/kernel/hotplug ] ; then

    mount -t tmpfs mdev /dev -o exec,nosuid,mode=0755,size=10M

    echo /bin/mdev > /proc/sys/kernel/hotplug

    /bin/mdev -s

fi

 

I checked on the system and /bin/mdev was there, but no /proc/sys/kernel/hotplug.  So I used make xconfig to set CONFIG_HOTPLUG=y

 

General setup -> Configure standard kernel features (for small systems) -> Support for hot-pluggable devices

 

After a fresh make, I was able to telnet in with no problem.

 

-Ben

 

 

QuoteReplyEditDelete

 

 

2010-09-15 19:41:13     Re: telnetd: All network ports in use.

Andrew Kohlsmith (CANADA)

Message: 93477   

 

Just an update for people... this problem is still there and is still a bit of a pain in the ***, even with 2009R1.1-RC4.

 

I turned on mdev, enabled CONFIG_HOTPLUG and used the non-busybox telnetd. I did NOT enable "do not use openpty" (i.e. it is using openpty).

 

When this did not work, I went back to the kernel config and turned CONFIG_LEGACY_PTYS ("Legacy (BSD) PTY support"). I already had Unix98 PTY support enabled.

 

With both of these enabled, mdev and hotplugging enabled, the non-busybox telnetd and using openpty for telnetd, it works. What a pain in the arse.

 

BTW: busybox's telnetd causes a NULL pointer exception as soon as a connection attempt is made.

QuoteReplyEditDelete

 

 

2010-09-15 21:25:50     Re: telnetd: All network ports in use.

Mike Frysinger (UNITED STATES)

Message: 93478   

 

start your own thread.  this one is ancient.

Attachments

    Outcomes