找回密码
 立即注册

QQ登录

只需一步,快速开始

veekend

注册会员

2

主题

3

帖子

15

积分

注册会员

积分
15
最新发帖
veekend
注册会员   /  发表于:2021-5-27 18:22  /   查看:2136  /  回复:1
1金币
问题
我们服务器不允许使用80端口,所以监听了81端口
现在重定向到鉴权页面(connect/authorize)时,会报错然后跳转到错误页面(home/error),同时端口变为80,而不是81
目前怀疑是访问 http://bi.tsjyy.cn/signin-oidc 时没有指定为81端口,导致鉴权失败

版本: grapecitycn/wyn-enterprise:3.0.04172.0

部署环境: linux + docker:20.10.6

跳转截图
第一次跳转
Snipaste_2021-05-27_18-16-21.png
第二次跳转
Snipaste_2021-05-27_18-14-57.png

错误日志
  1. 27-May-2021 10:12:57.091 +00:00 [INF] Invoking IdentityServer endpoint: IdentityServer4.Endpoints.AuthorizeEndpoint for /connect/authorize
  2. 27-May-2021 10:12:57.092 +00:00 [ERR] Invalid redirect_uri: http://bi.tsjyy.cn/signin-oidc
  3. {"ClientId":"http-portal","ClientName":"Portal","RedirectUri":null,"AllowedRedirectUris":["http://bi.tsjyy.cn:81/signin-oidc"],"SubjectId":"anonymous","ResponseType":null,"ResponseMode":null,"GrantType":null,"RequestedScopes":"","State":null,"UiLocales":null,"Nonce":null,"AuthenticationContextReferenceClasses":null,"DisplayMode":null,"PromptMode":null,"MaxAge":null,"LoginHint":null,"SessionId":null,"Raw":{"client_id":"http-portal","redirect_uri":"http://bi.tsjyy.cn/signin-oidc","response_type":"code id_token","scope":"offline_access server_portal storage scheduler cache openid profile email","response_mode":"form_post","nonce":"ZjUyZWZjMGEtZTk1ZC00NzA1LWE2ZTgtNjlhMzVkZjIyZjg3YTc5MjI2OWItYmZkYS00Mzg4LWI1NzgtMWFmYzE0ZWQ1OGMz","state":"CfDJ8OBFSG7UBTpHnHg3aCC615iducqo0xy-oMy8n2AYHLbB-AZ2N7RSM_P1zGyVvbRGxbj_ybsmScNlB4Uaoi35yRyZd_nYt_eNg67SW-O0Ctakm63Ilw7DFfM8BJbv_BnXPLe26gfylUwM0-uZ-hNOy_T7KcxtAPqcaBpkTknEzAez","x-client-SKU":"ID_NETSTANDARD2_0","x-client-ver":"5.3.0.0"},"$type":"AuthorizeRequestValidationLog"}
  4. 27-May-2021 10:12:57.092 +00:00 [ERR] Request validation failed
  5. 27-May-2021 10:12:57.092 +00:00 [INF] {"ClientId":"http-portal","ClientName":"Portal","RedirectUri":null,"AllowedRedirectUris":["http://bi.tsjyy.cn:81/signin-oidc"],"SubjectId":"anonymous","ResponseType":null,"ResponseMode":null,"GrantType":null,"RequestedScopes":"","State":null,"UiLocales":null,"Nonce":null,"AuthenticationContextReferenceClasses":null,"DisplayMode":null,"PromptMode":null,"MaxAge":null,"LoginHint":null,"SessionId":null,"Raw":{"client_id":"http-portal","redirect_uri":"http://bi.tsjyy.cn/signin-oidc","response_type":"code id_token","scope":"offline_access server_portal storage scheduler cache openid profile email","response_mode":"form_post","nonce":"ZjUyZWZjMGEtZTk1ZC00NzA1LWE2ZTgtNjlhMzVkZjIyZjg3YTc5MjI2OWItYmZkYS00Mzg4LWI1NzgtMWFmYzE0ZWQ1OGMz","state":"CfDJ8OBFSG7UBTpHnHg3aCC615iducqo0xy-oMy8n2AYHLbB-AZ2N7RSM_P1zGyVvbRGxbj_ybsmScNlB4Uaoi35yRyZd_nYt_eNg67SW-O0Ctakm63Ilw7DFfM8BJbv_BnXPLe26gfylUwM0-uZ-hNOy_T7KcxtAPqcaBpkTknEzAez","x-client-SKU":"ID_NETSTANDARD2_0","x-client-ver":"5.3.0.0"},"$type":"AuthorizeRequestValidationLog"}
复制代码


环境变量
  1. PORTAL_URI="bi.tsjyy.cn:81"
  2. WYN_PORTAL_PORT=81
  3. WYN_SERVER_PORT=51981
  4. WYN_REPORTING_WORKER_PORT=51982
  5. WYN_COT_WORKER_PORT=51983
  6. WYN_HOST_NAME="bi.tsjyy.cn"
复制代码

启动配置

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <SystemConfig xmlns:sys="https://extendedxmlserializer.github.io/system" xmlns="clr-namespace:ConfigMigration.Configuration.V32;assembly=ConfigMigration">
  3. <Version>3.2</Version>
  4. <GlobalSettings>
  5. <IdentityServerUrl>http://$PORTAL_URI</IdentityServerUrl>
  6. </GlobalSettings>
  7. <Services>
  8. <Server>
  9. <Urls>http://*:$WYN_SERVER_PORT</Urls>
  10. <Storage>
  11. <Engine>$DB_PROVIDER</Engine>
  12. <ConnectionString>$DATABASE_CONNECTIONSTRING_SERVER</ConnectionString>
  13. </Storage>
  14. <DataExtraction>
  15. <StorageType>$DB_PROVIDER</StorageType>
  16. <ConnectionString>$DATABASE_CONNECTIONSTRING_DATACACHE</ConnectionString>
  17. </DataExtraction>
  18. </Server>
  19. <Portal>
  20. <Urls>http://*:$WYN_PORTAL_PORT</Urls>
  21. <AuthorizedWebApplicationUrls>
  22. <sys:string>http://$PORTAL_URI</sys:string>
  23. </AuthorizedWebApplicationUrls>
  24. <StorageProvider>$DB_PROVIDER</StorageProvider>
  25. <ConnectionString>$DATABASE_CONNECTIONSTRING_IS</ConnectionString>
  26. </Portal>
  27. <Worker>
  28. <Urls>http://$WYN_HOST_NAME:$WYN_REPORTING_WORKER_PORT</Urls>
  29. </Worker>
  30. <CotWorker>
  31. <Urls>http://$WYN_HOST_NAME:$WYN_COT_WORKER_PORT</Urls>
  32. </CotWorker>
  33. </Services>
  34. </SystemConfig>
复制代码


1 个回复

倒序浏览
James.Lv讲师达人认证 悬赏达人认证 活字格认证 Wyn认证
超级版主   /  发表于:2021-5-27 19:12:47
沙发
您好,您从官网下载最新版进行安装
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部