You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shenyu.apache.org by "cl0924 (via GitHub)" <gi...@apache.org> on 2023/02/03 08:10:39 UTC
[GitHub] [shenyu] cl0924 opened a new issue, #4349: [Question] How to deploy clusters under self-development
cl0924 opened a new issue, #4349:
URL: https://github.com/apache/shenyu/issues/4349
### Question
The document seems to use binary packages pulled from the official website for cluster deployment. If I want to develop and deploy clusters myself, how should I do it(I am a novice)?
--
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: notifications-unsubscribe@shenyu.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shenyu] cl0924 commented on issue #4349: [Question] How to deploy clusters under self-development
Posted by "cl0924 (via GitHub)" <gi...@apache.org>.
cl0924 commented on issue #4349:
URL: https://github.com/apache/shenyu/issues/4349#issuecomment-1420377821
thank you,I have reopened an issue, #4363
--
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: notifications-unsubscribe@shenyu.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shenyu] cl0924 commented on issue #4349: [Question] How to deploy clusters under self-development
Posted by "cl0924 (via GitHub)" <gi...@apache.org>.
cl0924 commented on issue #4349:
URL: https://github.com/apache/shenyu/issues/4349#issuecomment-1420362280
Thank you for your answer! Now I'm trying, and I have a null pointer problem with shiroFilterFactoryBean
Scenario: Sometimes no changes are made. Restart shenyu-admin, and this error will be reported in the idea. Excuse me, did I accidentally modify something wrong`Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2023-02-07 16:01:30.895 ERROR 63884 --- [ main] o.s.boot.SpringApplication : Application run failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shiroFilterFactoryBean' defined in class path resource [org/apache/shenyu/admin/shiro/config/ShiroConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.shiro.spring.web.ShiroFilterFactoryBean]: Factory method 'shiroFilterFactoryBean' threw exception; nested exception is java.lang.NullPointerException
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:658) ~[spring-beans-5.3.20.jar:5.3.20]
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:638) ~[spring-beans-5.3.20.jar:5.3.20]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1352) ~[spring-beans-5.3.20.jar:5.3.20]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1195) ~[spring-beans-5.3.20.jar:5.3.20]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582) ~[spring-beans-5.3.20.jar:5.3.20]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.20.jar:5.3.20]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.20.jar:5.3.20]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.20.jar:5.3.20]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.20.jar:5.3.20]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:213) ~[spring-beans-5.3.20.jar:5.3.20]
at org.springframework.context.support.PostProcessorRegistrationDelegate.registerBeanPostProcessors(PostProcessorRegistrationDelegate.java:270) ~[spring-context-5.3.20.jar:5.3.20]
at org.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors(AbstractApplicationContext.java:762) ~[spring-context-5.3.20.jar:5.3.20]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:567) ~[spring-context-5.3.20.jar:5.3.20]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:145) ~[spring-boot-2.6.8.jar:2.6.8]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:745) ~[spring-boot-2.6.8.jar:2.6.8]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:420) ~[spring-boot-2.6.8.jar:2.6.8]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:307) ~[spring-boot-2.6.8.jar:2.6.8]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1317) ~[spring-boot-2.6.8.jar:2.6.8]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1306) ~[spring-boot-2.6.8.jar:2.6.8]
at org.apache.shenyu.admin.ShenyuAdminBootstrap.main(ShenyuAdminBootstrap.java:36) ~[classes/:na]
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.shiro.spring.web.ShiroFilterFactoryBean]: Factory method 'shiroFilterFactoryBean' threw exception; nested exception is java.lang.NullPointerException
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185) ~[spring-beans-5.3.20.jar:5.3.20]
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:653) ~[spring-beans-5.3.20.jar:5.3.20]
... 19 common frames omitted
Caused by: java.lang.NullPointerException: null
at org.apache.shenyu.admin.shiro.config.ShiroConfiguration.shiroFilterFactoryBean(ShiroConfiguration.java:75) ~[classes/:na]
at org.apache.shenyu.admin.shiro.config.ShiroConfiguration$$EnhancerBySpringCGLIB$$aec7d1f0.CGLIB$shiroFilterFactoryBean$2(<generated>) ~[classes/:na]
at org.apache.shenyu.admin.shiro.config.ShiroConfiguration$$EnhancerBySpringCGLIB$$aec7d1f0$$FastClassBySpringCGLIB$$2f390691.invoke(<generated>) ~[classes/:na]
at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:244) ~[spring-core-5.3.20.jar:5.3.20]
at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:331) ~[spring-context-5.3.20.jar:5.3.20]
at org.apache.shenyu.admin.shiro.config.ShiroConfiguration$$EnhancerBySpringCGLIB$$aec7d1f0.shiroFilterFactoryBean(<generated>) ~[classes/:na]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na]
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na]
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ~[spring-beans-5.3.20.jar:5.3.20]
... 20 common frames omitted`
--
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: notifications-unsubscribe@shenyu.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shenyu] iwangjie commented on issue #4349: [Question] How to deploy clusters under self-development
Posted by "iwangjie (via GitHub)" <gi...@apache.org>.
iwangjie commented on issue #4349:
URL: https://github.com/apache/shenyu/issues/4349#issuecomment-1416735912
Custom deployment of the Shenyu Gateway is very simple, as the official documentation states
1. Start by creating an empty springboot project, either by referring to shenyu-bootstrap or by creating it on [ spring's official website ](https://spring.io/quickstart ) .
引入如下jar包:
```xml
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-webflux</artifactId>
<version>2.2.2.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
<version>2.2.2.RELEASE</version>
</dependency>
<dependency>
<groupId>org.apache.shenyu</groupId>
<artifactId>shenyu-spring-boot-starter-gateway</artifactId>
<version>${current.version}</version>
</dependency>
<dependency>
<groupId>org.apache.shenyu</groupId>
<artifactId>shenyu-spring-boot-starter-sync-data-websocket</artifactId>
<version>${current.version}</version>
</dependency>
</dependencies>
```
2. Add the following configuration to your `application.yaml` file
```yaml
spring:
main:
allow-bean-definition-overriding: true
management:
health:
defaults:
enabled: false
shenyu:
sync:
websocket:
urls: ws://localhost:9095/websocket //设置成你的 shenyu-admin 地址
```
Please refer to specific information:
https://shenyu.apache.org/zh/docs/deployment/deployment-custom/
Please refer to specific information:
https://shenyu.apache.org/zh/docs/deployment/deployment-custom/
You can use NGINX to build your cluster directly (Simple) , or you can use the Apache shenyu-Nginx module provided by Shenyu to build your cluster.
If you choose to use Apache Shenyu-nginx, please refer to specific information:
https://shenyu.apache.org/docs/deployment/deployment-cluster/
Hope to help you ~🐝
--
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: notifications-unsubscribe@shenyu.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shenyu] iwangjie commented on issue #4349: [Question] How to deploy clusters under self-development
Posted by "iwangjie (via GitHub)" <gi...@apache.org>.
iwangjie commented on issue #4349:
URL: https://github.com/apache/shenyu/issues/4349#issuecomment-1420368684
For questions other than this issue, please reopen an issue, It is convenient for us to focus on problems, thank you!
In addition, if this issue is already being tried and feasible, you can close this issue first.
Have a nice day. 🐝
--
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: notifications-unsubscribe@shenyu.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shenyu] cl0924 closed issue #4349: [Question] How to deploy clusters under self-development
Posted by "cl0924 (via GitHub)" <gi...@apache.org>.
cl0924 closed issue #4349: [Question] How to deploy clusters under self-development
URL: https://github.com/apache/shenyu/issues/4349
--
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: notifications-unsubscribe@shenyu.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org