Bug 1064771 - NPE when starting webservice endpoint on IPv6 address with square brackets during start [NEEDINFO]
Summary: NPE when starting webservice endpoint on IPv6 address with square brackets d...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Web Services
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: DR3
: EAP 6.3.0
Assignee: Brian Stansberry
QA Contact: Rostislav Svoboda
Russell Dickenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-02-13 09:40 UTC by Miroslav Novak
Modified: 2022-06-16 13:27 UTC (History)
13 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-28 15:43:42 UTC
Type: Bug
sureshkumarzba: needinfo?


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker WFLY-3077 0 Minor Closed Convert command line IPv6 URL literals to address literals 2018-07-16 15:55:17 UTC

Description Miroslav Novak 2014-02-13 09:40:27 UTC
There is regression (against EAP 6.2.0.GA and EAP 6.2.1.GA) when server is bound to IPv6 address with square brackets like:

~/tmp/jboss-eap-6.2/bin $ sh standalone.sh -c standalone-full-ha.xml -b [fe80::3e97:eff:fe96:48c8]

log:
...
10:38:09,647 INFO  [org.jboss.as.remoting] (MSC service thread 1-6) JBAS017100: Listening on [fe80::3e97:eff:fe96:48c8]:4447
10:38:09,667 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC000001: Failed to start service jboss.ws.endpoint-config.Recording-Endpoint-Config: org.jboss.msc.service.StartException in service jboss.ws.endpoint-config.Recording-Endpoint-Config: Failed to start service
	at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1767) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_35]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_35]
	at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_35]
Caused by: java.lang.NullPointerException
	at org.jboss.as.webservices.service.ConfigService.start(ConfigService.java:67)
	at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
	at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
	... 3 more

10:38:09,684 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-5) MSC000001: Failed to start service jboss.ws.client-config.Standard-Client-Config: org.jboss.msc.service.StartException in service jboss.ws.client-config.Standard-Client-Config: Failed to start service
	at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1767) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_35]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_35]
	at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_35]
Caused by: java.lang.NullPointerException
	at org.jboss.as.webservices.service.ConfigService.start(ConfigService.java:62)
	at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
	at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
	... 3 more

10:38:09,668 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC000001: Failed to start service jboss.ws.endpoint-config.Standard-Endpoint-Config: org.jboss.msc.service.StartException in service jboss.ws.endpoint-config.Standard-Endpoint-Config: Failed to start service
	at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1767) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_35]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_35]
	at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_35]
Caused by: java.lang.NullPointerException
	at org.jboss.as.webservices.service.ConfigService.start(ConfigService.java:67)
	at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
	at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
	... 3 more

10:38:09,736 DEBUG [org.apache.catalina.core] (MSC service thread 1-3) JBWEB001136: Starting service jboss.web

...

10:38:10,957 INFO  [org.jboss.as.controller] (Controller Boot Thread) JBAS014774: Service status report
JBAS014777:   Services which failed to start:      service jboss.ws.endpoint-config.Recording-Endpoint-Config: org.jboss.msc.service.StartException in service jboss.ws.endpoint-config.Recording-Endpoint-Config: Failed to start service
      service jboss.ws.client-config.Standard-Client-Config: org.jboss.msc.service.StartException in service jboss.ws.client-config.Standard-Client-Config: Failed to start service
      service jboss.ws.endpoint-config.Standard-Endpoint-Config: org.jboss.msc.service.StartException in service jboss.ws.endpoint-config.Standard-Endpoint-Config: Failed to start service

10:38:10,996 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015961: Http management interface listening on http://fe80::3e97:eff:fe96:48c8:9990/management
10:38:10,996 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on http://fe80::3e97:eff:fe96:48c8:9990
10:38:10,997 ERROR [org.jboss.as] (Controller Boot Thread) JBAS015875: JBoss EAP 6.3.0.Alpha1 (AS 7.4.0.Final-redhat-0) started (with errors) in 3420ms - Started 151 of 281 services (5 services failed or missing dependencies, 124 services are passive or on-demand)

Comment 1 Miroslav Novak 2014-02-28 08:35:56 UTC
Regression keyword did not set blocker ? so setting it.

Comment 2 Alessio Soldano 2014-03-05 16:54:01 UTC
Regression or not, to me "-b [fe80::3e97:eff:fe96:48c8]" is wrong, as you're supposed to provide a host address, not a URL. You should use "-b fe80::3e97:eff:fe96:48c8", which I believe would simply work.

The reason for the failure is not found in the stacktrace and is an OperationFailedException from org.jboss.as.webservices.dmr.AddressValidator when the <wsdl-host> element is read from the model (note, the validator was added recently). The default value in the model for that element is ${jboss.bind.address:127.0.0.1}, which takes the value passed with the command line -b option.

To improve error reporting, the AS core should properly better handle OperationFailedException. No WS issue here AFAICS.

Comment 3 Brian Stansberry 2014-03-05 17:06:35 UTC
(In reply to Alessio Soldano from comment #2)
> 
> To improve error reporting, the AS core should properly better handle
> OperationFailedException. No WS issue here AFAICS.

Please explain what is going wrong. Is some OperationStepHandler doing some validation after it has already installed some services, with the result that the handler doesn't install some other services?

I agree that "-b [fe80::3e97:eff:fe96:48c8]" is wrong.

Comment 4 Alessio Soldano 2014-03-05 17:23:04 UTC
Actually looking better at the log, I see the following line, which was not reported here and which basically tells that the WS subsystem could not be added and started:

18:19:37,525 ERROR [org.jboss.as.controller.management-operation] (ServerService Thread Pool -- 48) JBAS014613: Operation ("add") failed - address: ([("subsystem" => "webservices")]) - failure description: "JBWS022117: Invalid address provided: [::1]"

Brian, the actual exception is the following, if you're interested:

org.jboss.as.controller.OperationFailedException: JBWS022117: Invalid address provided: [::1] [ "JBWS022117: Invalid address provided: [::1]" ]
 	at org.jboss.as.webservices.dmr.AddressValidator.validateParameter(AddressValidator.java:48)
 	at org.jboss.as.controller.operations.validation.NillableOrExpressionParameterValidator.validateParameter(NillableOrExpressionParameterValidator.java:75)
 	at org.jboss.as.controller.AttributeDefinition.resolveValue(AttributeDefinition.java:363)
 	at org.jboss.as.controller.AttributeDefinition.resolveModelAttribute(AttributeDefinition.java:321)
 	at org.jboss.as.controller.AttributeDefinition.resolveModelAttribute(AttributeDefinition.java:295)
 	at org.jboss.as.webservices.dmr.WSSubsystemAdd.createServerConfig(WSSubsystemAdd.java:108)
 	at org.jboss.as.webservices.dmr.WSSubsystemAdd.performBoottime(WSSubsystemAdd.java:90)
 	at org.jboss.as.controller.AbstractBoottimeAddStepHandler.performRuntime(AbstractBoottimeAddStepHandler.java:69)
 	at org.jboss.as.controller.AbstractAddStepHandler$1.execute(AbstractAddStepHandler.java:76)
 	at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:601)
[...]

Comment 5 Alessio Soldano 2014-03-05 17:24:29 UTC
I had to add a stacktrace print in ws subsystem to print the exception above.
The NPE is a consequence of the WS subsystem not having started.

Comment 6 Brian Stansberry 2014-03-05 18:22:02 UTC
I think WSSubsystemAdd should defer the following until after the createServiceConfig() call:

context.addStep(new AbstractDeploymentChainStep() {
            protected void execute(DeploymentProcessorTarget processorTarget) {
                // add the DUP for dealing with WS deployments
                WSDeploymentActivator.activate(processorTarget, appclient);
            }
        }, OperationContext.Stage.RUNTIME);

Basically, do all the validation stuff before doing anything that will change state.

It would be nicer if the validation failure automatically resulted in everything subsequent (e.g. execution of the step that adds those DUPs) not happening. That would be the case if this were a normal op from the CLI or console -- unless the caller added the rollback-on-runtime-failure=true header, the OFE would result in the stop of execution and rollback. But in boot we don't rollback automatically and abort, so weirder problems can happen. (IMO we should provide a config option to roll back / abort at boot.)


A separate issue is nothing appearing in the logs. I thought I'd improved that in 6.2 such that OFEs are logged at boot. (Post boot they are not as they are considered client mistakes that get reported to the client.) But even trying this with WF master I don't see the OFE in the logs.

Comment 7 Alessio Soldano 2014-03-05 18:28:17 UTC
I don't think the move of the code block mentioned above is really related to the NPE. The reason for the NPE is that a service which would have been installed by the WSSubsystemAdd is actually not installed. The thread that eventually ends up into the NPE is processing the EndpointConfigAdd, which is a step handler processing a child of webservices subsystem.

Comment 8 Rostislav Svoboda 2014-03-06 13:10:16 UTC
I agree too that "-b [fe80::3e97:eff:fe96:48c8]" is wrong, we filled it because it is regression to things we could do/use. Not saying it was the right thing:)

Are we going to change this BZ to something like "Improve logging and perform validation before changing the state to prevent hiding the root cause" ?

Comment 9 Brian Stansberry 2014-03-07 03:13:55 UTC
Turns out the logging is fine; the root cause is the first error in the log:

21:10:59,039 ERROR [org.jboss.as.controller.management-operation] (ServerService Thread Pool -- 60) JBAS014613: Operation ("add") failed - address: ([("subsystem" => "webservices")]) - failure description: "JBWS022117: Invalid address provided: [::1]"

Comment 11 Brian Stansberry 2014-03-07 03:37:37 UTC
I changed the command line parsing to strip the [].

Comment 12 Miroslav Novak 2014-03-17 11:48:15 UTC
Thanks for investigation and fix! I cannot hit any problems with EAP 6.3.0.DR4. Setting as verified.

Comment 13 Miroslav Novak 2014-03-18 11:57:36 UTC
We've noticed that when property jboss.bind.address is set:
./standalone.sh -c standalone.xml -Djava.net.preferIPv4Stack=false -Djava.net.preferIPv6Addresses=true -Djboss.bind.address=[::1] -Djboss.bind.address.management=[::1]

then it fails with the same error. Would it be possible to fix it for this use? It seems that [] is not stripped from properties: jboss.bind.address, jboss.bind.address.management, jboss.bind.address.unsecure,

Comment 14 Alessio Soldano 2014-03-20 09:54:17 UTC
Just my 2 cents: if we're going to be lenient on this and getting host addresses from ipv6 urls having brackets, we should at least try to educate users e.g. by printing a WARN telling them they should have not provided urls, but host addresses and in any case we're interpreting what they meant..

Comment 16 Miroslav Novak 2014-03-21 10:51:10 UTC
Thanks Brian! I'll set this bz as verified and add comment to related jira - https://issues.jboss.org/browse/WFLY-3077.

Comment 17 sureshkumar 2018-07-06 09:27:21 UTC
Those guidelines additionally worked to become a good way to recognize that other people online have the identical fervor like mine to grasp great deal more around this condition. 
<a href="http://www.zerobugacademy.com/java-and-j2ee-training-in-chennai">java training in chennai</a>

Comment 18 Aimore 2020-11-16 05:55:22 UTC
Those rules moreover attempted to turn into a decent method to perceive that others online have the indistinguishable enthusiasm like mine to get a handle on incredible arrangement more around this condition. https://www.aimoretechnologies.com/training-courses/java-training

Comment 19 Aimore 2020-12-04 05:42:07 UTC
Java is outdated currently. Join the best course: https://www.aimoretechnologies.com/training-courses/python-training

Comment 20 Stark416 2021-03-30 07:12:49 UTC
We are the best software trainers and also we have 5+ years of experience in this field VISIT HERE:
https://www.aimoretech.com/
https://www.aimoretechnologies.com/training-courses/node-js-training
https://www.aimoretech.com/node-js-training-in-chennai

Comment 21 Sai Yoga Ashram Rishikesh 2021-05-10 06:50:31 UTC
It is essential to have proper form when walking so that you can lessen your probability of injury. Try to walk upright and make sure that you draw back shoulders drawn back. Let your elbows form a cushy 90-degree angle. Your forward foot ought to be totally opposite one another.

When you're weight lifting, understand that more repetitions with lighter weights will prove to add more muscle tissue than doing fewer reps with heavier weights. Muscular mass is will not be about having the capacity to lift the most but to endure the longest without losing strength. Lots of people are proven to utilize this specific method.

Wear comfortable when working out. There could be some pressure to wear inside https://saiyogaashramrishikesh.com/200-hour-yoga-teacher-training-in-rishikesh-india the latest 200 Hour Yoga Teacher Training Course School in Rishikesh attire but try not to succumb to that pressure when you use a gym. Make sure the things you won't feel embarrassed about moving in. The right clothes allow you to concentrate on the 200 Hour Yoga Teacher Training Course School in Rishikesh from https://saiyogaashramrishikesh.com and not how your clothing looks.

Make the amount of time in your day for at least a figure out.

Running can both positive and a curse. In order to avoid problems for the body, run only half as far as normal for one week away from every six.

Comment 22 Gadget Review 2021-08-17 04:35:42 UTC
Cara membuat blog di wordpress serta di blogspot dengan mudah menggunakan hp android ataupun iphone:

https://teknotimes.id/cara-membuat-blog-di-hp-android-dan-ios/

Comment 23 Moca Blues 2021-09-11 07:05:37 UTC
Tutorial Android indonesia :
https://asuperstitiousfund.com/

Comment 24 Anime Indo 2021-11-22 23:50:12 UTC
Nonton Anime Sub Indo https://beenime.com/ Terbaru dan Terupdate serta Download Anime Sub Indo https://jouganime.id/ Terlengkap

Comment 25 polatrik 2022-06-16 13:27:40 UTC
Situs Polatrik menjadi salah satu situs https://www.staging.ithaca.edu/slot-online/ slot gacor gampang menang yang bisa kalian mainkan pada Tahun 2022 sekarang yang dan juga situs ini telah menjamin para pemainnya untuk bisa menambah pundi-pundi rupiah dengan cara memenangkan jackpot pada situs ini.


Note You need to log in before you can comment on or make changes to this bug.