Multilink problem with MPLS
we are having two multilink on a router and we are using ldt between those.but we are having drops in the multilink.can anyone guide me.
shivlu
Add the folllowing Configuration on Router-1 and Router-3 Respectively:
R1 Configuration:
router bgp 1
no synchronization
bgp log-neighbor-changes
neighbor 3.3.3.3 remote-as 1
neighbor 3.3.3.3 update-source Loopback1
neigbor 33.33.33.33 remote-as 1
neighbor 33.33.33.33 update-source loopback11
no auto-summary
address-family vpnv4
neighbor 3.3.3.3 activate
neighbor 3.3.3.3 send-community extended
neigbor 33.33.33.33 activate
neigbor 33.33.33.33 send-community extended
exit-address-family
address-family ipv4 vrf os
redistribute connected
redistribute static
no auto-summary
no synchronization
exit-address-family
|
|
ip vrf os
rd 1:1
route-target export 1:1
route-target import 1:1
bgp next-hop 33.33.33.33
R3 Configuration:
router bgp 1
no synchronization
bgp log-neighbor-changes
neighbor 1.1.1.1 remote-as 1
neighbor 1.1.1.1 update-source Loopback3
neighbor 11.11.11.11 remote-as 1
neighbor 11.11.11.11 update-source Loopback33
no auto-summary
address-family vpnv4
neighbor 1.1.1.1 activate
neighbor 1.1.1.1 send-community extended
neigbor 11.11.11.11 activate
neighbor 11.11.11.11 send-community extended
exit-address-family
address-family ipv4 vrf os
redistribute connected
redistribute static
no auto-summary
no synchronization
exit-address-family
ip vrf os
rd 1:1
route-target export 1:1
route-target import 1:1
bgp next-hop 11.11.11.11
This Way, all your VPN Traffic Sourced from R5 Will transit the path of the TE tunnel to reach R4.
Regards,
Mohamed
Similar Messages
-
I have discovered that one of my routers, a 7206VXR with a PA-FE-FX "does not support user settable mtu". This seems to be causing a problem with some customers with firewalls (Path MTU Discovery isn't working on them...).
I have turned up the MTU to 1526 on all interfaces and turned the MPLS MTU setting down, but I cannot make these problems go away. Are there any workarounds for this? Are there any means at all for forcibly fragmenting packets?
As I said the router in question is a 7206VXR, NPE-300 and the interface is a PA-FE-FX, it is running IOS 12.2(10b).What I ended up doing was: connect a 7500 to a 7200 both with PA-FE-TX, and it worked. Then I plugged in a 2900XL switch in between them. This did not work. I set mtu on the two ports on the switch. I then (after tearing hair, jumping up and down, etc) rebooted the switch. The switch came back up in with the interfaces already configured for MTU 2018. This finally worked. 12.0(5.2)XU is the version that all the switches in question were running.
The other problem that I realized was that the path that was working was actually going through a 3550, not a 2900XL.
So I reloaded the switches in question that evening, and low and behold, everything was peachy, 1500 byte packets worked again. I can't really guess why this is the case, but reload + coming up configured with MTU works, configuring the MTU to be larger while running doesn't. I should also mention that these ports are actually WS-X2922-XL-V and WS-X2924-XL-V modules, not the regular ports... I know, I know.
I've heard stranger things and I'm happy to get so rest now and play with the new features MPLS provides. You guys were very helpful, particularly hritter, in pointing me toward the switches, otherwise I would have probably replaced the PA-FE with a gigabit card. -
6500 sup 720 with MPLS, GRE and FWSM problem
We have 6500 sup 720 with MPLS configured and FWSM in transparent mode. We also terminate GRE tunnels on the same 6500.
After implementing the command “mls mpls tunnel-recir” GRE tunnels are hardware switched (which we want them to be), but we don’t have any more connection from locations thru GRE tunnels to servers behind FWSM.
Does anybody have idea how to solve this problem?Hi,
not sure what you mean exactly.
the command “mls mpls tunnel-recir” is needed to avoid packets corruption in cases where the Supervisor engine is handling both the GRE header encapsulation and the MPLS label stack imposition. Since it cannot do it in one single shot (without causing random corruption) recirculation is needed. Nevertheless its presence does not influence whether the GRE traffic is handled in hardware or in software. Even without it, IF THE GRE TUNNELS ARE CORRECTLY CONFIGURED (meaning that each GRE tunnels has its unique source address etc.), the traffic is handled in hardware.
However since you say that after you enabled it you don't have connectivty anymore I suppose that some issue related to recirculation is happening (i.e. traffic ends up in the wrong internal vlan after recirculation).
Unfortunately the support forum is not meant to help in this case as in-depth troubleshooting is required. For that you need a TAC case.
regards,
Riccardo -
Still having problems with VPN access
Hello!
I am having problems with my VPN clients getting access to the networks over a MPLS infrastruture. I can reach these resources form my Core network (172.17.1.0/24) and my Wifi (172.17.100.0/24) but not from my VPN network (172.17.200.0/24). From the VPN I can reach the Wifi network (which is behind a router) and the rule that allows that also allows access to the other networks but for some reason it is not working.
When I ping inside the core network from VPN I can connect and get responses. When I ping to the Wifi network, I can get responses and connect to resources there. A tracert to the wifi network shows it hitting the core switch (a 3750 stack) @ 172.17.1.1, then the Wifi router (172.17.1.3) and then the host. A tracert to a resource on the MPLS network from the VPN shows a single entry (the destination host) and then 29 time outs but will not ping that resource nor connect.
I've posted all the info I can think of below. Any help appreciated.
*** Here is a tracert from a core network machine to the resource we need on the MPLS:
C:\Windows\system32>tracert 10.2.0.125
Tracing route to **************** [10.2.0.125]
over a maximum of 30 hops:
1 1 ms <1 ms <1 ms 172.17.1.1
2 1 ms <1 ms <1 ms 172.17.1.10
3 5 ms 5 ms 5 ms 192.168.0.13
4 31 ms 30 ms 31 ms 192.168.0.5
5 29 ms 30 ms 29 ms 192.168.0.6
6 29 ms 29 ms 29 ms 192.168.20.4
7 29 ms 29 ms 29 ms RV-TPA-CRMPROD [10.2.0.125]
Trace complete.
172.17.1.10 is the mpls router.
**** Here is the routing table (sh ip route) from the 3750 @ 172.17.1.1
Gateway of last resort is 172.17.1.2 to network 0.0.0.0
S 192.168.30.0/24 [1/0] via 172.17.1.10
172.17.0.0/24 is subnetted, 3 subnets
S 172.17.200.0 [1/0] via 172.17.1.2
C 172.17.1.0 is directly connected, Vlan20
S 172.17.100.0 [1/0] via 172.17.1.3
172.18.0.0/24 is subnetted, 1 subnets
S 172.18.1.0 [1/0] via 172.17.1.10
S 192.168.11.0/24 [1/0] via 172.17.1.10
10.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
S 10.2.0.0/24 [1/0] via 172.17.1.10
S 10.10.10.0/24 [1/0] via 172.17.1.10
S 10.20.0.0/24 [1/0] via 172.17.1.10
S 10.3.0.128/25 [1/0] via 172.17.1.10
S 192.168.1.0/24 [1/0] via 172.17.1.10
S* 0.0.0.0/0 [1/0] via 172.17.1.2
*** Here is the firewall config (5510):
ASA Version 8.4(1)
hostname RVGW
domain-name ************
enable password b5aqRk/6.KRmypWW encrypted
passwd 1ems91jznlfZHhfU encrypted
names
interface Ethernet0/0
nameif Outside
security-level 10
ip address 5.29.79.10 255.255.255.248
interface Ethernet0/1
nameif Inside
security-level 100
ip address 172.17.1.2 255.255.255.0
interface Ethernet0/2
shutdown
no nameif
no security-level
no ip address
interface Ethernet0/3
shutdown
no nameif
no security-level
no ip address
interface Management0/0
nameif management
security-level 100
ip address 172.19.1.1 255.255.255.0
management-only
banner login RedV GW
ftp mode passive
dns server-group DefaultDNS
domain-name RedVector.com
same-security-traffic permit inter-interface
same-security-traffic permit intra-interface
object network WiFi
subnet 172.17.100.0 255.255.255.0
description WiFi
object network inside-net
subnet 172.17.1.0 255.255.255.0
object network NOSPAM
host 172.17.1.60
object network BH2
host 172.17.1.60
object network EX2
host 172.17.1.61
description Internal Exchange / Outbound SMTP
object network Mail2
host 5.29.79.11
description Ext EX2
object network NETWORK_OBJ_172.17.1.240_28
subnet 172.17.1.240 255.255.255.240
object network NETWORK_OBJ_172.17.200.0_24
subnet 172.17.200.0 255.255.255.0
object network VPN-CLIENT
subnet 172.17.200.0 255.255.255.0
object-group service DM_INLINE_TCP_1 tcp
port-object eq www
port-object eq https
object-group network DM_INLINE_NETWORK_1
network-object object BH2
network-object object NOSPAM
object-group network VPN-CLIENT-PAT-SOURCE
description VPN-CLIENT-PAT-SOURCE
network-object object VPN-CLIENT
object-group network LAN-NETWORKS
network-object 10.10.10.0 255.255.255.0
network-object 10.2.0.0 255.255.255.0
network-object 10.3.0.0 255.255.255.0
network-object 172.17.100.0 255.255.255.0
network-object 172.18.1.0 255.255.255.0
network-object 192.168.1.0 255.255.255.0
network-object 192.168.11.0 255.255.255.0
network-object 192.168.30.0 255.255.255.0
object-group network VPN-POOL
network-object 172.17.200.0 255.255.255.0
object-group protocol DM_INLINE_PROTOCOL_1
protocol-object ip
protocol-object icmp
access-list Outside_access_in extended permit tcp any object-group DM_INLINE_NETWORK_1 eq smtp
access-list Outside_access_in extended permit tcp any object BH2 object-group DM_INLINE_TCP_1
access-list global_mpc extended permit ip any any
access-list Inside_access_in extended permit object-group DM_INLINE_PROTOCOL_1 any any
pager lines 24
logging enable
logging asdm informational
no logging message 106015
no logging message 313001
no logging message 313008
no logging message 106023
no logging message 710003
no logging message 106100
no logging message 302015
no logging message 302014
no logging message 302013
no logging message 302018
no logging message 302017
no logging message 302016
no logging message 302021
no logging message 302020
flow-export destination Inside 172.17.1.52 9996
mtu Outside 1500
mtu Inside 1500
mtu management 1500
ip local pool VPN 172.17.1.240-172.17.1.250 mask 255.255.255.0
ip local pool VPN2 172.17.200.100-172.17.200.200 mask 255.255.255.0
no failover
icmp unreachable rate-limit 1 burst-size 1
no asdm history enable
arp timeout 14400
nat (Inside,Outside) source static EX2 Mail2
nat (Inside,Outside) source static any any destination static NETWORK_OBJ_172.17.1.240_28 NETWORK_OBJ_172.17.1.240_28
nat (Inside,Outside) source static any any destination static NETWORK_OBJ_172.17.200.0_24 NETWORK_OBJ_172.17.200.0_24
nat (Inside,Outside) source static inside-net inside-net destination static NETWORK_OBJ_172.17.1.240_28 NETWORK_OBJ_172.17.1.240_28
nat (Inside,Outside) source static LAN-NETWORKS LAN-NETWORKS destination static VPN-POOL VPN-POOL
object network inside-net
nat (Inside,Outside) dynamic interface
object network NOSPAM
nat (Inside,Outside) static 5.29.79.12
nat (Outside,Outside) after-auto source dynamic VPN-CLIENT-PAT-SOURCE interface
access-group Outside_access_in in interface Outside
access-group Inside_access_in in interface Inside
route Outside 0.0.0.0 0.0.0.0 5.29.79.9 1
route Inside 10.2.0.0 255.255.255.0 172.17.1.1 1
route Inside 10.3.0.0 255.255.255.128 172.17.1.1 1
route Inside 10.10.10.0 255.255.255.0 172.17.1.1 1
route Inside 172.17.100.0 255.255.255.0 172.17.1.3 1
route Inside 172.18.1.0 255.255.255.0 172.17.1.1 1
route Inside 192.168.1.0 255.255.255.0 172.17.1.1 1
route Inside 192.168.11.0 255.255.255.0 172.17.1.1 1
route Inside 192.168.30.0 255.255.255.0 172.17.1.1 1
timeout xlate 3:00:00
timeout conn 1:00:00 half-closed 0:10:00 udp 0:02:00 icmp 0:00:02
timeout sunrpc 0:10:00 h323 0:05:00 h225 1:00:00 mgcp 0:05:00 mgcp-pat 0:05:00
timeout sip 0:30:00 sip_media 0:02:00 sip-invite 0:03:00 sip-disconnect 0:02:00
timeout sip-provisional-media 0:02:00 uauth 0:05:00 absolute
timeout tcp-proxy-reassembly 0:01:00
dynamic-access-policy-record DfltAccessPolicy
aaa-server RedVec protocol ldap
aaa-server RedVec (Inside) host 172.17.1.41
ldap-base-dn DC=adrs1,DC=net
ldap-group-base-dn DC=adrs,DC=net
ldap-scope subtree
ldap-naming-attribute sAMAccountName
ldap-login-password *****
ldap-login-dn CN=Hanna\, Roger,OU=Humans,OU=WPLAdministrator,DC=adrs1,DC=net
server-type microsoft
aaa authentication ssh console LOCAL
http server enable
http 192.168.1.0 255.255.255.0 management
http 172.17.1.0 255.255.255.0 Inside
http 24.32.208.223 255.255.255.255 Outside
snmp-server host Inside 172.17.1.52 community *****
snmp-server location Server Room 3010
snmp-server contact Roger Hanna
snmp-server community *****
snmp-server enable traps snmp authentication linkup linkdown coldstart warmstart
crypto ipsec ikev1 transform-set ESP-AES-256-MD5 esp-aes-256 esp-md5-hmac
crypto ipsec ikev1 transform-set ESP-DES-SHA esp-des esp-sha-hmac
crypto ipsec ikev1 transform-set ESP-DES-MD5 esp-des esp-md5-hmac
crypto ipsec ikev1 transform-set ESP-AES-192-MD5 esp-aes-192 esp-md5-hmac
crypto ipsec ikev1 transform-set ESP-3DES-MD5 esp-3des esp-md5-hmac
crypto ipsec ikev1 transform-set ESP-AES-256-SHA esp-aes-256 esp-sha-hmac
crypto ipsec ikev1 transform-set ESP-AES-128-SHA esp-aes esp-sha-hmac
crypto ipsec ikev1 transform-set ESP-AES-192-SHA esp-aes-192 esp-sha-hmac
crypto ipsec ikev1 transform-set ESP-AES-128-MD5 esp-aes esp-md5-hmac
crypto ipsec ikev1 transform-set ESP-3DES-SHA esp-3des esp-sha-hmac
crypto dynamic-map SYSTEM_DEFAULT_CRYPTO_MAP 65535 set ikev1 transform-set ESP-AES-128-SHA ESP-AES-128-MD5 ESP-AES-192-SHA ESP-AES-192-MD5 ESP-AES-256-SHA ESP-AES-256-MD5 ESP-3DES-SHA ESP-3DES-MD5 ESP-DES-SHA ESP-DES-MD5
crypto map Outside_map 65535 ipsec-isakmp dynamic SYSTEM_DEFAULT_CRYPTO_MAP
crypto map Outside_map interface Outside
crypto ikev1 enable Outside
crypto ikev1 policy 10
authentication pre-share
encryption 3des
hash sha
group 2
lifetime 86400
crypto ikev1 policy 30
authentication crack
encryption 3des
hash sha
group 2
lifetime 86400
telnet 172.17.1.0 255.255.255.0 Inside
telnet timeout 5
ssh 172.17.1.0 255.255.255.0 Inside
ssh timeout 5
console timeout 0
dhcpd address 172.17.1.100-172.17.1.200 Inside
dhcpd dns 172.17.1.41 172.17.1.42 interface Inside
dhcpd lease 100000 interface Inside
dhcpd domain adrs1.net interface Inside
threat-detection basic-threat
threat-detection statistics
threat-detection statistics tcp-intercept rate-interval 30 burst-rate 400 average-rate 200
webvpn
group-policy RedV internal
group-policy RedV attributes
wins-server value 172.17.1.41
dns-server value 172.17.1.41 172.17.1.42
vpn-tunnel-protocol ikev1
default-domain value ADRS1.NET
group-policy RedV_1 internal
group-policy RedV_1 attributes
wins-server value 172.17.1.41
dns-server value 172.17.1.41 172.17.1.42
vpn-tunnel-protocol ikev1
split-tunnel-policy tunnelspecified
default-domain value adrs1.net
username rparker password FnbvAdOZxk4r40E5 encrypted privilege 15
username rparker attributes
vpn-group-policy RedV
username mhale password 2reWKpsLC5em3o1P encrypted privilege 0
username mhale attributes
vpn-group-policy RedV
username dcoletto password g53yRiEqpcYkSyYS encrypted privilege 0
username dcoletto attributes
vpn-group-policy RedV
username rhanna password Pd3E3vqnGmV84Ds2 encrypted privilege 15
username rhanna attributes
vpn-group-policy RedV
tunnel-group RedV type remote-access
tunnel-group RedV general-attributes
address-pool VPN2
authentication-server-group RedVec
default-group-policy RedV
tunnel-group RedV ipsec-attributes
ikev1 pre-shared-key *****
class-map global-class
match access-list global_mpc
class-map inspection_default
match default-inspection-traffic
policy-map type inspect dns preset_dns_map
parameters
message-length maximum client auto
message-length maximum 512
policy-map global_policy
class inspection_default
inspect dns preset_dns_map
inspect ftp
inspect h323 h225
inspect h323 ras
inspect rsh
inspect rtsp
inspect esmtp
inspect sqlnet
inspect skinny
inspect sunrpc
inspect xdmcp
inspect sip
inspect netbios
inspect tftp
inspect ip-options
inspect icmp
class global-class
flow-export event-type all destination 172.17.1.52
service-policy global_policy global
prompt hostname context
call-home
profile CiscoTAC-1
no active
destination address http https://tools.cisco.com/its/service/oddce/services/DDCEService
destination address email [email protected]
destination transport-method http
subscribe-to-alert-group diagnostic
subscribe-to-alert-group environment
subscribe-to-alert-group inventory periodic monthly
subscribe-to-alert-group configuration periodic monthly
subscribe-to-alert-group telemetry periodic daily
hpm topN enable
Cryptochecksum:202ad58ba009fb24cbd119ed6d7237a9Hi Roger,
I bet you already checked it, but does the MPLS end router has route to VPN client subnet 172.17.200.x (or default) pointing to core rtr)?
Also, if the MPLS link has any /30 subnet assigned, you may need to include that as well in Object group LAN-NETWORKS.
Thx
MS -
hi
i have an mpls nework with equipment cisco 2821, 2901 and 2801, and i have problems with fax calls, i configured the fax protocol t38 in all routers but when i want to send a fax to the 2821 equipment from either 2801 and 2901, the protocol t38 is not working and the fax call use cisco protocol (although t38 is configured in all routers). the calls betwen 2801 and 2901 works ok, and from 2821 to 2801/2901 works ok too.
any idea of whats happens? do you think is a problem of ios version?
these are de ios version
2821 .-c2800nm-spservicesk9-mz.124-3i.bin
2801 .- c2801-spservicesk9-mz.150-1.M6.bin
2901 .-c2900-universalk9-mz.SPA.150-1.M7.binhi
this is the configuration on the 2821:
voice service voip
fax protocol t38 ls-redundancy 0 hs-redundancy 0 fallback cisco
dial-peer voice 10037 voip
description CONEXION CELAYA DISTRITO XV
destination-pattern 561.
session target ipv4:172.16.200.37
incoming called-number .
dtmf-relay h245-alphanumeric
codec g729r8 bytes 50
fax protocol t38 ls-redundancy 0 hs-redundancy 0 fallback cisco
ip qos dscp ef signaling
no vad
this is the configuration on 2801
voice service voip
fax protocol t38 ls-redundancy 0 hs-redundancy 0 fallback cisco
dial-peer voice 10016 voip
description CONEXION VOZ A FAXES
destination-pattern 300[1-6,8]
session target ipv4:172.1.1.51
incoming called-number .
dtmf-relay h245-alphanumeric
codec g729r8 bytes 50
fax protocol t38 ls-redundancy 0 hs-redundancy 0 fallback cisco
ip qos dscp ef signaling
no vad
i want to use T38 because the bandwidth of the fax call is 16K, if i use cisco protocol the bandwidth reaches up 24k, and the router start to drop voice packets
thanks -
Hello,
We 've got a dial problem with a 2811 branch router (ISDN2) and a 7206 central router (2*ISDN30)
Wehn the 2800 dials in no problem.
When threshold comes up no problem.
But when the second B-channel closed the 2800 doesn't route trafic any more.
Routing protocols still work.
Extended ping from the routers FE interface to de central location form.
But a device connected to the FE interface cannot ping the remote site.
When i use IOS
c2800nm-advsecurityk9-mz.124-10.bin : FAILTY
c2800nm-advsecurityk9-mz.124-12.bin : FAILTY
c2800nm-advsecurityk9-mz.124-5.bin : OKE
c2800nm-advsecurityk9-mz.124-8a.bin : OKE
Branch router:
interface BRI0/2/0
no ip address
encapsulation ppp
dialer pool-member 1
isdn switch-type basic-net3
isdn tei-negotiation first-call
isdn point-to-point-setup
ppp authentication chap
end
interface Dialer10
ip address 1.1.1.1 255.255.255.252
ip pim sparse-dense-mode
encapsulation ppp
dialer pool 1
dialer string 0123456789
dialer load-threshold 75 either
dialer max-call 2
dialer-group 1
no cdp enable
ppp authentication chap callin
ppp chap hostname somerouter
ppp chap password <REMOVED>
ppp multilink
end
Central router:
interface Dialer1
description ISDN:
bandwidth 128
ip address 1.1.1.2 255.255.255.252
ip pim sparse-dense-mode
encapsulation ppp
ip summary-address eigrp 1 0.0.0.0 0.0.0.0 180
dialer pool 1
dialer remote-name someroute
dialer idle-timeout 180
dialer-group 1
no fair-queue
no cdp enable
ppp authentication chap
ppp multilink
endHi
Have you checked up the routes for the remote destinations when the second channel is down ?
Can you check whether you are getting any routes available through the live BRI Channel available when the other one goes down ?
Also can you verify whether the channel is stil active using show isdn active command ?
regds -
Ugly problem with java.lang.reflect.InvocationTargetException
Hello,
I am writing a web service which connects to WebSphere MQ queue manager and puts a message on a queue.
I use Eclipse and as usual I followed more or less the hints given at:
http://www.eclipse.org/webtools/jst/components/ws/1.5/tutorials/BottomUpWebService/BottomUpWebService.html
I have chosen Tomcat 5.5.20 as target server (had to, because otherwise it does not create a server-config.wsdd file), the web service WSDL thingies and the client were created successfully.
I have created WAR files and everything went fine when I tested the thing on JBoss.
Bad things started after I deployed the things on the Tomcat server. When I start the client I receive java.lang.reflect.InvocationTargetException as a result. The web service itself does not generate any exception, but the client does (I'll post the dump later..).
During the debug it turned that the exception is generated at the moment when the web service program tries to call any of the WebSphere functions.
Now - 1st obvious thing was to check if I have com.ibm.mq.jar in the WEB-INF/lib directory inside my WAR files. Yep! There it was.
So.. if the thing works just fine on JBoss and it booms on Tomcat I wonder whats the hack here? I copied all of the MQ libraries i have from JBOSS_HOME/lib to CATALINA_HOME/shared/lib and CATALINA_HOME/common/lib. Well.. that's quite ugly, because all necessary jars are inside the WEB-INF/lib directory. Anyway nothing of the above helped me running the thing on Tomcat.
Do you have any suggestions or have anyone of you ever had such problem?
Here are the exception dump and part of the code:
- Setting up MQ environment:
- Setting hostname...
An AxisFault exception occured: java.lang.reflect.InvocationTargetException
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: java.lang.reflect.InvocationTargetException
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}hostname:ghjvk0j
java.lang.reflect.InvocationTargetException
at org.apache.axis.message.SOAPFaultBuilder.create
Fault(SOAPFaultBuilder.java:222)
at org.apache.axis.message.SOAPFaultBuilder.endElement(
SOAPFaultBuilder.java:129)
at org.apache.axis.encoding.DeserializationContext.endElement(
DeserializationContext.java:1087)
at org.apache.xerces.parsers.AbstractSAXParser.endElement(
Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.
scanEndElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScanne
rImpl$Fragment ContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerI
mpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse
(Unknown Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
at org.apache.axis.encoding.DeserializationContext.parse(
DeserializationContext.java:227)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
at org.apache.axis.handlers.soap.
MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at pl.pzu.services.TfiAuthenticationSoapBindingStub.
verify(TfiAuthenticationSoapBindingStub.java:245)
at pl.pzu.services.TfiAuthenticationProxy.
verify(TfiAuthenticationProxy.java:45)
at org.apache.jsp.sampleTfiAuthenticationProxy.
Result_jsp._jspService(Result_jsp.java:158)
at org.apache.jasper.runtime.HttpJspBase.
service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.
service(HttpServlet.java:802)
at org.apache.jasper.servlet.JspServletWrapper.
service(JspServletWrapper.java:334)
at org.apache.jasper.servlet.JspServlet.
serviceJspFile(JspServlet.java:314)
at org.apache.jasper.servlet.JspServlet.
service(JspServlet.java:264)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(
ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(
StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke
(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(
StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(
ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(
StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(
CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(
Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11Connec
tionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(Pool
TcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(Lea
derFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(
ThreadPool.java:684)
at java.lang.Thread.run(Unknown Source)There is the part of the web service code where the event occurs:
public void writeMessage(String message,
String message_ID) throws Exception
System.out.println(" - Setting up MQ environment: ");
try
System.out.println(" - Setting hostname...");
NEXT LINE CAUSES THE CLIENT TO THROW
This is the first call to any WebSphere assets.
During debug It says the it is unable to inspect the MQEnvironment
object...
MQEnvironment.hostname = m_config.getQMHost();
System.out.println(" - Setting port...");
MQEnvironment.port = m_config.getQMPort();
System.out.println(" - Setting channel...");
MQEnvironment.channel = m_config.getQMChannel();
}I think that if it works on JBoss and it doesn't on Tomcat it is not coding problem, but rather a configuration...
Thanx for any ideas or help from ur side.Did you have any success on this?
I also have the same problem with Tomcat 6.
I had Tomcat 5.0 working with this code, but when we migrated to Tomcat 6.0, I am getting this exception on the clent side. I figured out that it is occuring on invoking WebSphere MQ call from the code.
Thanks -
Problem with a simple GRE tunnel
Hello everyone:
I have a problem with a simple GRE tunnel, and can not make it work, the problem lies in the instruction "tunnel source loopback-0" if I use this command does not work, now if I use "tunnel source <ip wan >" if it works, someone can tell me why?
Thanks for your help
Router 1: 2811
version 12.4
no service password-encryption
hostname cisco2811
no aaa new-model
ip cef
interface Loopback0
ip address 2.2.2.2 255.255.255.255
interface Tunnel0
ip address 10.10.1.1 255.255.255.0
tunnel source Loopback0
tunnel destination 217.127.XXX.188
interface Tunnel1
ip address 10.10.2.1 255.255.255.0
tunnel source Loopback0
tunnel destination 80.32.XXX.125
interface FastEthernet0/0
description LOCAL LAN Interface
ip address 192.168.1.254 255.255.255.0
ip nat inside
ip virtual-reassembly
duplex auto
speed auto
interface FastEthernet0/1
description WAN Interface
ip address 195.77.XXX.70 255.255.255.248
ip nat outside
ip virtual-reassembly
duplex auto
speed auto
ip forward-protocol nd
ip route 0.0.0.0 0.0.0.0 195.77.XXX.65
ip route 192.168.3.0 255.255.255.0 Tunnel0
ip route 192.168.4.0 255.255.255.0 Tunnel1
ip nat inside source route-map salida-fibra interface FastEthernet0/1 overload
access-list 120 deny ip 192.168.1.0 0.0.0.255 192.168.3.0 0.0.0.255
access-list 120 deny ip 192.168.1.0 0.0.0.255 192.168.4.0 0.0.0.255
access-list 120 permit ip 192.168.1.0 0.0.0.255 any
route-map salida-fibra permit 10
match ip address 120
Router 2: 2811
version 12.4
service password-encryption
ip cef
no ip domain lookup
multilink bundle-name authenticated
username admin privilege 15 password 7 104CXXXXx13
interface Loopback0
ip address 4.4.4.4 255.255.255.255
interface Tunnel0
ip address 10.10.1.2 255.255.255.0
tunnel source Loopback0
tunnel destination 195.77.XXX.70
interface Ethernet0
ip address 192.168.3.251 255.255.255.0
ip nat inside
ip virtual-reassembly
hold-queue 100 out
interface ATM0
no ip address
no ip route-cache cef
no ip route-cache
no atm ilmi-keepalive
dsl operating-mode auto
interface ATM0.1 point-to-point
ip address 217.127.XXX.188 255.255.255.192
ip nat outside
ip virtual-reassembly
no ip route-cache
no snmp trap link-status
pvc 8/32
encapsulation aal5snap
ip route 0.0.0.0 0.0.0.0 ATM0.1
ip route 192.168.1.0 255.255.255.0 Tunnel0
ip nat inside source route-map nonat interface ATM0.1 overload
access-list 100 permit ip 192.168.3.0 0.0.0.255 192.168.1.0 0.0.0.255
access-list 120 deny ip 192.168.3.0 0.0.0.255 192.168.1.0 0.0.0.255
access-list 120 permit ip 192.168.3.0 0.0.0.255 any
route-map nonat permit 10
match ip address 120Hello, thank you for the answer, as to your question, I have no connectivity within the tunnel, whether from Router 1, I ping 10.10.1.2 not get response ...
Now both routers remove the loopback, and the interface tunnel 0 change the tunnel source to "tunnel source " tunnel works perfectly, the problem is when I have to use the loopback. Unfortunately achieved when the tunnel work, this will have to endure multicast, and all the examples found carrying a loopback as' source '... but this is a step back ..
Tunnel0 is up, line protocol is up
Hardware is Tunnel
Internet address is 10.10.1.1/24
MTU 1514 bytes, BW 9 Kbit, DLY 500000 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation TUNNEL, loopback not set
Keepalive not set
Tunnel source 2.2.2.2 (Loopback0), destination 217.127.XXX.188
Tunnel protocol/transport GRE/IP
Key disabled, sequencing disabled
Checksumming of packets disabled
Tunnel TTL 255
Fast tunneling enabled
Tunnel transmit bandwidth 8000 (kbps)
Tunnel receive bandwidth 8000 (kbps)
Last input 09:04:38, output 00:00:19, output hang never
Last clearing of "show interface" counters never
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: fifo
Output queue: 0/0 (size/max)
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
0 packets input, 0 bytes, 0 no buffer
Received 0 broadcasts, 0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
11101 packets output, 773420 bytes, 0 underruns
0 output errors, 0 collisions, 0 interface resets
0 unknown protocol drops
0 output buffer failures, 0 output buffers swapped out -
Hello,
I'm using KODO 2.4.3 and JUnit 3.8.1 and log4j 1.2.8.
I have a problem when executing TestCases with JUnit! I think it have to
do with log4j.
The Error is:
javax.jdo.JDOFatalUserException: Exception thrown by
getPersistenceManagerFactory(Properties)
Caused by: org.apache.commons.logging.LogConfigurationException: Class
org.apache.commons.logging.impl.Log4JCategoryLog does not implement Log
at
org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:416)
I regret, but JUnit doesnt show the complete output of the eexception and
you also can't copy and paste it! But it must have to do with the
log4j-Framework (which makes alyways problems with JUnit?)...
If I start JUnit without "-Dlog4j.ignoreTCL=true" then Errors occur with
log4j already before KODO is called...
Thanks for any idea.
Best wishes
BERNDBernd-
Hmmm ... I really think that this problem is because you have another
version of log4j somewhere in your CLASSPATH (or else the classpath that
ant is using). Do you get this exception if you try to use the junit
test cases stand-alone (by using the junit TestRunner class)?
Can you scour your classpath and any classpath that is being used by
ant to ensure that you do not have another log4j or commons-logging jar
anywhere?
In article <[email protected]>, Michael wrote:
I'm using 1.2.8 so I doubt it's the version. It's possible to have two
versions of the apache commons logging jar files, since they've renamed it
from commons-logging to jakarta-commons-logging a while back.
"Marc Prudhommeaux" <[email protected]> wrote in message
news:[email protected]...
Bernd-
Do you have a different version of log4j in your CLASSPATH (perhaps
being used by ant)? You might want to try log4j 1.2.6, which does not
exhibit any problems for us.
In article <[email protected]>, Bernd Ruecker wrote:
Yes, I have both...
Michael wrote:
Do you have both log4j & commons-logging jar files in your classpath??
"Bernd Ruecker" <[email protected]> wrote in message
news:[email protected]...
Hello,
I'm using KODO 2.4.3 and JUnit 3.8.1 and log4j 1.2.8.
I have a problem when executing TestCases with JUnit! I think it have
to
do with log4j.
The Error is:
javax.jdo.JDOFatalUserException: Exception thrown by
getPersistenceManagerFactory(Properties)
Caused by: org.apache.commons.logging.LogConfigurationException:Class
org.apache.commons.logging.impl.Log4JCategoryLog does not implementLog
at
org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryI
mpl.java:416)
I regret, but JUnit doesnt show the complete output of the eexception
and
you also can't copy and paste it! But it must have to do with the
log4j-Framework (which makes alyways problems with JUnit?)...
If I start JUnit without "-Dlog4j.ignoreTCL=true" then Errors occurwith
log4j already before KODO is called...
Thanks for any idea.
Best wishes
BERND
Marc Prud'hommeaux [email protected]
SolarMetric Inc. http://www.solarmetric.com -
Hi
We have just bought an Apple Time Capsule with 3TB of storage, to make backups of our users macbooks. It works fine at the office1 where it is located, but from our other office, time machine backup doesn't work. The offices are connected through a 100Mbit MPLS connection with no firewall - everybody in office1 can see everything at office2, and vice versa. The users at office2 can ping the time capsule, and they can also browse network shares on it.
The only thing that doesn't work, are time machine backups.
The only difrence I can imagine is, that the the machines at office2 are on a different IP subnet, that is being routed through the MPLS connection.
Is there a problem with the AFP perhaps? SMB and ping works fine, my guess is, that AFP doesn't like the fact that the clients are on a different subnet than the time capsule. But what can be done about this?
Best regards
Peter BakThanks Linc ......you were right on the money. Your help has been awsome. I spent 3 hours last night doing stuff with out any solutions. May I ask you another question if you have the time and patience please. My orriginal setup was 2 windows laptops with XP on them connected with a timecapsule attached to a router. Hence the time capsule made a wireless signal aswell as being an external hard drive. On one of the laptops i have a printer attached to it which was shared so that the other computer could print documents through the network however the computer attached to the printer has to be on. Do you know what i have to do so these new 2 mac book pros can print to that printer? Thanks again for all your previous help. Nick
-
Problem with Gmail, Adobe site, Opera, Safari...
Hi guys,
Hope you can help me asap.
I have installed OSX Mountain Lion few minutes ago, but I have a lot of problems...
1.) I cannot access Gmail in Opera (opera web browser) - I have the latest version, also trying reinstall it. It just says:
Secure connection: fatal error (49)
https://accounts.google.com/ServiceLogin?service=mail&passive=true&rm=false&cont inue=http://mail.google.com/mail/&scc=1<mpl=default<mplcache=2
The certificate is valid, but permission denied.
I know, Opera isn't the best web browser, but because of my work, I need to use atleast 2 web browsers together... so I use Opera and Safari.
Never before had this problem with Opera.
2.) I cannot acces some sites on Safari... For example adobe.com (and it works in Opera...)
For example I cannot access adobe site:
Safari can't connect to this server
Safari can't open the page "http://www.adobe.com/ because Safari can't connect to the server "www.adobe.com".
Please help me.
Thanks,
FilipFrom the Safari menu bar, select
Safari ▹ Preferences ▹ Extensions
Turn all extensions OFF and test. If the problem is resolved, turn extensions back ON and then disable them one or a few at a time until you find the culprit.
If you wish, you may be able to salvage the malfunctioning extension by uninstalling and reinstalling it. That will revert its settings to the defaults. -
Problems with running EIGRP as PE-CE routing protocol 2
Dear all,
I am facing with the exact problem as a previous user of running EIGRP as the PE-CE routing protocol for a MPLS VPN customer, but in different hardware. The PE router is a 7609-S RSP720-3CXL-GE running IOS 12.2(33)SRC3.
(When I have 33 prefixes or more in the VRF table on the PE, and I try to advertise this network to the CE router (by redistributing BGP into EIGRP), the EIGRP process begins to flap.
I can't advertise prefix more that 32 subnets at a time why?????
The very weird part here, is that when I do debug ip eigrp on the PE and the CE, I can see that the PE router is sending the routes to the CE, but on the CE I can see nothing.)
In my case there is 16 prefixes. When redistributing BGP into EIGRP on allready adjasent EIGRP neighbors everything works perfect, until some side clears it then it begans flaping. On PE router debug is show "retry limit exceeded" ,on CE "Interface Goodbye received"
If solution will be same what software should I use?
Thanks,
George ShiukashviliGeorge,
Let me ask a few questions:
What is the link layer technology that interconnects the PE and CE that are currently experiencing these issues?
Are there any devices inside the PE-CE path that could at least possibly (and randomly) block multicasts and/or large packets?
Is it possible to modify the EIGRP configuration both on PE and CE to manual neighbor definition using the neighbor commands? This would force all EIGRP comunication between the PE and CE to run as unicast, possibly avoiding some issues with multicast packet delivery.
Is it possible for you to post some show commands from both the PE and CE? I would be interested in seeing the show ip interface, show interfaces, show running-config interface regarding the particular interfaces on PE and CE that connect to each other, and also, I would like to see the EIGRP configuration on both devices.
I agree with the assessment of Mahesh - the preliminary information we have suggest that either the PE packets are not arriving at the CE, or the ACK packets from CE are not arriving back at the PE. Your own debug analysis furthermore revealed that there are no EIGRP Update packets arriving from the PE at the CE. Problems with MTU could indeed cause these problems but it is necessary to inspect the entire path between PE and CE.
Best regards,
Peter -
I am trying to implement some kind of a server listening for requests. The listener part of the app, is a daemon thread that listens for connections and instantiates a handling daemon thread once it gets some. However, my problem is that i must be able to kill the listening thread at the user's will (say via a sto button). I have done this via the Sun's proposed way, by testing a boolean flag in the loop, which is set to false when i wish to kill the thread. The problem with this thing is the following...
Once the thread starts excecuting, it will test the flag, find it true and enter the loop. At some point it will LOCK on the server socket waiting for connection. Unless some client actually connects, it will keep on listening indefinatelly whithought ever bothering to check for the flag again (no matter how many times you set the damn thing to false).
My question is this: Is there any real, non-theoretical, applied way to stop thread in java safely?
Thank you in advance,
LeftyThis was one solution from the socket programming forum, have you tried this??
public Thread MyThread extends Thread{
boolean active = true;
public void run(){
ss.setSoTimeout(90);
while (active){
try{
serverSocket = ss.accept();
catch (SocketTimeoutException ste){
// do nothing
// interrupt thread
public void deactivate(){
active = false;
// you gotta sleep for a time longer than the
// accept() timeout to make sure that timeout is finished.
try{
sleep(91);
}catch (InterruptedException ie){
interrupt();
} -
Problem with Threads and a static variable
I have a problem with the code below. I am yet to make sure that I understand the problem. Correct me if I am wrong please.
Code functionality:
A timer calls SetState every second. It sets the state and sets boolean variable "changed" to true. Then notifies a main process thread to check if the state changed to send a message.
The problem as far I understand is:
Assume the timer Thread calls SetState twice before the main process Thread runs. As a result, "changed" is set to true twice. However, since the main process is blocked twice during the two calls to SetState, when it runs it would have the two SetState timer threads blocked on its synchronized body. It will pass the first one, send the message and set "changed" to false since it was true. Now, it will pass the second thread, but here is the problem, "changed" is already set to false. As a result, it won't send the message even though it is supposed to.
Would you please let me know if my understanding is correct? If so, what would you propose to resolve the problem? Should I call wait some other or should I notify in a different way?
Thanks,
B.D.
Code:
private static volatile boolean bChanged = false;
private static Thread objMainProcess;
protected static void Init(){
objMainProcess = new Thread() {
public void run() {
while( objMainProcess == Thread.currentThread() ) {
GetState();
objMainProcess.setDaemon( true );
objMainProcess.start();
public static void initStatusTimer(){
if(objTimer == null)
objTimer = new javax.swing.Timer( 1000, new java.awt.event.ActionListener(){
public void actionPerformed( java.awt.event.ActionEvent evt){
SetState();
private static void SetState(){
if( objMainProcess == null ) return;
synchronized( objMainProcess ) {
bChanged = true;
try{
objMainProcess.notify();
}catch( IllegalMonitorStateException e ) {}
private static boolean GetState() {
if( objMainProcess == null ) return false;
synchronized( objMainProcess ) {
if( bChanged) {
SendMessage();
bChanged = false;
return true;
try {
objMainProcess.wait();
}catch( InterruptedException e ) {}
return false;
}Thanks DrClap for your reply. Everything you said is right. It is not easy to make them alternate since SetState() could be called from different places where the state could be anything else but a status message. Like a GREETING message for example. It is a handshaking message but not a status message.
Again as you said, There is a reason I can't call sendMessage() inside setState().
The only way I was able to do it is by having a counter of the number of notifies that have been called. Every time notify() is called a counter is incremented. Now instead of just checking if "changed" flag is true, I also check if notify counter is greater than zero. If both true, I send the message. If "changed" flag is false, I check again if the notify counter is greater than zero, I send the message. This way it works, but it is kind of a patch than a good design fix. I am yet to find a good solution.
Thanks,
B.D. -
Problem with threads running javaw
Hi,
Having a problem with multi thread programming using client server sockets. The program works find when starting the the application in a console using java muti.java , but when using javaw multi.java the program doesnt die and have to kill it in the task manager. The program doesnt display any of my gui error messages either when the server disconnect the client. all works find in a console. any advice on this as I havent been able to understand why this is happening? any comment would be appreciated.
troy.troy,
Try and post a minimum code sample of your app which
does not work.
When using javaw, make sure you redirect the standard
error and standard output streams to file.
Graeme.Hi Graeme,
I dont understand what you mean by redirection to file? some of my code below.
The code works fine under a console, code is supposed to exit when the client (the other server )disconnects. the problem is that but the clientworker side of the code still works. which under console it doesnt.
public class Server{
ServerSocket aServerSocket;
Socket dianosticsSocket;
Socket nPortExpress;
ClientListener aClientListener;
LinkedList queue = new LinkedList();
int port = 0;
int clientPort = 0;
String clientName = null;
boolean serverAlive = true;
* Server constructor generates a server
* Socket and then starts a client threads.
* @param aPort socket port of local machine.
public Server(int aPort, String aClientName, int aClientPort){
port = aPort;
clientName = aClientName;
clientPort = aClientPort;
try{
// create a new thread
aServerSocket = new ServerSocket(port) ;
// connect to the nPortExpress
aClientListener = new ClientListener(InetAddress.getByName(clientName), clientPort, queue,this);
// aClientListener.setDaemon(true);
aClientListener.start();
// start a dianostic port
DiagnosticsServer aDiagnosticsServer = new DiagnosticsServer(port,queue,aClientListener);
// System.out.println("Server is running on port " + port + "...");
// System.out.println("Connect to nPort");
catch(Exception e)
// System.out.println("ERROR: Server port " + port + " not available");
JOptionPane.showMessageDialog(null, (e.toString()),"ERROR: Server port " + port + " not available", JOptionPane.ERROR_MESSAGE);
serverAlive = false;
System.exit(1);
while(serverAlive&&aClientListener.hostSocket.isConnected()){
try{
// connect the client
Socket aClient = aServerSocket.accept();
//System.out.println("open client connection");
//System.out.println("client local: "+ aClient.getLocalAddress().toString());
// System.out.println("client localport: "+ aClient.getLocalPort());
// System.out.println("client : "+ aClient.getInetAddress().toString());
// System.out.println("client port: "+ aClient.getLocalPort());
// make a new client thread
ClientWorker clientThread = new ClientWorker(aClient, queue, aClientListener, false);
// start thread
clientThread.start();
catch(Exception e)
//System.out.println("ERROR: Client connection failure");
JOptionPane.showMessageDialog(null, (e.toString()),"ERROR: Client connection failure", JOptionPane.ERROR_MESSAGE);
}// end while
} // end constructor Server
void serverExit(){
JOptionPane.showMessageDialog(null, "Server ","ERROR: nPort Failure", JOptionPane.ERROR_MESSAGE);
System.exit(1);
}// end class Server
*** connect to another server
public class ClientListener extends Thread{
InetAddress hostName;
int hostPort;
Socket hostSocket;
BufferedReader in;
PrintWriter out;
boolean loggedIn;
LinkedList queue; // reference to Server queue
Server serverRef; // reference to main server
* ClientListener connects to the host server.
* @param aHostName is the name of the host eg server name or IP address.
* @param aHostPort is a port number of the host.
* @param aLoginName is the users login name.
public ClientListener(InetAddress aHostName, int aHostPort,LinkedList aQueue,Server aServer) // reference to Server queue)
hostName = aHostName;
hostPort = aHostPort;
queue = aQueue;
serverRef = aServer;
// connect to the server
try{
hostSocket = new Socket(hostName, hostPort);
catch(IOException e){
//System.out.println("ERROR: Connection Host Failed");
JOptionPane.showMessageDialog(null, (e.toString()),"ERROR: Connection to nPort Failed", JOptionPane.ERROR_MESSAGE);
System.exit(0);
} // end constructor ClientListener
** multi client connection server
ClientWorker(Socket aSocket,LinkedList aQueue, ClientListener aClientListener, boolean diagnostics){
queue = aQueue;
addToQueue(this);
client = aSocket;
clientRef = aClientListener;
aDiagnostic = diagnostics;
} // end constructor ClientWorker
* run method is the main loop of the server program
* in change of handle new client connection as well
* as handle all messages and errors.
public void run(){
boolean alive = true;
String aSubString = "";
in = null;
out = null;
loginName = "";
loggedIn = false;
while (alive && client.isConnected()&& clientRef.hostSocket.isConnected()){
try{
in = new BufferedReader(new InputStreamReader(client.getInputStream()));
out = new PrintWriter(new OutputStreamWriter(client.getOutputStream()));
if(aDiagnostic){
out.println("WELCOME to diagnostics");
broadCastDia("Connect : diagnostics "+client.getInetAddress().toString());
out.flush();
else {
out.println("WELCOME to Troy's Server");
broadCastDia("Connect : client "+client.getInetAddress().toString());
out.flush();
String line;
while(((line = in.readLine())!= null)){
StringTokenizer aStringToken = new StringTokenizer(line, " ");
if(!aDiagnostic){
broadCastDia(line);
clientRef.sendMessage(line); // send mesage out to netExpress
out.println(line);
out.flush();
else{
if(line.equals("GETIPS"))
getIPs();
else{
clientRef.sendMessage(line); // send mesage out to netExpress
out.println(line);
out.flush();
} // end while
catch(Exception e){
// System.out.println("ERROR:Client Connection reset");
JOptionPane.showMessageDialog(null, (e.toString()),"ERROR:Client Connection reset", JOptionPane.ERROR_MESSAGE);
try{
if(aDiagnostic){
broadCastDia("Disconnect : diagnostics "+client.getInetAddress().toString());
out.flush();
else {
broadCastDia("Disconnect : client "+client.getInetAddress().toString());
out.flush();
// close the buffers and connection;
in.close();
out.close();
client.close();
// System.out.println("out");
// remove from list
removeThreadQueue(this);
alive = false;
catch(Exception e){
// System.out.println("ERROR: Client Connection reset failure");
JOptionPane.showMessageDialog(null, (e.toString()),"ERROR: Client Connection reset failure", JOptionPane.ERROR_MESSAGE);
}// end while
} // end method run
* method run - Generates io stream for communicating with the server and
* starts the client gui. Run also parses the input commands from the server.
public void run(){
boolean alive = true;
try{
// begin to life the gui
// aGuiClient = new ClientGui(hostName.getHostName(), hostPort, loginName, this);
// aGuiClient.show();
in = new BufferedReader(new InputStreamReader(hostSocket.getInputStream()));
out = new PrintWriter(new OutputStreamWriter(hostSocket.getOutputStream()));
while (alive && hostSocket.isConnected()){
String line;
while(((line = in.readLine())!= null)){
System.out.println(line);
broadCast(line);
} // end while
} // end while
catch(Exception e){
// System.out.println("ERRORa Connection to host reset");
JOptionPane.showMessageDialog(null, (e.toString()),"ERROR: Connection to nPort reset", JOptionPane.ERROR_MESSAGE);
try{
hostSocket.close();
}catch(Exception a){
JOptionPane.showMessageDialog(null, (a.toString()),"ERROR: Exception", JOptionPane.ERROR_MESSAGE);
alive = false;
System.exit(1);
} // end method run
Maybe you are looking for
-
Hi. I've been using my external HD for the last few days but since this morning it doesn't show up on my macbook pro. Not on finder nor on the desktop. Neither on Disk Utility. It's not a problem of showing the hard drive, it's more like the computer
-
Yaourt suddenly asking for root password, pacman-color [NEVERMIND]
So just a few days ago I started getting the following whenever I try to install something from yaourt: ==> Continue building boxee-source ? [Y/n] ==> -------------------------------------- ==> ==> Building and installing package ==> Install or build
-
Working Between Illustrator and Photoshop
Hi guys, I guess you could call me a novice when it comes to working between products, but I am using both photoshop and illustrator. Photoshop, I'm obviously using for image editing and touch ups, illustrator I am using to create graphics. I am wo
-
Hi, The hierarchy in HGrid can be constructed using the view link and a view object. If I want to associate a "Where" condition with the child rows of my "root Row", I need to relate the source view object with destination view object. How do I indep
-
Cannot send email from Comcast accounts on mac with 10.4.11, but can receive. On another mac on the same network with 10.5.5 can send and receive. All POP accounts Can send and receive on both macs with IMAP AOL accounts. I have deleted and replaced