flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jared Stehler (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (FLINK-6663) NPE on web startup when disabling web submissions
Date Mon, 22 May 2017 17:18:04 GMT

     [ https://issues.apache.org/jira/browse/FLINK-6663?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jared Stehler updated FLINK-6663:
---------------------------------
    Description: 
The web frontend fails to start when I disable web submissions, with a null pointer for upload
dir:

2017-05-22 16:56:42.818 [main] ERROR org.apache.flink.runtime.webmonitor.WebMonitorUtils 
- WebServer could not be created
java.lang.NullPointerException: null
	at org.apache.flink.util.Preconditions.checkNotNull(Preconditions.java:58)
	at org.apache.flink.runtime.webmonitor.utils.WebFrontendBootstrap.<init>(WebFrontendBootstrap.java:65)
	at org.apache.flink.runtime.webmonitor.WebRuntimeMonitor.<init>(WebRuntimeMonitor.java:385)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
	at org.apache.flink.runtime.webmonitor.WebMonitorUtils.startWebRuntimeMonitor(WebMonitorUtils.java:140)
	at org.apache.flink.runtime.clusterframework.BootstrapTools.startWebMonitorIfConfigured(BootstrapTools.java:195)
	at org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner.runPrivileged(MesosApplicationMasterRunner.java:325)
	at org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner$1.call(MesosApplicationMasterRunner.java:181)
	at org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner$1.call(MesosApplicationMasterRunner.java:178)
	at org.apache.flink.runtime.security.HadoopSecurityContext$1.run(HadoopSecurityContext.java:43)
	at java.security.AccessController.doPrivileged(Native Method)
	at javax.security.auth.Subject.doAs(Subject.java:422)
	at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1657)
	at org.apache.flink.runtime.security.HadoopSecurityContext.runSecured(HadoopSecurityContext.java:40)
	at org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner.run(MesosApplicationMasterRunner.java:178)
	at org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner.main(MesosApplicationMasterRunner.java:139)

This seems to be due to the code explicitly setting it to null?
{code:java}
		final boolean webSubmitAllow = cfg.isProgramSubmitEnabled();
		if (webSubmitAllow) {
			// create storage for uploads
			this.uploadDir = getUploadDir(config);
			// the upload directory should either 1. exist and writable or 2. can be created and writable
			if (!(uploadDir.exists() && uploadDir.canWrite()) && !(uploadDir.mkdir()
&& uploadDir.canWrite())) {
				throw new IOException(
					String.format("Jar upload directory %s cannot be created or is not writable.",
						uploadDir.getAbsolutePath()));
			}
			LOG.info("Using directory {} for web frontend JAR file uploads", uploadDir);
		}
		else {
			this.uploadDir = null;
		}
{code}

  was:
The web frontend fails to start when I disable web submissions, with a null pointer for upload
dir:

2017-05-22 16:56:42.818 [main] ERROR org.apache.flink.runtime.webmonitor.WebMonitorUtils 
- WebServer could not be created
java.lang.NullPointerException: null
	at org.apache.flink.util.Preconditions.checkNotNull(Preconditions.java:58)
	at org.apache.flink.runtime.webmonitor.utils.WebFrontendBootstrap.<init>(WebFrontendBootstrap.java:65)
	at org.apache.flink.runtime.webmonitor.WebRuntimeMonitor.<init>(WebRuntimeMonitor.java:385)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
	at org.apache.flink.runtime.webmonitor.WebMonitorUtils.startWebRuntimeMonitor(WebMonitorUtils.java:140)
	at org.apache.flink.runtime.clusterframework.BootstrapTools.startWebMonitorIfConfigured(BootstrapTools.java:195)
	at org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner.runPrivileged(MesosApplicationMasterRunner.java:325)
	at org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner$1.call(MesosApplicationMasterRunner.java:181)
	at org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner$1.call(MesosApplicationMasterRunner.java:178)
	at org.apache.flink.runtime.security.HadoopSecurityContext$1.run(HadoopSecurityContext.java:43)
	at java.security.AccessController.doPrivileged(Native Method)
	at javax.security.auth.Subject.doAs(Subject.java:422)
	at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1657)
	at org.apache.flink.runtime.security.HadoopSecurityContext.runSecured(HadoopSecurityContext.java:40)
	at org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner.run(MesosApplicationMasterRunner.java:178)
	at org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner.main(MesosApplicationMasterRunner.java:139)

This seems to be due to the code explicitly setting it to null?

		final boolean webSubmitAllow = cfg.isProgramSubmitEnabled();
		if (webSubmitAllow) {
			// create storage for uploads
			this.uploadDir = getUploadDir(config);
			// the upload directory should either 1. exist and writable or 2. can be created and writable
			if (!(uploadDir.exists() && uploadDir.canWrite()) && !(uploadDir.mkdir()
&& uploadDir.canWrite())) {
				throw new IOException(
					String.format("Jar upload directory %s cannot be created or is not writable.",
						uploadDir.getAbsolutePath()));
			}
			LOG.info("Using directory {} for web frontend JAR file uploads", uploadDir);
		}
		else {
			this.uploadDir = null;
		}



> NPE on web startup when disabling web submissions
> -------------------------------------------------
>
>                 Key: FLINK-6663
>                 URL: https://issues.apache.org/jira/browse/FLINK-6663
>             Project: Flink
>          Issue Type: Bug
>          Components: Webfrontend
>    Affects Versions: 1.3.0
>            Reporter: Jared Stehler
>
> The web frontend fails to start when I disable web submissions, with a null pointer for
upload dir:
> 2017-05-22 16:56:42.818 [main] ERROR org.apache.flink.runtime.webmonitor.WebMonitorUtils
 - WebServer could not be created
> java.lang.NullPointerException: null
> 	at org.apache.flink.util.Preconditions.checkNotNull(Preconditions.java:58)
> 	at org.apache.flink.runtime.webmonitor.utils.WebFrontendBootstrap.<init>(WebFrontendBootstrap.java:65)
> 	at org.apache.flink.runtime.webmonitor.WebRuntimeMonitor.<init>(WebRuntimeMonitor.java:385)
> 	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> 	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
> 	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
> 	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
> 	at org.apache.flink.runtime.webmonitor.WebMonitorUtils.startWebRuntimeMonitor(WebMonitorUtils.java:140)
> 	at org.apache.flink.runtime.clusterframework.BootstrapTools.startWebMonitorIfConfigured(BootstrapTools.java:195)
> 	at org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner.runPrivileged(MesosApplicationMasterRunner.java:325)
> 	at org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner$1.call(MesosApplicationMasterRunner.java:181)
> 	at org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner$1.call(MesosApplicationMasterRunner.java:178)
> 	at org.apache.flink.runtime.security.HadoopSecurityContext$1.run(HadoopSecurityContext.java:43)
> 	at java.security.AccessController.doPrivileged(Native Method)
> 	at javax.security.auth.Subject.doAs(Subject.java:422)
> 	at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1657)
> 	at org.apache.flink.runtime.security.HadoopSecurityContext.runSecured(HadoopSecurityContext.java:40)
> 	at org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner.run(MesosApplicationMasterRunner.java:178)
> 	at org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner.main(MesosApplicationMasterRunner.java:139)
> This seems to be due to the code explicitly setting it to null?
> {code:java}
> 		final boolean webSubmitAllow = cfg.isProgramSubmitEnabled();
> 		if (webSubmitAllow) {
> 			// create storage for uploads
> 			this.uploadDir = getUploadDir(config);
> 			// the upload directory should either 1. exist and writable or 2. can be created and
writable
> 			if (!(uploadDir.exists() && uploadDir.canWrite()) && !(uploadDir.mkdir()
&& uploadDir.canWrite())) {
> 				throw new IOException(
> 					String.format("Jar upload directory %s cannot be created or is not writable.",
> 						uploadDir.getAbsolutePath()));
> 			}
> 			LOG.info("Using directory {} for web frontend JAR file uploads", uploadDir);
> 		}
> 		else {
> 			this.uploadDir = null;
> 		}
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message