APs randomly disassociate from WLC ver 4.1.185.0
I have a WLC 4402 with about 45 1010 APs installetion
WLC code version 4.1.185.0 and APs randomly disassociate from WLC - it happens usually one-two times a day
with an errors:
AP's Interface:1(802.11b) Operation State Up: Base Radio MAC:00:0b:85:xx:xx:xx Cause=Unknown
AP's Interface:1(802.11b) Operation State Down: Base Radio MAC:00:0b:85:xx:xx:xx Cause=Max Retrasmission
I've tried the suggested solutions putting a static ARP entry and moving AP's to different VLAN but nothing works unless the AP's physically rebooted.
I think the problem begin just after upgrading to 4.0.217.0
please note when AP's disassociates from WLC its still reachable via ping
Are there any specific requirements for newer versions?
Please advice
Layer 2 mode uses a different non-routable method of AP to WLC connection. By moving to layer 3 you enabled IP on the access points. This is why you were able to reassociate. Layer 2 should only be used when all the APs and the controller are on the same network segment. Bear in mind, Layer 3 is your friend. It will allow latency based applications to work much better and more reliable. Layer 2 is really only used to prepare the APs for some specific configurations that require a quick, clean connection to a controller.
Similar Messages
-
APs (1242 & 1230) disassociate from WLC4404 every hour
My APs disassociate from WLC every hour, so I completly lose the connection.
0 Fri Sep 8 17:29:09 2006 AP Disassociated. Base Radio MAC:00:17:0f:da:f2:60
1 Fri Sep 8 17:29:09 2006 AP's Interface:1(802.11a) Operation State Down: Base Radio MAC:00:17:0f:da:f2:60 Cause=Unknown
2 Fri Sep 8 17:29:09 2006 AP's Interface:0(802.11b) Operation State Down: Base Radio MAC:00:17:0f:da:f2:60 Cause=Unknown
3 Fri Sep 8 17:29:09 2006 AP Disassociated. Base Radio MAC:00:11:21:7d:71:c0
4 Fri Sep 8 17:29:09 2006 AP's Interface:1(unknown type) Operation State Down: Base Radio MAC:00:11:21:7d:71:c0 Cause=Unknown
5 Fri Sep 8 17:29:09 2006 AP's Interface:0(802.11b) Operation State Down: Base Radio MAC:00:11:21:7d:71:c0 Cause=Unknown
6 Fri Sep 8 17:21:38 2006 Rogue : 00:16:46:2b:aa:10 removed from Base Radio MAC : 00:17:0f:da:f2:60 Interface no:0(802.11b/g)
somebody can help me?I am running 4.0.179.8 and my APs do this too. I am running 1030 APs. They don't do it every hour but it is probably at least once every day or two.
When this happens I get a message for every AP Operation State Down: ... Cause = Unknown and shortly after that Operation State Up: ... Cause = Unknown.
If it was due to IP conflicts would only the APs with conflicts have problems? I am sure that there is no way that I have conflicting devices for every AP.
We are running Meditech client software on wireless laptops and every time this happens we end up with lost work and hung Meditech sessions.
I really need to get this fixed. I am beginning to regret going from Cisco 1100s to this new system.
I also get this message now and then:
AP's Interface:1(802.11b) Operation State Down: Base Radio MAC:00:0b:85:74:e9:90 Cause=Max Retrasmission
Does anyone know how to disable AP shutdown due to "Retrasmission"? -
Access point associated and deassociated from WLC
HI,
i have 3 AP AIR-LAP1042N-E-K9 in the same place (Event at down town) but they Sometimes the APs even disassociate from the controller temporarily, and i see the below errors on Prime infrastructure 2.0
Load threshold violation reported by 802.11b/g/n interface of AP <apname>, connected to controller <controllerIP>
Interference threshold violation reported by '802.11b/g/n' interface of AP
Coveraged threshold violation reported by 802.11b/g/n interface of AP <apname>, connected to controller <controllerIP>
what these problems and how to solve it
Thanks,
AhmedAfter these error done i see that error 802.11b/g/n interface of AP is down :controller.
please as example up time is 4:00 hours and join time changed every time may be once 12 m:15 sec, may be in another time 1h:15 m:20s
please feed me back these problem related to number of connected client because i monitor when the client exceed on AP more than 25 the AP deassociated from WLC. kindly find loggs from AP. wait your feed back.
*Mar 1 00:00:11.913: %SOAP_FIPS-2-SELF_TEST_IOS_SUCCESS: IOS crypto FIPS self test passed
*Mar 1 00:00:11.916: *** CRASH_LOG = YES
Security Core found.
Base Ethernet MAC address: 6C:20:56:48:E7:59
*Mar 1 00:00:13.876: %SOAP_FIPS-2-SELF_TEST_RAD_SUCCESS: RADIO crypto FIPS self test passed on interface Dot11Radio 0
*Mar 1 00:00:14.758: %SOAP_FIPS-2-SELF_TEST_RAD_SUCCESS: RADIO crypto FIPS self test passed on interface Dot11Radio 1
*Mar 1 00:00:14.761: %LINK-6-UPDOWN: Interface GigabitEthernet0, changed state to up
*Mar 1 00:00:15.891: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0, changed state to up
*Mar 1 00:00:18.795: %SYS-5-RESTART: System restarted --
Cisco IOS Software, C1040 Software (C1140-K9W8-M), Version 15.2(2)JB, RELEASE SOFTWARE (fc1)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2012 by Cisco Systems, Inc.
Compiled Tue 11-Dec-12 04:03 by prod_rel_team
*Mar 1 00:00:18.796: %SNMP-5-COLDSTART: SNMP agent on host 90013-03 is undergoing a cold start
*Mar 1 00:00:18.868: %LINK-5-CHANGED: Interface Dot11Radio0, changed state to reset
*Mar 1 00:00:18.868: %LINK-5-CHANGED: Interface Dot11Radio1, changed state to reset
*Mar 1 00:00:19.865: %LINEPROTO-5-UPDOWN: Line protocol on Interface BVI1, changed state to up
*Mar 1 00:00:20.214: %SSH-5-ENABLED: SSH 2.0 has been enabledlwapp_crypto_init: MIC Present and Parsed Successfully
*Mar 1 00:00:46.958: Logging LWAPP message to 255.255.255.255.
*Mar 1 00:00:50.510: %CDP_PD-4-POWER_OK: Full power - NEGOTIATED inline power source
*Mar 1 00:00:51.533: %LINK-6-UPDOWN: Interface Dot11Radio0, changed state to up
*Mar 1 00:00:52.335: %DHCP-6-ADDRESS_ASSIGN: Interface BVI1 assigned DHCP address 10.35.49.35, mask 255.255.255.248, hostname 90013-03
*Mar 1 00:00:52.533: %LINEPROTO-5-UPDOWN: Line protocol on Interface Dot11Radio0, changed state to up
*Mar 1 00:00:52.559: %LINK-6-UPDOWN: Interface Dot11Radio1, changed state to up
*Mar 1 00:00:53.559: %LINEPROTO-5-UPDOWN: Line protocol on Interface Dot11Radio1, changed state to up
*Mar 1 00:01:03.221: %CAPWAP-3-ERRORLOG: Did not get log server settings from DHCP.
*Mar 1 00:01:13.236: %CAPWAP-3-ERRORLOG: Selected MWAR 'RMS-WLC1'(index 0).
*Mar 1 00:01:13.236: %CAPWAP-3-ERRORLOG: Go join a capwap controller
*Dec 9 09:54:50.000: %CAPWAP-5-DTLSREQSEND: DTLS connection request sent peer_ip: 10.94.70.2 peer_port: 5246
*Dec 9 09:54:50.919: %CAPWAP-5-DTLSREQSUCC: DTLS connection created sucessfully peer_ip: 10.94.70.2 peer_port: 5246
*Dec 9 09:54:50.920: %CAPWAP-5-SENDJOIN: sending Join Request to 10.94.70.2
*Dec 9 09:54:50.929: %CAPWAP-3-ERRORLOG: Invalid event 10 & state 5 combination.
*Dec 9 09:54:50.929: %CAPWAP-3-ERRORLOG: CAPWAP SM handler: Failed to process message type 10 state 5.
*Dec 9 09:54:50.929: %CAPWAP-3-ERRORLOG: Failed to handle capwap control message from controller
*Dec 9 09:54:50.930: %CAPWAP-3-ERRORLOG: Failed to process encrypted capwap packet from 10.94.70.2
*Dec 9 09:54:51.300: %LINK-6-UPDOWN: Interface Dot11Radio0, changed state to down
*Dec 9 09:54:51.355: %LINK-5-CHANGED: Interface Dot11Radio0, changed state to reset
*Dec 9 09:54:51.413: %CAPWAP-5-JOINEDCONTROLLER: AP has joined controller RMS-WLC1
*Dec 9 09:54:51.464: ac_first_hop_mac - IP:10.35.49.33 Hop IP:10.35.49.33 IDB:BVI1
*Dec 9 09:54:51.464: Setting AC first hop MAC: e804.62dc.9922
*Dec 9 09:54:51.464: ac_first_hop_mac - IP:10.35.49.33 Hop IP:10.35.49.33 IDB:BVI1
*Dec 9 09:54:51.464: Setting AC first hop MAC: e804.62dc.9922
*Dec 9 09:54:51.465: %LINK-6-UPDOWN: Interface Dot11Radio0, changed state to up
*Dec 9 09:54:51.595: %WIDS-6-ENABLED: IDS Signature is loaded and enabled
*Dec 9 09:54:52.300: %LINEPROTO-5-UPDOWN: Line protocol on Interface Dot11Radio0, changed state to down
*Dec 9 09:54:52.383: %LINK-6-UPDOWN: Interface Dot11Radio1, changed state to down
*Dec 9 09:54:52.388: %LINK-5-CHANGED: Interface Dot11Radio1, changed state to reset
*Dec 9 09:54:52.464: %LINEPROTO-5-UPDOWN: Line protocol on Interface Dot11Radio1, changed state to down
*Dec 9 09:54:53.377: %LINEPROTO-5-UPDOWN: Line protocol on Interface Dot11Radio0, changed state to up
*Dec 9 09:54:53.409: %LINK-6-UPDOWN: Interface Dot11Radio1, changed state to up
*Dec 9 09:54:53.416: %LINK-6-UPDOWN: Interface Dot11Radio0, changed state to down
*Dec 9 09:54:53.421: %LINK-5-CHANGED: Interface Dot11Radio0, changed state to reset
*Dec 9 09:54:54.409: %LINEPROTO-5-UPDOWN: Line protocol on Interface Dot11Radio1, changed state to up
*Dec 9 09:54:54.416: %LINEPROTO-5-UPDOWN: Line protocol on Interface Dot11Radio0, changed state to down
*Dec 9 09:54:54.442: %LINK-6-UPDOWN: Interface Dot11Radio0, changed state to up
*Dec 9 09:54:55.443: %LINEPROTO-5-UPDOWN: Line protocol on Interface Dot11Radio0, changed state to up
*Dec 9 10:26:53.849: %WIDS-4-SIG_ALARM: Attack is detected on Sig:Standard Id:5 Channel:11 Source MAC:905f.2e62.e7a9
*Dec 9 10:32:20.938: %CAPWAP-3-ERRORLOG: Retransmission count for packet exceeded max(CAPWAP_WTP_EVENT_REQUEST
., 2)
*Dec 9 10:32:20.938: %CAPWAP-3-ERRORLOG: GOING BACK TO DISCOVER MODE
*Dec 9 10:32:20.938: %DTLS-5-SEND_ALERT: Send FATAL : Close notify Alert to 10.94.70.2:5246
*Dec 9 10:32:20.994: %WIDS-6-DISABLED: IDS Signature is removed and disabled.
*Dec 9 10:32:20.997: %LWAPP-3-CLIENTERRORLOG: LWAPP LED Init: incorrect led state 255
*Dec 9 10:32:21.038: %LINK-5-CHANGED: Interface Dot11Radio0, changed state to administratively down
*Dec 9 10:32:21.039: %LINK-5-CHANGED: Interface Dot11Radio1, changed state to administratively down
*Dec 9 10:32:21.041: %LINK-6-UPDOWN: Interface Dot11Radio0, changed state to up
*Dec 9 10:32:21.113: %LINK-6-UPDOWN: Interface Dot11Radio1, changed state to up
*Dec 9 10:32:19.000: %CAPWAP-5-DTLSREQSEND: DTLS connection request sent peer_ip: 10.94.69.2 peer_port: 5246
*Dec 9 10:32:19.925: %LINEPROTO-5-UPDOWN: Line protocol on Interface Dot11Radio0, changed state to down
*Dec 9 10:32:19.927: %CAPWAP-5-DTLSREQSUCC: DTLS connection created sucessfully peer_ip: 10.94.69.2 peer_port: 5246
*Dec 9 10:32:19.928: %CAPWAP-5-SENDJOIN: sending Join Request to 10.94.69.2
*Dec 9 10:32:19.939: %CAPWAP-3-ERRORLOG: Invalid event 10 & state 5 combination.
*Dec 9 10:32:19.939: %CAPWAP-3-ERRORLOG: CAPWAP SM handler: Failed to process message type 10 state 5.
*Dec 9 10:32:19.939: %CAPWAP-3-ERRORLOG: Failed to handle capwap control message from controller
*Dec 9 10:32:19.939: %CAPWAP-3-ERRORLOG: Failed to process encrypted capwap packet from 10.94.69.2
*Dec 9 10:32:20.093: %LINK-6-UPDOWN: Interface Dot11Radio1, changed state to down
*Dec 9 10:32:20.098: %LINK-5-CHANGED: Interface Dot11Radio1, changed state to reset
*Dec 9 10:32:20.370: %CAPWAP-5-JOINEDCONTROLLER: AP has joined controller UTO-WLC1
*Dec 9 10:32:20.424: ac_first_hop_mac - IP:10.35.49.33 Hop IP:10.35.49.33 IDB:BVI1
*Dec 9 10:32:20.424: Setting AC first hop MAC: e804.62dc.9922 -
My customer who has one WLC4402,36 AP1130.Some of APs miss from WLC sometimes but I can ping those APs at this time.I can not find any messages from WLC(version 4.2.61).Any suggestions?
That's all well and good if the controller can be pinged. What is usually the case here is that there is no route to the management interface of the controller or the ap manager interface as well. Check to see if there are IP address conflicts with those two interfaces. Next, make sure that you have not exceeded the total number of APs per physical interface. If you have add a LAG group or a second ap management interface. Verify security certificates are on the APs and that the date and time on the controller is accurate. Lastly, make sure you have no PoE issues or CDP. You're beating a dea horse here guys.
-
Cisco APs not updating after WLC-update
Hello everyone,
I need to update my 5508 WLCs to a newer software, to support new AP-models.
Started with AIR-CT5500-K9-1-7-0-0-FUS.aes and AIR-CT5500-K9-7-0-240-0.aes, everything worked fine. Pre-Downloaded the newer Image to the APs, restarted the WLCs and everything was ok.
Now I tried to update to 7.6.100.0 as well as 7.4.121.0. Both Versions should support my APs, but it doesn't work at all.
Any ideas are highly appreciated.
If you need further output, just let me know.
Regards,
Manuel
These are some informations about the environment, AP-info and logging after "upgrade" to 7.4.121.0, controller-information after downgrading again...
AP# sh ver
Cisco IOS Software, C1240 Software (C1240-K9W8-M), Version 12.4(23c)JA7, RELEASE SOFTWARE (fc1)
ROM: Bootstrap program is C1240 boot loader BOOTLDR: C1240 Boot Loader (C1240-BOOT-M) Version 12.4(13d)JA, RELEASE SOFTWARE (fc2)
AP uptime is 1 minute System returned to ROM by power-on System image file is "flash:/c1240-k9w8-mx.124-23c.JA7/c1240-k9w8-mx.124-23c.JA7"
cisco AIR-LAP1242AG-E-K9 (PowerPCElvis) processor (revision A0) with 27638K/5120K bytes of memory.
Processor board ID FCZ1545812F
PowerPCElvis CPU at 262Mhz, revision number 0x0950
Last reset from power-on LWAPP image version 7.0.240.0
1 FastEthernet interface
2 802.11 Radio(s)
32K bytes of flash-simulated non-volatile configuration memory.
Base ethernet MAC Address: 70:CA:9B:07:86:B8
Part Number : 73-10256-07
PCA Assembly Number : 800-26918-06
PCA Revision Number : A0
PCB Serial Number : FOC15402NP4
Top Assembly Part Number : 800-29152-03
Top Assembly Serial Number : FCZ1545812F
Top Revision Number : A0
Product/Model Number : AIR-LAP1242AG-E-K9
Configuration register is 0xF
AP#dir
Directory of flash:/
2 -rwx 89311 Jan 18 2014 20:41:00 +00:00 event.log
3 drwx 64 Jan 18 2014 20:43:21 +00:00 update
5 drwx 256 Jan 18 2014 20:40:55 +00:00 c1240-k9w8-mx.124-23c.JA7
4 -rwx 6168 Nov 2 2011 23:32:18 +00:00 private-multiple-fs
7 -rwx 395 Mar 1 2002 00:00:05 +00:00 env_vars
15740928 bytes total (8772096 bytes free)
AP#dir
Directory of flash:/c1240-k9w8-mx.124-23c.JA7/
9 -rwx 131328 Jan 18 2014 20:39:46 +00:00 7101.img
10 -rwx 292 Jan 18 2014 20:39:46 +00:00 info
11 -rwx 4642714 Jan 18 2014 20:40:55 +00:00 c1240-k9w8-mx.124-23c.JA7
15 -rwx 131328 Jan 18 2014 20:40:56 +00:00 6701.img
#sh logging --> see attached file
CONTROLLER (unfortunately after downgrading it again):
(Cisco Controller) >show sysinfo
Manufacturer's Name.............................. Cisco Systems Inc.
Product Name..................................... Cisco Controller
Product Version.................................. 7.0.240.0
Bootloader Version............................... 1.0.16
Field Recovery Image Version..................... 7.0.112.21
Firmware Version................................. FPGA 1.7, Env 1.8, USB console 2.2
Build Type....................................... DATA + WPS
System ObjectID.................................. 1.3.6.1.4.1.9.1.1069
IP Address....................................... WLC-IP
Last Reset....................................... Software reset
System Up Time................................... 0 days 0 hrs 26 mins 3 secs
System Timezone Location......................... (GMT +1:00) Amsterdam, Berlin, Rome, Vienna Current Boot
License Level....................... base
Current Boot License Type........................ Permanent
Next Boot License Level.......................... base
Next Boot License Type........................... Permanent
Configured Country............................... DE - Germany
State of 802.11b Network......................... Enabled
State of 802.11a Network......................... Enabled
Number of WLANs.................................. 2
Number of Active Clients......................... 5
Burned-in MAC Address............................ 1C:DF:0F:C6:D8:80
Power Supply 1................................... Present, OK
Power Supply 2................................... Absent
Maximum number of APs supported.................. 150
(Cisco Controller) >show boot
Primary Boot Image............................... 7.4.121.0
Backup Boot Image................................ 7.0.240.0 (default) (active)
(Cisco Controller) >show ap bundle primary
Primary AP Image Size
ap1g2 9576
ap3g1 6684
ap3g2 11208
ap801 5192
ap802 5232
c1100 3096
c1130 4972
c1140 4992
c1200 3364
c1240 4812
c1250 5512
c1310 3136
c1520 6412
c3201 4324
c602i 3716
(Cisco Controller) >show ap bundle secondary
Secondary AP Image Size
ap3g1 6684
ap801 5192
ap802 5232
c1100 3096
c1130 4972
c1140 4992
c1200 3364
c1240 4812
c1250 5512
c1310 3136
c1520 6412
c3201 4324
c602i 3716
Nachricht geändert durch Manuel SporlederHi Scott,
I am not trying to pre-download it anymore, since this doesn't work at all.
If I just restart the controller, the APs are downloading the image telling me "everything is fine", are rebooted and that stated with the old image again.
This is what you can see in the attached log-file:
*Mar 1 00:00:05.873: soap_prepare_new_image_crash: mini ios flash:/c1240-rcvk9w8-mx/c1240-rcvk9w8-mx
*Mar 1 00:00:06.242: %SOAP_FIPS-2-SELF_TEST_IOS_SUCCESS: IOS crypto FIPS self test passed
*Mar 1 00:00:07.662: %SOAP_FIPS-2-SELF_TEST_RAD_SUCCESS: RADIO crypto FIPS self test passed on interface Dot11Radio 0
*Mar 1 00:00:09.054: %SOAP_FIPS-2-SELF_TEST_RAD_SUCCESS: RADIO crypto FIPS self test passed on interface Dot11Radio 1
*Mar 1 00:00:09.152: %LWAPP-3-CLIENTEVENTLOG: Read and initialized AP event log (contains, 1024 messages)
*Mar 1 00:00:09.181: status of voice_diag_test from WLC is false
*Mar 1 00:00:11.381: %LINK-3-UPDOWN: Interface FastEthernet0, changed state to up
*Mar 1 00:00:11.440: %SYS-5-RESTART: System restarted
*Mar 1 00:00:11.441: %SNMP-5-COLDSTART: SNMP agent on host AP is undergoing a cold start
*Nov 2 23:31:59.107: %LINK-5-CHANGED: Interface Dot11Radio1, changed state to reset
*Nov 2 23:31:59.108: %LINK-5-CHANGED: Interface Dot11Radio0, changed state to reset
*Nov 2 23:31:59.929: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0, changed state to up
*Nov 2 23:32:00.107: %LINEPROTO-5-UPDOWN: Line protocol on Interface Dot11Radio1, changed state to down
*Nov 2 23:32:00.107: %LINEPROTO-5-UPDOWN: Line protocol on Interface Dot11Radio0, changed state to down
*Nov 2 23:32:18.102: %CAPWAP-5-CHANGED: CAPWAP changed state to DISCOVERY
*Nov 2 23:32:18.163: bsnUnlockDevice: not bring radio up: radio 1 is in admin disable state
*Nov 2 23:32:18.345: %SSH-5-ENABLED: SSH 2.0 has been enabled
*Nov 2 23:32:18.759: status of voice_diag_test from WLC is false
*Nov 2 23:32:18.847: Logging LWAPP message to 255.255.255.255.
*Nov 2 23:32:33.181: %CDP_PD-4-POWER_OK: Full power - NEGOTIATED inline power source
*Nov 2 23:32:33.247: %LINK-3-UPDOWN: Interface Dot11Radio0, changed state to up
*Nov 2 23:32:34.212: %LINEPROTO-5-UPDOWN: Line protocol on Interface Dot11Radio0, changed state to up
*Nov 2 23:32:34.213: %SYS-6-LOGGINGHOST_STARTSTOP: Logging to host 255.255.255.255 started - CLI initiated
*Jan 20 20:32:44.000: %CAPWAP-5-DTLSREQSEND: DTLS connection request sent peer_ip: WLC-1-IP peer_port: 5246
*Jan 20 20:32:44.001: %CAPWAP-5-CHANGED: CAPWAP changed state to
*Jan 20 20:32:45.479: %CAPWAP-5-DTLSREQSUCC: DTLS connection created sucessfully peer_ip: WLC-1-IP peer_port: 5246
*Jan 20 20:32:45.480: %CAPWAP-5-SENDJOIN: sending Join Request to WLC-1-IP
*Jan 20 20:32:45.481: %CAPWAP-5-CHANGED: CAPWAP changed state to JOIN
*Jan 20 20:32:45.483: %CAPWAP-3-ERRORLOG: Invalid event 10 & state 5 combination.
*Jan 20 20:32:45.483: %CAPWAP-3-ERRORLOG: CAPWAP SM handler: Failed to process message type 10 state 5.
*Jan 20 20:32:45.483: %CAPWAP-3-ERRORLOG: Failed to handle capwap control message from controller
*Jan 20 20:32:45.484: %CAPWAP-3-ERRORLOG: Failed to process encrypted capwap packet from WLC-1-IPperform archive download capwap:/c1240 tar file
*Jan 20 20:32:45.494: %CAPWAP-5-AP_IMG_DWNLD: Required image not found on AP. Downloading image from Controller.
*Jan 20 20:32:45.499: %CAPWAP-5-CHANGED: CAPWAP changed state to IMAGE
*Jan 20 20:33:58.755: %DTLS-3-BAD_RECORD: Erroneous record received from WLC-1-IP: Duplicate (replayed) record
*Jan 20 20:33:59.315: image upgrade successfully, system is now reloading
This happens again and again and again...
Regards, Manuel -
1142 Kept on Downloading Image from WLC CT2504
Dear All,
i'm a newbie of cisco wireless product, this my first time use.
on the WLC i've set DHCP address pool, everything seems fine after ap download image -> reboot -> hit "Enter" to start blar blar blar... however, after a few second the WLC will initial upgrade image again and again. it's like a non-stop process.
can anyone advise me where to start? attached is the start up message, as you can see, i captured it after the ap successfully boot up, and WLC initial another cycle of image upgrade.
btw, my network is flat, WLC & AP all in the same network.
Thanks & Regards
Eric
*Nov 3 06:28:30.788: %CAPWAP-5-CHANGED: CAPWAP changed state to JOIN
examining image...!
extracting info (292 bytes)
Image info:
Version Suffix: k9w8-.124-23c.JA3
Image Name: c1140-k9w8-mx.124-23c.JA3
Version Directory: c1140-k9w8-mx.124-23c.JA3
Ios Image Size: 4905472
Total Image Size: 5100032
Image Feature: WIRELESS LAN|LWAPP
Image Family: C1140
Wireless Switch Management Version: 7.0.220.0
Extracting files...
c1140-k9w8-mx.124-23c.JA3/ (directory) 0 (bytes)
c1140-k9w8-mx.124-23c.JA3/html/ (directory) 0 (bytes)
c1140-k9w8-mx.124-23c.JA3/html/level/ (directory) 0 (bytes)
c1140-k9w8-mx.124-23
*Nov 3 06:28:35.788: %CAPWAP-5-SENDJOIN: sending Join Request to 192.168.1.88perform archive download capwap:/c1140 tar file
*Nov 3 06:28:35.803: %CAPWAP-5-AP_IMG_DWNLD: Required image not found on AP. Downloading image from Controller.
*Nov 3 06:28:35.809: %CAPWAP-5-CHANGED: CAPWAP changed state to IMAGEc.JA3/html/level/1/ (directory) 0 (bytes)
extracting c1140-k9w8-mx.124-23c.JA3/html/level/1/forms.js (17486 bytes)!
extracting c1140-k9w8-mx.124-23c.JA3/html/level/1/sitewide.js (16548 bytes)!
extracting c1140-k9w8-mx.124-23c.JA3/html/level/1/officeExtendap.css (41795 bytes)!!!
*Nov 3 06:28:35.809: Loading file /c1140...
extracting c1140-k9w8-mx.124-23c.JA3/c1140-k9w8-mx.124-23c.JA3 (4721403 bytes)!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
extracting c1140-k9w8-mx.124-23c.JA3/info (292 bytes)
extracting info.ver (292 bytes)!
Deleting target version: flash:/c1140-k9w8-mx.124-23c.JA3...done.
New software image installed in flash:/c1140-k9w8-mx.124-23c.JA3
Configuring system to use new image...done.
archive download: takes 107 seconds
Writing out the event log to nvram...
*Nov 3 06:30:22.083: %DTLS-3-BAD_RECORD: Erroneous record received from 192.168.1.88: Duplicate (replayed) record
*Nov 3 06:30:22.987: image upgrade successfully, system is now reloading
*Nov 3 06:30:23.043: %SYS-5-RELOAD: Reload requested by capwap image download proc. Reload Reason: NEW IMAGE DOWNLOAD.
*Nov 3 06:30:23.046: %LWAPP-5-CHANGED: CAPWAP changed state to DOWN
using eeprom values
WRDTR,CLKTR: 0x83000800 0x40000000
RQDC ,RFDC : 0x80000034 0x00000207
using ÿÿÿÿ ddr static values from serial eeprom
ddr init done
Running Normal Memtest...
Passed.
IOS Bootloader - Starting system.
FLASH CHIP: Numonyx P33
Checking for Over Erased blocks
Xmodem file system is available.
DDR values used from system serial eeprom.
WRDTR,CLKTR: 0x83000800, 0x40000000
RQDC, RFDC : 0x80000034, 0x00000207
PCIE0: link is up.
PCIE0: VC0 is active
PCIE1: link is up.
PCIE1: VC0 is active
PCIEx: initialization done
extracting c1140-k9w8-mx.124-23c.JA3/html/level/1/appsui.js (557 bytes)
extracting c1140-k9w8-mx.124-23c.JA3/html/level/1/config.js (24633 bytes)!!
extracting c1140-k9w8-mx.124-23c.JA3/html/level/1/ap_home.shtml.gz (1300 bytes)
extracting c1140-k9w8-mx.124-23c.JA3/html/level/1/back.shtml (506 bytes)
c1140-k9w8-mx.124-23c.JA3/html/level/1/images/ (directory) 0 (bytes)
extracting c1140-k9w8-mx.124-23c.JA3/html/level/1/images/cisco-logo-2007.gif (1648 bytes)
extracting c1140-k9w8-mx.124-23c.JA3/html/level/1/images/background_web41.jpg (732 bytes)
extracting c1140-k9w8-mx.124-23c.JA3/html/level/1/images/login_homeap.gif (19671 bytes)!!
extracting c1140-k9w8-mx.124-23c.JA3/html/level/1/images/info.gif (399 bytes)
c1140-k9w8-mx.124-23c.JA3/html/level/15/ (directory) 0 (bytes)
extracting c1140-k9w8-mx.124-23c.JA3/html/level/15/officeExtendapBanner.htm (7108 bytes)!
extracting c1140-k9w8-mx.124-23c.JA3/html/level/15/officeExtendapHelp.htm (5007 bytes)
extracting c1140-k9w8-mx.124-23c.JA3/html/level/15/officeExtendapEvent.shtml.gz (983 bytes)
extracting c1140-k9w8-mx.124-23c.JA3/html/level/15/officeExtendapConfig.shtml.gz (2861 bytes)
extracting c1140-k9w8-mx.124-23c.JA3/html/level/15/officeExtendapMain.shtml.gz (3361 bytes)!
extracting c1140-k9w8-mx.124-23c.JA3/html/level/15/officeExtendapSummary.htm (712 bytes)
extracting c1140-k9w8-mx.124-23c.JA3/T2.bin (8080 bytes)
extracting c1140-k9w8-mx.124-23c.JA3/8001.img (174880 bytes)!!!!!!!!!!!!!!
extracting c1140-k9w8-mx.124-23c.JA3/T5.bin (23836 bytes)
extracting c1140-k9w8-mx.124-23c.JA3/info (292 bytes)
extracting info.ver (292 bytes)!
Deleting target version: flash:/c1140-k9w8-mx.124-23c.JA3...done.
New software image installed in flash:/c1140-k9w8-mx.124-23c.JA3
Configuring system to use new image...done.
archive download: takes 107 seconds
PCIE0: link is up.
PCIE0: VC0 is active
PCIE1: link is up.
PCIE1: VC0 is active
PCIEx: initialization done
flashfs[0]: 28 files, 8 directories
flashfs[0]: 0 orphaned files, 0 orphaned directories
flashfs[0]: Total bytes: 32385024
flashfs[0]: Bytes used: 7451136
flashfs[0]: Bytes available: 24933888
flashfs[0]: flashfs fsck took 21 seconds.
Reading cookie from system serial eeprom...Done
Base Ethernet MAC address: 60:73:5c:31:b0:dc
Ethernet speed is 100 Mb - FULL duplex
Loading "flash:/c1140-k9w8-mx.124-23c.JA3/c1140-k9w8-mx.124-23c.JA3"...############################################################################################################################################################################################################################################################################################################################################################################################################################################################
File "flash:/c1140-k9w8-mx.124-23c.JA3/c1140-k9w8-mx.124-23c.JA3" uncompressed and installed, entry point: 0x4000
executing...
enet halted
Restricted Rights Legend
Use, duplication, or disclosure by the Government is
subject to restrictions as set forth in subparagraph
(c) of the Commercial Computer Software - Restricted
Rights clause at FAR sec. 52.227-19 and subparagraph
(c) (1) (ii) of the Rights in Technical Data and Computer
Software clause at DFARS sec. 252.227-7013.
cisco Systems, Inc.
170 West Tasman Drive
San Jose, California 95134-1706
Cisco IOS Software, C1140 Software (C1140-K9W8-M), Version 12.4(23c)JA3, RELEASE SOFTWARE (fc1)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2011 by Cisco Systems, Inc.
Compiled Tue 18-Oct-11 14:52 by prod_rel_team
Proceeding with system init
Proceeding to unmask interrupts
Initializing flashfs...
FLASH CHIP: Numonyx P33
Checking for Over Erased blocks
flashfs[1]: 28 files, 8 directories
flashfs[1]: 0 orphaned files, 0 orphaned directories
flashfs[1]: Total bytes: 32126976
flashfs[1]: Bytes used: 7451136
flashfs[1]: Bytes available: 24675840
flashfs[1]: flashfs fsck took 5 seconds.
flashfs[1]: Initialization complete.
flashfs[2]: 0 files, 1 directories
flashfs[2]: 0 orphaned files, 0 orphaned directories
flashfs[2]: Total bytes: 11999232
flashfs[2]: Bytes used: 1024
flashfs[2]: Bytes available: 11998208
flashfs[2]: flashfs fsck took 1 seconds.
flashfs[2]: Initialization complete....done Initializing flashfs.
Ethernet speed is 100 Mb - FULL duplex
Radio0 present 8363 8000 90020000 0 90030000 B
Radio1 present 8363 8000 98020000 0 98030000 0
This product contains cryptographic features and is subject to United
States and local country laws governing import, export, transfer and
use. Delivery of Cisco cryptographic products does not imply
third-party authority to import, export, distribute or use encryption.
Importers, exporters, distributors and users are responsible for
compliance with U.S. and local country laws. By using this product you
agree to comply with applicable laws and regulations. If you are unable
to comply with U.S. and local laws, return this product immediately.
A summary of U.S. laws governing Cisco cryptographic products may be found at:
http://www.cisco.com/wwl/export/crypto/tool/stqrg.html
If you require further assistance please contact us by sending email to
[email protected].
cisco AIR-LAP1142N-C-K9 (PowerPC405ex) processor (revision A0) with 98294K/32768K bytes of memory.
Processor board ID FGL1632S622
PowerPC405ex CPU at 586Mhz, revision number 0x147E
Last reset from reload
LWAPP image version 7.0.220.0
1 Gigabit Ethernet interface
2 802.11 Radio(s)
32K bytes of flash-simulated non-volatile configuration memory.
Base ethernet MAC Address: 60:73:5C:31:B0:DC
Part Number : 73-12836-05
PCA Assembly Number : 800-33767-05
PCA Revision Number : A0
PCB Serial Number : FOC16301SFC
Top Assembly Part Number : 800-33775-04
Top Assembly Serial Number : FGL1632S622
Top Revision Number : A0
Product/Model Number : AIR-LAP1142N-C-K9
% Please define a domain-name first.
Translating "CISCO-CAPWAP-CONTROLLER"...domain server (255.255.255.255)
Press RETURN to get started!
*Mar 1 00:00:07.703: %SOAP_FIPS-2-SELF_TEST_IOS_SUCCESS: IOS crypto FIPS self test passed
*Mar 1 00:00:07.714: *** CRASH_LOG = YES
Security Core found.
Base Ethernet MAC address: 60:73:5C:31:B0:DC
*Mar 1 00:00:09.283: %SOAP_FIPS-2-SELF_TEST_RAD_SUCCESS: RADIO crypto FIPS self test passed on interface Dot11Radio 0
*Mar 1 00:00:09.855: %SOAP_FIPS-2-SELF_TEST_RAD_SUCCESS: RADIO crypto FIPS self test passed on interface Dot11Radio 1
*Mar 1 00:00:09.903: %LWAPP-3-CLIENTEVENTLOG: Read and initialized AP event log (contains, 1024 messages)
*Mar 1 00:00:09.926: status of voice_diag_test from WLC is false
*Mar 1 00:00:10.970: %LINK-3-UPDOWN: Interface GigabitEthernet0, changed state to up
*Mar 1 00:00:12.046: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0, changed state to up
*Mar 1 00:00:12.084: %SYS-5-RESTART: System restarted --
Cisco IOS Software, C1140 Software (C1140-K9W8-M), Version 12.4(23c)JA3, RELEASE SOFTWARE (fc1)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2011 by Cisco Systems, Inc.
Compiled Tue 18-Oct-11 14:52 by prod_rel_team
*Mar 1 00:00:12.085: %SNMP-5-COLDSTART: SNMP agent on host AP6073.5c31.b0dc is undergoing a cold start
*Mar 1 00:10:23.055: %LINK-5-CHANGED: Interface Dot11Radio1, changed state to reset
*Mar 1 00:10:23.055: %LINK-5-CHANGED: Interface Dot11Radio0, changed state to reset
*Mar 1 00:10:24.055: %LINEPROTO-5-UPDOWN: Line protocol on Interface Dot11Radio1, changed state to down
*Mar 1 00:10:24.055: %LINEPROTO-5-UPDOWN: Line protocol on Interface Dot11Radio0, changed state to down
*Mar 1 00:10:32.053: %CAPWAP-5-CHANGED: CAPWAP changed state to DISCOVERY
*Mar 1 00:10:33.293: %SSH-5-ENABLED: SSH 2.0 has been enabled
*Mar 1 00:10:41.916: status of voice_diag_test from WLC is false
*Mar 1 00:10:41.973: Logging LWAPP message to 255.255.255.255.Dear Leolaohoo, i've performed the command, after reboot it'll join the controller and then the downloading process keep on repeating again. here's the output after i perform the command.
AP6073.5c31.b0dc#de
AP6073.5c31.b0dc#del
AP6073.5c31.b0dc#delete /f /r fl
AP6073.5c31.b0dc#delete /f /r flash:/c1
AP6073.5c31.b0dc#delete /f /r flash:/c1140-k
AP6073.5c31.b0dc#delete /f /r flash:/c1140-k9w8-mx.124-23c.JA3
AP6073.5c31.b0dc#clear capwap pri
AP6073.5c31.b0dc#clear capwap private?
private-config
AP6073.5c31.b0dc#clear capwap private
AP6073.5c31.b0dc#clear capwap private-config
AP6073.5c31.b0dc#reload
Proceed with reload? [confirm]
Writing out the event log to nvram...
*Mar 1 00:12:29.460: %SYS-5-RELOAD: Reload requested by Cisco on console. Reload Reason: Reload Command.
*Mar 1 00:12:29.463: %LWAPP-5-CHANGED: CAPWAP changed state to DOWN
using eeprom values
WRDTR,CLKTR: 0x83000800 0x40000000
RQDC ,RFDC : 0x80000034 0x00000207
using ÿÿÿÿ ddr static values from serial eeprom
ddr init done
Running Normal Memtest...
Passed.
IOS Bootloader - Starting system.
FLASH CHIP: Numonyx P33
Checking for Over Erased blocks
Xmodem file system is available.
DDR values used from system serial eeprom.
WRDTR,CLKTR: 0x83000800, 0x40000000
RQDC, RFDC : 0x80000034, 0x00000207
PCIE0: link is up.
PCIE0: VC0 is active
PCIE1: link is up.
PCIE1: VC0 is active
PCIEx: initialization done
flashfs[0]: 6 files, 2 directories
flashfs[0]: 0 orphaned files, 0 orphaned directories
flashfs[0]: Total bytes: 32385024
flashfs[0]: Bytes used: 2365440
flashfs[0]: Bytes available: 30019584
flashfs[0]: flashfs fsck took 19 seconds.
Reading cookie from system serial eeprom...Done
Base Ethernet MAC address: 60:73:5c:31:b0:dc
Ethernet speed is 100 Mb - FULL duplex
Loading "flash:/c1140-k9w8-mx.124-23c.JA3/c1140-k9w8-mx.124-23c.JA3"...flash:/c1140-k9w8-mx.124-23c.JA3/c1140-k9w8-mx.124-23c.JA3: no such file or directory
Error loading "flash:/c1140-k9w8-mx.124-23c.JA3/c1140-k9w8-mx.124-23c.JA3"
Interrupt within 5 seconds to abort boot process.
Loading "flash:/c1140-rcvk9w8-mx/c1140-rcvk9w8-mx"...#######################################################################################################################################################################################################################
File "flash:/c1140-rcvk9w8-mx/c1140-rcvk9w8-mx" uncompressed and installed, entry point: 0x4000
executing...
enet halted
Restricted Rights Legend
Use, duplication, or disclosure by the Government is
subject to restrictions as set forth in subparagraph
(c) of the Commercial Computer Software - Restricted
Rights clause at FAR sec. 52.227-19 and subparagraph
(c) (1) (ii) of the Rights in Technical Data and Computer
Software clause at DFARS sec. 252.227-7013.
cisco Systems, Inc.
170 West Tasman Drive
San Jose, California 95134-1706
Cisco IOS Software, C1140 Software (C1140-RCVK9W8-M), Version 12.4(21a)JA, RELEASE SOFTWARE (fc1)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2009 by Cisco Systems, Inc.
Compiled Mon 08-Jun-09 16:28 by prod_rel_team
Proceeding with system init
Proceeding to unmask interrupts
Initializing flashfs...
flashfs[1]: 6 files, 2 directories
flashfs[1]: 0 orphaned files, 0 orphaned directories
flashfs[1]: Total bytes: 32385024
flashfs[1]: Bytes used: 2365440
flashfs[1]: Bytes available: 30019584
flashfs[1]: flashfs fsck took 4 seconds.
flashfs[1]: Initialization complete....done Initializing flashfs.
Ethernet speed is 100 Mb - FULL duplex
This product contains cryptographic features and is subject to United
States and local country laws governing import, export, transfer and
use. Delivery of Cisco cryptographic products does not imply
third-party authority to import, export, distribute or use encryption.
Importers, exporters, distributors and users are responsible for
compliance with U.S. and local country laws. By using this product you
agree to comply with applicable laws and regulations. If you are unable
to comply with U.S. and local laws, return this product immediately.
A summary of U.S. laws governing Cisco cryptographic products may be found at:
http://www.cisco.com/wwl/export/crypto/tool/stqrg.html
If you require further assistance please contact us by sending email to
[email protected].
cisco AIR-LAP1142N-C-K9 (PowerPC405ex) processor (revision A0) with 98294K/32768K bytes of memory.
Processor board ID FGL1632S622
PowerPC405ex CPU at 586Mhz, revision number 0x147E
Last reset from reload
LWAPP image version 3.0.51.0
1 Gigabit Ethernet interface
32K bytes of flash-simulated non-volatile configuration memory.
Base ethernet MAC Address: 60:73:5C:31:B0:DC
Part Number : 73-12836-05
PCA Assembly Number : 800-33767-05
PCA Revision Number : A0
PCB Serial Number : FOC16301SFC
Top Assembly Part Number : 800-33775-04
Top Assembly Serial Number : FGL1632S622
Top Revision Number : A0
Product/Model Number : AIR-LAP1142N-C-K9
% Please define a domain-name first.
Translating "CISCO-LWAPP-CONTROLLER"...domain server (255.255.255.255)
Press RETURN to get started!
*Mar 1 00:00:05.915: *** CRASH_LOG = YES
Base Ethernet MAC address: 60:73:5C:31:B0:DC
*Mar 1 00:00:06.121: %LWAPP-3-CLIENTEVENTLOG: Read and initialized AP event log (contains, 1024 messages)
*Mar 1 00:00:08.167: %LINK-3-UPDOWN: Interface GigabitEthernet0, changed state to up
*Mar 1 00:00:08.184: %SYS-5-RESTART: System restarted --
Cisco IOS Software, C1140 Software (C1140-RCVK9W8-M), Version 12.4(21a)JA, RELEASE SOFTWARE (fc1)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2009 by Cisco Systems, Inc.
Compiled Mon 08-Jun-09 16:28 by prod_rel_team
*Mar 1 00:10:23.981: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0, changed state to up
Translating "CISCO-CAPWAP-CONTROLLER"...domain server (255.255.255.255)
*Mar 1 00:10:32.016: %CAPWAP-3-ERRORLOG: Could Not resolve CISCO-LWAPP-CONTROLLER
Translating "CISCO-LWAPP-CONTROLLER"...domain server (255.255.255.255)
*Mar 1 00:10:41.016: %CAPWAP-3-ERRORLOG: Could Not resolve CISCO-CAPWAP-CONTROLLER
*Mar 1 00:10:41.017: %CAPWAP-5-CHANGED: CAPWAP changed state to DISCOVERY
Translating "CISCO-CAPWAP-CONTROLLER"...domain server (255.255.255.255)
*Mar 1 00:10:50.964: %CAPWAP-3-ERRORLOG: Could Not resolve CISCO-LWAPP-CONTROLLER
*Mar 1 00:10:54.600: %CDP_PD-2-POWER_LOW: All radios disabled - NEGOTIATED WS-C2960-24PC-L (34bd.c8f6.5681)
*Mar 1 00:10:59.964: %CAPWAP-3-ERRORLOG: Could Not resolve CISCO-CAPWAP-CONTROLLER
Translating "CISCO-LWAPP-CONTROLLER"...domain server (255.255.255.255)
Translating "CISCO-CAPWAP-CONTROLLER"...domain server (255.255.255.255)
*Mar 1 00:11:18.965: %CAPWAP-3-ERRORLOG: Could Not resolve CISCO-LWAPP-CONTROLLER -
How to remove AP object from WLC 8500 ? I had dismantle one AP so it is now no longer associated with WLC, I want to remove AP info from WLC. But unable to find any command for the same.
Hi Scott,
Thanks for your answer.. But it's not fulfill my question. I want to remove some of AP entries which is not currently associated with WLC.
Below are steps which I understood when new AP joins to controller in my case.
1) We are configuring AP with static IP and capwap protocol thru console login of AP.
2) We are connecting AP to WLC thru netwok.
3) When A joins to controller, It will be visible at Monitor section > Access Point Summary
4) It will start from AP.macaddress
5) Now remotely we are applying AP name, HIgh availability and assign to appropriate AP group.
Now My query is when AP joins to controller, somewhere there should be entry in database that this mac address of AP is joined to controller along with AP configuration.
I want to delete some of AP databases which are disassociates from controller due to media failure between AP and WLC/AP no longer available.
Is there any command to remove AP entries from Controller ? or any other procedure ?
Devang -
1142 AP disassociate from WISM code 7.0.116.0
We see different 1142 APs disassociate from wisms from time to time. When it happens, we have to do shutdown and no shutdown on the switch port to bring the APs back. It just starts to happen after we upgraded wisms to code 7.0.116.0 and it only happens to c1142 APs. It does not happen very often (about 2 issues each week). Anyone see this issue as well?
ZhenningAny ideas why we need to upgrade the bootstrap?
There are some issues with the 1140. This is why it's only this model that a boostrap is an optional install (autonomous or capwap use). I'd recommend, if you have the time, to do so.
Unfortunately, I have no idea how you "force" the bootstrap upgrade if you have CAPWAP/LWAP. The only way I can think of is downgrade to autonomous, upgrade the boostrap and convert to CAPWAP/LWAP. Long process. -
When I first got my phone it worked perfectly fine with the wifi. Although later on I began to have problems connecting it. It will randomly disconnect from the wifi and when I try to retype the password it tells me it is wrong, although it is right. It will eventually work but in its own time, a message will pop up and allow me to type in the password and it will work. But sometimes it takes an hour or more and sometime it takes 10 minutes. I've seen where other people have had this problem but I don't know how to fix it. I'm not sure if it's an issue with my phone or if it's with my wifi. Does anyone know how to fix this?
Does this happen with all Wi-Fi hotspots? A specific one?
Have you tried forgetting the Wi-Fi connection and then reconnecting to it?
What about power cycling the Wi-Fi router? -
Reading a Random Line from a Text File
Hello,
I have a program that reads from a text file words. I currently have a text file around 800KB of words. The problem is, if I try to load this into an arraylist so I can use it in my application, it takes wayy long to load. I was wondering if there was a way to just read a random line from the text file.
Here is my code, and the text file that the program reads from is called 'wordFile'
import java.awt.*;
import java.awt.geom.*;
import javax.swing.*;
import java.awt.event.*;
import java.io.*;
import java.util.*;
public class WordColor extends JFrame{
public WordColor(){
super("WordColor");
setSize(1000,500);
setVisible(true);
add(new WordPanel());
public static void main(String[]r){
JFrame f = new WordColor();
class WordPanel extends JPanel implements KeyListener{
private Graphics2D pane;
private Image img;
private char[]characterList;
private CharacterPosition[]positions;
private int charcounter = 0;
private String initialWord;
private File wordFile = new File("C:\\Documents and Settings\\My Documents\\Java\\projects\\WordColorWords.txt");
private FontMetrics fm;
private javax.swing.Timer timer;
public final static int START = 20;
public final static int delay = 10;
public final static int BOTTOMLINE = 375;
public final static int buffer = 15;
public final static int distance = 4;
public final static Color[] colors = new Color[]{Color.red,Color.blue,Color.green,Color.yellow,Color.cyan,
Color.magenta,Color.orange,Color.pink};
public static String[] words;
public static int descent;
public static int YAXIS = 75;
public static int SIZE = 72;
public WordPanel(){
words = readWords();
setLayout(new BorderLayout());
initialWord = getWord();
characterList = new char[initialWord.length()];
for (int i=0; i<initialWord.length();i++){
characterList[i] = initialWord.charAt(i);
setFocusable(true);
addKeyListener(this);
timer = new javax.swing.Timer(delay,new ActionListener(){
public void actionPerformed(ActionEvent evt){
YAXIS += 1;
drawWords();
if (YAXIS + descent - buffer >= BOTTOMLINE) lose();
if (allColorsOn()) win();
public void paintComponent(Graphics g){
super.paintComponent(g);
if (img == null){
img = createImage(getWidth(),getHeight());
pane = (Graphics2D)img.getGraphics();
pane.setColor(Color.white);
pane.fillRect(0,0,getWidth(),getHeight());
pane.setFont(new Font("Arial",Font.BOLD,SIZE));
pane.setColor(Color.black);
drawThickLine(pane,getWidth(),5);
fm = g.getFontMetrics(new Font("Arial",Font.BOLD,SIZE));
descent = fm.getDescent();
distributePositions();
drawWords();
timer.start();
g.drawImage(img,0,0,this);
private void distributePositions(){
int xaxis = START;
positions = new CharacterPosition[characterList.length];
int counter = 0;
for (char c: characterList){
CharacterPosition cp = new CharacterPosition(c,xaxis, Color.black);
positions[counter] = cp;
counter++;
xaxis += fm.charWidth(c)+distance;
private void drawThickLine(Graphics2D pane, int width, int thickness){
pane.setColor(Color.black);
for (int j = BOTTOMLINE;j<BOTTOMLINE+1+thickness;j++){
pane.drawLine(0,j,width,j);
private void drawWords(){
pane.setColor(Color.white);
pane.fillRect(0,0,getWidth(),getHeight());
drawThickLine(pane,getWidth(),5);
for (CharacterPosition cp: positions){
int x = cp.getX();
char print = cp.getChar();
pane.setColor(cp.getColor());
pane.drawString(""+print,x,YAXIS);
repaint();
private boolean allColorsOn(){
for (CharacterPosition cp: positions){
if (cp.getColor() == Color.black) return false;
return true;
private Color randomColor(){
int rand = (int)(Math.random()*colors.length);
return colors[rand];
private void restart(){
charcounter = 0;
for (CharacterPosition cp: positions){
cp.setColor(Color.black);
private void win(){
timer.stop();
newWord();
private void newWord(){
pane.setColor(Color.white);
pane.fillRect(0,0,getWidth(),getHeight());
repaint();
drawThickLine(pane,getWidth(),5);
YAXIS = 75;
initialWord = getWord();
characterList = new char[initialWord.length()];
for (int i=0; i<initialWord.length();i++){
characterList[i] = initialWord.charAt(i);
distributePositions();
charcounter = 0;
drawWords();
timer.start();
private void lose(){
timer.stop();
pane.setColor(Color.white);
pane.fillRect(0,0,getWidth(),getHeight());
pane.setColor(Color.red);
pane.drawString("Sorry, You Lose!",50,150);
repaint();
removeKeyListener(this);
final JPanel p1 = new JPanel();
JButton again = new JButton("Play Again?");
p1.add(again);
add(p1,"South");
p1.setBackground(Color.white);
validate();
again.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent evt){
remove(p1);
addKeyListener(WordPanel.this);
newWord();
private String getWord(){
int rand = (int)(Math.random()*words.length);
return words[rand];
private String[] readWords(){
ArrayList<String> arr = new ArrayList<String>();
try{
BufferedReader buff = new BufferedReader(new FileReader(wordFile));
try{
String line = null;
while (( line = buff.readLine()) != null){
line = line.toUpperCase();
arr.add(line);
finally{
buff.close();
catch(Exception e){e.printStackTrace();}
Object[] objects = arr.toArray();
String[] words = new String[objects.length];
int count = 0;
for (Object o: objects){
words[count] = (String)o;
count++;
return words;
public void keyPressed(KeyEvent evt){
char tempchar = evt.getKeyChar();
String character = ""+tempchar;
if (character.equalsIgnoreCase(""+positions[charcounter].getChar())){
positions[charcounter].setColor(randomColor());
charcounter++;
else if (evt.isShiftDown()){
evt.consume();
else{
restart();
drawWords();
public void keyTyped(KeyEvent evt){}
public void keyReleased(KeyEvent evt){}
class CharacterPosition{
private int xaxis;
private char character;
private Color color;
public CharacterPosition(char c, int x, Color col){
xaxis = x;
character = c;
color = col;
public int getX(){
return xaxis;
public char getChar(){
return character;
public Color getColor(){
return color;
public void setColor(Color c){
color = c;
}I thought that maybe serializing the ArrayList might be faster than creating the ArrayList by iterating over each line in the text file. But alas, I was wrong. Here's my code anyway:
class WordList extends ArrayList<String>{
long updated;
WordList readWordList(File file) throws Exception{
WordList list = new WordList();
BufferedReader in = new BufferedReader(new FileReader(file));
String line = null;
while ((line = in.readLine()) != null){
list.add(line);
in.close();
list.updated = file.lastModified();
return list;
WordList wordList;
File datFile = new File("words.dat");
File txtFile = new File("input.txt");
if (datFile.exists()){
ObjectInputStream input = new ObjectInputStream(new FileInputStream(datFile));
wordList = (WordList)input.readObject();
if (wordList.updated < txtFile.lastModified()){
//if the text file has been updated, re-read it
wordList = readWordList(txtFile);
ObjectOutputStream output = new ObjectOutputStream(new FileOutputStream(datFile));
output.writeObject(wordList);
output.close();
} else {
//serialized list does not exist--create it
wordList = readWordList(txtFile);
ObjectOutputStream output = new ObjectOutputStream(new FileOutputStream(datFile));
output.writeObject(wordList);
output.close();
}The text file contained one random sequence of letters per line. For example:
hwnuu
nhpgaucah
zfbylzt
hwnc
gicgwkhStats:
Text file size: 892K
Serialized file size: 1.1MB
Time to read from text file: 795ms
Time to read from serialized file: 1216ms -
How can i get the random values from database?
Hi,
i want to get random values from database.
I try my best find no solution
plz give solution in either sql query or java method.
thanks in advance.try this:
Give a numeric row-id to each row of database.
say (1-100) for 100 rows
In the program use random function to get random number between 0 and 1. this value u multiply with 100(or total number of rows) and take integer value of it . u then perform sql query to select the a row which matches randomly genarated value with row-id assigned to each row of database
madhu -
Safari on iPad Air 2 flashes random pages from history
iPad Air 2 64GB WiFi running 8.1.3
When I open Safari, a random page from my history (usually from days or weeks ago) flashes on the screen for 1/2 second and then shows the current webpage.
I've cleared History and Website Data in Settings>Safari. Still does it. Safari even flashes pages that should have been cleared In that process!
I then restored the iPad as a new device through iTunes. Still does it.
I've had the iPad since November. It never did this until January. Hopefully the next iOS update will take care of it. Very annoying.Forgot to mention- this happens upon launching Safrari from either a "quit" state or "background" state.
-
After upgrading to yosemite my macbook pro late 2011 does a random sound from time to time.
After upgrading to yosemite my macbook pro late 2011 does a random sound from time to time. Its completely random and i already checked all apps in use and its not from them.
Sounds like Notifications app.
Maybe some other app. In SystemPreferences->Users&Groups->LoginItems tab: remove all entries with the minus sign underneath. This will not uninstall anything, you have to start those apps by hand now. Restart.
Still there?
Yes: Restart again while holding the shift key, this will start the mac in SafeMode: only the necessary items are loaded to run.
Still there?
Yes: Make an etrecheck list and post it here.
No: Restart, put the items in the LoginItems back, one by one, restart after each entry, and you will find the "culprit"
Please report accordingly. I will be back in 24 hours. -
How can you generate Multiple random numbers from 1 to 49?
I am very new at programming with the iPhone SDK and I need some help with a project I am working on. What I want to do is set up a window with 6 labels and 1 button. When the user clicks the button, the program will populate 6 randomized numbers each ranging from 1 to 49, and then place each of 6 numbers in a label. But each time the program ends and starts again the numbers cannot be the same, and also when the user clicks the button, no label can have the same number twice, so for example. If label 1 had the number 10, the other 5 labels cannot have that number until the button is clicked again. I know how to set up the interface, I just need the code. I would so greatly appreciate someone's help in this matter. I have been trying to do this for days and I cannot figure it out. Possibly someone who knows tons about Objective C programming can help me!
Thank-you so very much!!I see that you're writing a lottery number generator. Perhaps the easiest way to do it is to emulate a real lottery: fill an array (NSMutableArray, probably) with the numbers between 1 and 49, pick one at random, remove that number from the array, and repeat. (You can think of the numbers as being the balls and the array as being the machine that pops them out.)
One simple way to get the random indices needed is to extract six random bytes from Randomization Services using SecRandomCopyBytes, then loop over them, using the modulo operator (%) to select an index within the size of the array.
And no, I'm not going to write your code for you. If I was going to do that, I could package and sell the app myself. -
I’m setting up a multiple-choice question, and I want to re-arrange the position of the button sprites representing the correct answer and distractors.
I can randomly select one of the sprites via gDistractorLoc = random(4). The random function fails me after that.
Is there a means of randomly selecting one of the entries from a list, e.g. gDistractorList = [1, 2, 4] or [1, 4]?
I realize that I am perhaps complicating the process, and I'd be grateful for a simpler approach.I don't know if this is simpler or not, but here is a method for grabbing a random item from a list:
gDistractorList = [1, 2, 4]
put gDistractorList.getAt(random(gDistractorList.count))
Maybe you are looking for
-
Sparse Root Zone using loopback refuses to shutdown
New to zones, so been following along with the System Administration Guide: Solaris Containers-Resource Management and Solaris Zones doc from Sun (#817-1592). Everything seems ok with a plain jane zone, but I've run into trouble trying to use the loo
-
Hi, i have couple multistate objects/slideshows and i want them to change depending on gallery selected. But can seem to create a multistate object of all the multistates. Is there a way i can nest several multistates/slideshows to a new multistate?
-
Can anyone tell me where the default location is for the disc cache in After Effects CS6?
I recently changed the location of the disc cache in After Effects CS6 but I failed to empty the cache before changing the location and I need to delete all of the old cached files. Windows 7 Home Premium 64bit OS. Thanks in advance! Message was edit
-
Why does it take so long for numbers to open a document? It used to be so fast!
I have used numbers for years but since the new security update, just last week, I can barely open numbers on my Mac. Is it the update or my Mac?
-
HttpURLConnection Multiple Writes
I have a data acquisition appliance that requires some parameters to be set via a web page offered by the appliance. I am trying to write a java program to do this automatically so we don’t have to rely on a operator to remember to set the parameters