You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/02/17 20:19:21 UTC

[GitHub] [pulsar] utahkay opened a new issue #14357: [proxy] [2.10.0] Proxy throws type conversion exception on startup, won't start

utahkay opened a new issue #14357:
URL: https://github.com/apache/pulsar/issues/14357


   **Describe the bug**
   In 2.10.0, the proxy throws an exception on startup in StreamNative Cloud environment.
   
   **To Reproduce**
   Steps to reproduce the behavior:
   1. Deploy streamnative 2.10.0.0-rc5 into cloud hosted environment.
   2. Observe the proxy logs.
   
   **Expected behavior**
   Expect the proxy to start up successfully.
   
   **Logs**
   ```
   2022-02-16T17:56:26,370+0000 [main] ERROR org.apache.pulsar.proxy.server.ProxyServiceStarter - Failed to start pulsar proxy service. error msg failed to initialize zooKeeperCacheExpirySeconds field while setting value -1additionalServletDirectory=./proxyAdditionalServlet
   java.lang.IllegalArgumentException: failed to initialize zooKeeperCacheExpirySeconds field while setting value -1additionalServletDirectory=./proxyAdditionalServlet
   	at org.apache.pulsar.common.util.FieldParser.lambda$update$0(FieldParser.java:149) ~[io.streamnative-pulsar-common-2.10.0.0-rc5.jar:2.10.0.0-rc5]
   	at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948) ~[?:?]
   	at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:658) ~[?:?]
   	at org.apache.pulsar.common.util.FieldParser.update(FieldParser.java:138) ~[io.streamnative-pulsar-common-2.10.0.0-rc5.jar:2.10.0.0-rc5]
   	at org.apache.pulsar.common.configuration.PulsarConfigurationLoader.create(PulsarConfigurationLoader.java:98) ~[io.streamnative-pulsar-broker-common-2.10.0.0-rc5.jar:2.10.0.0-rc5]
   	at org.apache.pulsar.common.configuration.PulsarConfigurationLoader.create(PulsarConfigurationLoader.java:75) ~[io.streamnative-pulsar-broker-common-2.10.0.0-rc5.jar:2.10.0.0-rc5]
   	at org.apache.pulsar.common.configuration.PulsarConfigurationLoader.create(PulsarConfigurationLoader.java:55) ~[io.streamnative-pulsar-broker-common-2.10.0.0-rc5.jar:2.10.0.0-rc5]
   	at org.apache.pulsar.proxy.server.ProxyServiceStarter.<init>(ProxyServiceStarter.java:144) [io.streamnative-pulsar-proxy-2.10.0.0-rc5.jar:2.10.0.0-rc5]
   	at org.apache.pulsar.proxy.server.ProxyServiceStarter.main(ProxyServiceStarter.java:184) [io.streamnative-pulsar-proxy-2.10.0.0-rc5.jar:2.10.0.0-rc5]
   Caused by: java.lang.RuntimeException: Cannot convert from java.lang.String to java.lang.Integer. Conversion failed with null
   	at org.apache.pulsar.common.util.FieldParser.convert(FieldParser.java:122) ~[io.streamnative-pulsar-common-2.10.0.0-rc5.jar:2.10.0.0-rc5]
   	at org.apache.pulsar.common.util.FieldParser.value(FieldParser.java:193) ~[io.streamnative-pulsar-common-2.10.0.0-rc5.jar:2.10.0.0-rc5]
   	at org.apache.pulsar.common.util.FieldParser.lambda$update$0(FieldParser.java:144) ~[io.streamnative-pulsar-common-2.10.0.0-rc5.jar:2.10.0.0-rc5]
   	... 8 more
   Caused by: java.lang.reflect.InvocationTargetException
   	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
   	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
   	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
   	at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
   	at org.apache.pulsar.common.util.FieldParser.convert(FieldParser.java:118) ~[io.streamnative-pulsar-common-2.10.0.0-rc5.jar:2.10.0.0-rc5]
   	at org.apache.pulsar.common.util.FieldParser.value(FieldParser.java:193) ~[io.streamnative-pulsar-common-2.10.0.0-rc5.jar:2.10.0.0-rc5]
   	at org.apache.pulsar.common.util.FieldParser.lambda$update$0(FieldParser.java:144) ~[io.streamnative-pulsar-common-2.10.0.0-rc5.jar:2.10.0.0-rc5]
   	... 8 more
   Caused by: java.lang.NumberFormatException: For input string: "-1additionalServletDirectory=./proxyAdditionalServlet"
   	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) ~[?:?]
   	at java.lang.Integer.parseInt(Integer.java:652) ~[?:?]
   	at java.lang.Integer.valueOf(Integer.java:983) ~[?:?]
   	at org.apache.pulsar.common.util.FieldParser.stringToInteger(FieldParser.java:265) ~[io.streamnative-pulsar-common-2.10.0.0-rc5.jar:2.10.0.0-rc5]
   	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
   	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
   	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
   	at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
   	at org.apache.pulsar.common.util.FieldParser.convert(FieldParser.java:118) ~[io.streamnative-pulsar-common-2.10.0.0-rc5.jar:2.10.0.0-rc5]
   	at org.apache.pulsar.common.util.FieldParser.value(FieldParser.java:193) ~[io.streamnative-pulsar-common-2.10.0.0-rc5.jar:2.10.0.0-rc5]
   	at org.apache.pulsar.common.util.FieldParser.lambda$update$0(FieldParser.java:144) ~[io.streamnative-pulsar-common-2.10.0.0-rc5.jar:2.10.0.0-rc5]
   	... 8 more
   ```
   
   **Desktop (please complete the following information):**
    - OS: [e.g. iOS]
   
   **Additional context**
   Add any other context about the problem here.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] utahkay edited a comment on issue #14357: [proxy] [2.10.0] Proxy throws type conversion exception on startup, won't start

Posted by GitBox <gi...@apache.org>.
utahkay edited a comment on issue #14357:
URL: https://github.com/apache/pulsar/issues/14357#issuecomment-1043387711


   The root cause appears to be that proxy.conf does not have a newline at end of file.
   
   When additional config settings are appended, probably by [apply-config-from-env.py](https://github.com/apache/pulsar/blob/master/docker/pulsar/scripts/apply-config-from-env.py#L78), the conf file looks like this:
   
   ```
   # ZooKeeper cache expiry time in seconds
   # Deprecated: use metadataStoreCacheExpirySeconds
   zooKeeperCacheExpirySeconds=-1additionalServletDirectory=./proxyAdditionalServlet
   additionalServlets=prometheus-proxy-servlet
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] utahkay edited a comment on issue #14357: [proxy] [2.10.0] Proxy throws type conversion exception on startup, won't start

Posted by GitBox <gi...@apache.org>.
utahkay edited a comment on issue #14357:
URL: https://github.com/apache/pulsar/issues/14357#issuecomment-1043387711


   The root cause appears to be that proxy.conf does not have a newline at end of file.
   
   When additional config settings are appended, probably by [apply-config-from-env.py](https://github.com/apache/pulsar/blob/master/docker/pulsar/scripts/apply-config-from-env.py#L78), the conf file looks like this:
   
   ```
   # ZooKeeper cache expiry time in seconds
   # Deprecated: use metadataStoreCacheExpirySeconds
   zooKeeperCacheExpirySeconds=-1additionalServletDirectory=./proxyAdditionalServlet
   additionalServlets=prometheus-proxy-servlet
   ```
   
   Suggest that apply-config-from-env.py add a newline.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] utahkay edited a comment on issue #14357: [proxy] [2.10.0] Proxy throws type conversion exception on startup, won't start

Posted by GitBox <gi...@apache.org>.
utahkay edited a comment on issue #14357:
URL: https://github.com/apache/pulsar/issues/14357#issuecomment-1043387711


   The root cause appears to be that proxy.conf does not have a newline at end of file.
   
   When additional config settings are appended, probably by [apply-config-from-env.py](https://github.com/apache/pulsar/blob/master/docker/pulsar/scripts/apply-config-from-env.py#L78), the conf file looks like this:
   
   ```
   # ZooKeeper cache expiry time in seconds
   # Deprecated: use metadataStoreCacheExpirySeconds
   zooKeeperCacheExpirySeconds=-1additionalServletDirectory=./proxyAdditionalServlet
   additionalServlets=prometheus-proxy-servlet
   ```
   
   The newline was probably removed in [this PR](https://github.com/apache/pulsar/pull/14147/files#diff-f6021f4eb78412cb22fddd64b711e74ef794d071f45200a1997a9e682077895aR272) but it would probably be best to update apply-config-from-env.py to add a newline.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] codelipenghui closed issue #14357: [proxy] [2.10.0] Proxy throws type conversion exception on startup, won't start

Posted by GitBox <gi...@apache.org>.
codelipenghui closed issue #14357:
URL: https://github.com/apache/pulsar/issues/14357


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] utahkay edited a comment on issue #14357: [proxy] [2.10.0] Proxy throws type conversion exception on startup, won't start

Posted by GitBox <gi...@apache.org>.
utahkay edited a comment on issue #14357:
URL: https://github.com/apache/pulsar/issues/14357#issuecomment-1043387711


   The root cause appears to be that proxy.conf does not have a newline at end of file.
   
   When additional config settings are appended, the conf file looks like this:
   
   ```
   # ZooKeeper cache expiry time in seconds
   # Deprecated: use metadataStoreCacheExpirySeconds
   zooKeeperCacheExpirySeconds=-1additionalServletDirectory=./proxyAdditionalServlet
   additionalServlets=prometheus-proxy-servlet
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] utahkay commented on issue #14357: [proxy] [2.10.0] Proxy throws type conversion exception on startup, won't start

Posted by GitBox <gi...@apache.org>.
utahkay commented on issue #14357:
URL: https://github.com/apache/pulsar/issues/14357#issuecomment-1043387711


   The root cause appears to be that proxy.conf does not have a newline at end of file.
   
   When additional config settings are appended by the cloud hosted environment, the conf file looks like this:
   
   ```
   # ZooKeeper cache expiry time in seconds
   # Deprecated: use metadataStoreCacheExpirySeconds
   zooKeeperCacheExpirySeconds=-1additionalServletDirectory=./proxyAdditionalServlet
   additionalServlets=prometheus-proxy-servlet
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org