Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Websocket serverContainer not available #3907

Open
2 of 3 tasks
xiamuyingu opened this issue Jul 22, 2024 · 3 comments
Open
2 of 3 tasks

[Bug] Websocket serverContainer not available #3907

xiamuyingu opened this issue Jul 22, 2024 · 3 comments
Assignees
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@xiamuyingu
Copy link

Search before asking

  • I had searched in the issues and found no similar issues.

Java Version

JDK 1.8

Scala Version

2.12.x

StreamPark Version

2.1.4

Flink Version

1.19.1

deploy mode

yarn-application

What happened

I downloaded apache-streampark_2.12-2.1.4-incubating-bin.tar.gz in CentOS7.9,and untar it. I configured environment variables according to document as follows:

export JAVA_HOME=/opt/jdk
export HADOOP_HOME=/opt/hadoop
export HADOOP_CONF_DIR=/opt/hadoop/etc/hadoop
export HADOOP_HDFS_HOME=/opt/hadoop
export HADOOP_YARN_HOME=/opt/hadoop
export HADOOP_MAPRED_HOME=/opt/hadoop
export PATH=${HADOOP_HOME}/bin:${JAVA_HOME}/bin:${PATH}
export CLASSPATH=.:${JAVA_HOME}/lib/dt.jar:${JAVA_HOME}/lib/tools.jar

I added mysql-connector-j-8.0.33.jar and flink-shaded-hadoop-3-uber-3.1.1.7.2.9.0-173-9.0.jar to lib directory in streampark.
I executed "bash /opt/streampark/bin/startup.sh" and found the service didn't work properly. The log indicated some errors.
I also try the streampark docker image 2.1.4. I started the containor and entered it and executed "bash streampark.sh start_docker" and found same errors.

Error Exception

2024-07-22 11:22:26.545 StreamPark [main] WARN  o.s.b.w.s.c.AnnotationConfigServletWebServerApplicationContext:591 - Exception encountered during context initialization - cancelling refresh attempt: org
.springframework.beans.factory.BeanCreationException: Error creating bean with name 'serverEndpointExporter' defined in class path resource [org/apache/streampark/console/base/config/WebSocketConfig.cla
ss]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: javax.websocket.server.ServerContainer not available
2024-07-22 11:22:27.222 StreamPark [main] ERROR o.s.boot.SpringApplication:821 - Application run failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'serverEndpointExporter' defined in class path resource [org/apache/streampark/console/base/config/WebSocketConfig.
class]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: javax.websocket.server.ServerContainer not available
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1804)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:620)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
        at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:955)
        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:920)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583)
        at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:147)
        at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:731)
        at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:408)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:307)
        at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:164)
        at org.apache.streampark.console.StreamParkConsoleBootstrap.main(StreamParkConsoleBootstrap.java:56)
Caused by: java.lang.IllegalStateException: javax.websocket.server.ServerContainer not available
        at org.springframework.util.Assert.state(Assert.java:76)
        at org.springframework.web.socket.server.standard.ServerEndpointExporter.afterPropertiesSet(ServerEndpointExporter.java:107)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1863)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1800)
        ... 15 common frames omitted.

Screenshots

image
Uploading image.png…

Are you willing to submit PR?

  • Yes I am willing to submit a PR!(您是否要贡献这个PR?)

Code of Conduct

@xiamuyingu xiamuyingu added the bug Something isn't working label Jul 22, 2024
@wolfboys wolfboys changed the title [Bug] Bug title [Bug] Websocket serverContainer not available Jul 23, 2024
@wolfboys
Copy link
Member

Disable websocket in StreamPark. the front-end polling to request data from the back-end. Only info notification is used here.

@wolfboys wolfboys added the good first issue Good for newcomers label Jul 23, 2024
@zzzk1
Copy link
Contributor

zzzk1 commented Jul 23, 2024

hi @wolfboys, i would like to try this.

@xiamuyingu
Copy link
Author

I found probable cause.
I moved flink-shaded-hadoop-3-uber-3.1.1.7.2.9.0-173-9.0.jar to directory /streampark/lib, and when I execute startup.sh, the error happened.
I moved flink-shaded-hadoop-3-uber-3.1.1.7.2.9.0-173-9.0.jar out from directory /streampark/lib, and when I execute startup.sh, the service streampark works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants