fjykTec / ModernWMS

The open source simple and complete warehouse management system is derived from our many years of experience in implementing erp projects. We stripped the original commercial system wms function and opened it up for free, hoping to help the majority of small and medium-sized enterprises. At present, the system supports cross-platform。
https://modernwms.ikeyly.com/
Apache License 2.0
864 stars 270 forks source link

全新第一次安装无法登录 #38

Closed aflyhorse closed 2 months ago

aflyhorse commented 2 months ago

我使用docker安装方法,首先尝试了 pull modernwms/modernwms:1.0 ,发现该包是一年前发布的,试用过程中发现有bug,如添加商品后无法再修改商品(修改会显示operation failed),估摸着可能当时的镜像有点问题;故选择了第二条自行打包最新版本编译

按步骤编译完成后,登录界面登录即直接超时,POST http://127.0.0.1:20011/login?culture=zh-cn状态NS_BINDING_ABORTED,后台日志显示如下

2024-08-29 06:05:13.8671||DEBUG|Microsoft.AspNetCore.Server.Kestrel.Connections|Connection id "0HN67TS84CQ6O" started. 
2024-08-29 06:05:13.8671||INFO|Microsoft.AspNetCore.Hosting.Diagnostics|Request starting HTTP/1.1 OPTIONS http://127.0.0.1:20011/login?culture=zh-cn - - 
2024-08-29 06:05:13.8671||TRACE|Microsoft.AspNetCore.HostFiltering.HostFilteringMiddleware|All hosts are allowed. 
2024-08-29 06:05:13.8671||DEBUG|Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware|OPTIONS requests are not supported 
2024-08-29 06:05:13.8671||DEBUG|Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware|OPTIONS requests are not supported 
2024-08-29 06:05:13.8671||DEBUG|Microsoft.AspNetCore.Routing.Matching.DfaMatcher|1 candidate(s) found for the request path '/login' 
2024-08-29 06:05:13.8671||DEBUG|Microsoft.AspNetCore.Routing.EndpointRoutingMiddleware|Request matched endpoint '405 HTTP Method Not Supported' 
2024-08-29 06:05:13.8671||DEBUG|Microsoft.AspNetCore.Server.Kestrel.Connections|Connection id "0HN67TS84CQ6O" completed keep alive response. 
2024-08-29 06:05:13.8671||INFO|Microsoft.AspNetCore.Hosting.Diagnostics|Request finished HTTP/1.1 OPTIONS http://127.0.0.1:20011/login?culture=zh-cn - - - 200 0 - 3.1061ms 
2024-08-29 06:05:13.9664||INFO|Microsoft.AspNetCore.Hosting.Diagnostics|Request starting HTTP/1.1 POST http://127.0.0.1:20011/login?culture=zh-cn application/json 68 
2024-08-29 06:05:13.9664||TRACE|Microsoft.AspNetCore.HostFiltering.HostFilteringMiddleware|All hosts are allowed. 
2024-08-29 06:05:13.9664||DEBUG|Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware|POST requests are not supported 
2024-08-29 06:05:13.9664||DEBUG|Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware|POST requests are not supported 
2024-08-29 06:05:13.9664||DEBUG|Microsoft.AspNetCore.Routing.Matching.DfaMatcher|1 candidate(s) found for the request path '/login' 
2024-08-29 06:05:13.9664||DEBUG|Microsoft.AspNetCore.Routing.Matching.DfaMatcher|Endpoint 'ModernWMS.Core.Controller.AccountController.LoginAsync (ModernWMS.Core)' with route pattern 'login' is valid for the request path '/login' 
2024-08-29 06:05:13.9664||DEBUG|Microsoft.AspNetCore.Routing.EndpointRoutingMiddleware|Request matched endpoint 'ModernWMS.Core.Controller.AccountController.LoginAsync (ModernWMS.Core)' 
2024-08-29 06:05:13.9664||DEBUG|Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerHandler|AuthenticationScheme: Bearer was not authenticated. 
2024-08-29 06:05:13.9664||INFO|Microsoft.AspNetCore.Routing.EndpointMiddleware|Executing endpoint 'ModernWMS.Core.Controller.AccountController.LoginAsync (ModernWMS.Core)' 
2024-08-29 06:05:13.9664||INFO|Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker|Route matched with {action = "Login", controller = "Account"}. Executing controller action with signature System.Threading.Tasks.Task`1[ModernWMS.Core.Models.ResultModel`1[ModernWMS.Core.Models.LoginOutputViewModel]] LoginAsync(ModernWMS.Core.Models.LoginInputViewModel) on controller ModernWMS.Core.Controller.AccountController (ModernWMS.Core). 
2024-08-29 06:05:13.9664||DEBUG|Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker|Execution plan of authorization filters (in the following order): None 
2024-08-29 06:05:13.9664||DEBUG|Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker|Execution plan of resource filters (in the following order): None 
2024-08-29 06:05:13.9664||DEBUG|Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker|Execution plan of action filters (in the following order): Microsoft.AspNetCore.Mvc.ModelBinding.UnsupportedContentTypeFilter (Order: -3000), ModernWMS.Core.Middleware.ViewModelActionFiter (Order: 0) 
2024-08-29 06:05:13.9664||DEBUG|Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker|Execution plan of exception filters (in the following order): None 
2024-08-29 06:05:13.9664||DEBUG|Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker|Execution plan of result filters (in the following order): Microsoft.AspNetCore.Mvc.Infrastructure.ClientErrorResultFilter (Order: -2000), ModernWMS.Core.Middleware.ViewModelActionFiter (Order: 0), Microsoft.AspNetCore.Mvc.ProducesAttribute (Order: 0) 
2024-08-29 06:05:13.9664||DEBUG|Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker|Executing controller factory for controller ModernWMS.Core.Controller.AccountController (ModernWMS.Core) 
2024-08-29 06:05:13.9664||DEBUG|Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker|Executed controller factory for controller ModernWMS.Core.Controller.AccountController (ModernWMS.Core) 
2024-08-29 06:05:13.9762||DEBUG|Microsoft.AspNetCore.Mvc.ModelBinding.ParameterBinder|Attempting to bind parameter 'loginAccount' of type 'ModernWMS.Core.Models.LoginInputViewModel' ... 
2024-08-29 06:05:13.9762||DEBUG|Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BodyModelBinder|Attempting to bind parameter 'loginAccount' of type 'ModernWMS.Core.Models.LoginInputViewModel' using the name '' in request data ... 
2024-08-29 06:05:13.9762||DEBUG|Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BodyModelBinder|Rejected input formatter 'Microsoft.AspNetCore.Mvc.Formatters.NewtonsoftJsonPatchInputFormatter' for content type 'application/json'. 
2024-08-29 06:05:13.9762||DEBUG|Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BodyModelBinder|Selected input formatter 'Microsoft.AspNetCore.Mvc.Formatters.NewtonsoftJsonInputFormatter' for content type 'application/json'. 
2024-08-29 06:05:13.9762||DEBUG|Microsoft.AspNetCore.Server.Kestrel|Connection id "0HN67TS84CQ6O", Request id "0HN67TS84CQ6O:00000002": started reading request body. 
2024-08-29 06:05:13.9762||DEBUG|Microsoft.AspNetCore.Server.Kestrel|Connection id "0HN67TS84CQ6O", Request id "0HN67TS84CQ6O:00000002": done reading request body. 
2024-08-29 06:05:13.9762||DEBUG|Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BodyModelBinder|Done attempting to bind parameter 'loginAccount' of type 'ModernWMS.Core.Models.LoginInputViewModel'. 
2024-08-29 06:05:13.9762||DEBUG|Microsoft.AspNetCore.Mvc.ModelBinding.ParameterBinder|Done attempting to bind parameter 'loginAccount' of type 'ModernWMS.Core.Models.LoginInputViewModel'. 
2024-08-29 06:05:13.9762||DEBUG|Microsoft.AspNetCore.Mvc.ModelBinding.ParameterBinder|Attempting to validate the bound parameter 'loginAccount' of type 'ModernWMS.Core.Models.LoginInputViewModel' ... 
2024-08-29 06:05:13.9762||DEBUG|Microsoft.Extensions.Localization.ResourceManagerStringLocalizer|ResourceManagerStringLocalizer searched for 'user_name' in 'ModernWMS.Core.MultiLanguage' with culture 'zh-CN'. 
2024-08-29 06:05:13.9762||DEBUG|Microsoft.Extensions.Localization.ResourceManagerStringLocalizer|ResourceManagerStringLocalizer searched for 'user_name' in 'ModernWMS.Core.MultiLanguage' with culture 'zh-CN'. 
2024-08-29 06:05:13.9762||DEBUG|Microsoft.Extensions.Localization.ResourceManagerStringLocalizer|ResourceManagerStringLocalizer searched for 'password' in 'ModernWMS.Core.MultiLanguage' with culture 'zh-CN'. 
2024-08-29 06:05:13.9762||DEBUG|Microsoft.Extensions.Localization.ResourceManagerStringLocalizer|ResourceManagerStringLocalizer searched for 'password' in 'ModernWMS.Core.MultiLanguage' with culture 'zh-CN'. 
2024-08-29 06:05:13.9762||DEBUG|Microsoft.AspNetCore.Mvc.ModelBinding.ParameterBinder|Done attempting to validate the bound parameter 'loginAccount' of type 'ModernWMS.Core.Models.LoginInputViewModel'. 
2024-08-29 06:05:13.9762||TRACE|Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker|Action Filter: Before executing OnActionExecuting on filter Microsoft.AspNetCore.Mvc.ModelBinding.UnsupportedContentTypeFilter. 
2024-08-29 06:05:13.9762||TRACE|Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker|Action Filter: After executing OnActionExecuting on filter Microsoft.AspNetCore.Mvc.ModelBinding.UnsupportedContentTypeFilter. 
2024-08-29 06:05:13.9762||TRACE|Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker|Action Filter: Before executing OnActionExecutionAsync on filter ModernWMS.Core.Middleware.ViewModelActionFiter. 
2024-08-29 06:05:13.9762||INFO|Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker|Executing action method ModernWMS.Core.Controller.AccountController.LoginAsync (ModernWMS.Core) - Validation state: Valid 
2024-08-29 06:05:13.9762||TRACE|Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker|Executing action method ModernWMS.Core.Controller.AccountController.LoginAsync (ModernWMS.Core) with arguments (ModernWMS.Core.Models.LoginInputViewModel) 

......

2024-08-29 06:05:29.0723||TRACE|Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker|Action Filter: After executing OnActionExecutionAsync on filter ModernWMS.Core.Middleware.ViewModelActionFiter. 
2024-08-29 06:05:29.0723||TRACE|Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker|Action Filter: Before executing OnActionExecuted on filter Microsoft.AspNetCore.Mvc.ModelBinding.UnsupportedContentTypeFilter. 
2024-08-29 06:05:29.0729||TRACE|Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker|Action Filter: After executing OnActionExecuted on filter Microsoft.AspNetCore.Mvc.ModelBinding.UnsupportedContentTypeFilter. 
2024-08-29 06:05:29.0729||INFO|Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker|Executed action ModernWMS.Core.Controller.AccountController.LoginAsync (ModernWMS.Core) in 15103.4143ms 
2024-08-29 06:05:29.0729||INFO|Microsoft.AspNetCore.Routing.EndpointMiddleware|Executed endpoint 'ModernWMS.Core.Controller.AccountController.LoginAsync (ModernWMS.Core)' 
2024-08-29 06:05:29.0729||ERROR|ModernWMS.Core.Middleware.GlobalExceptionMiddleware|

IP:172.17.0.1,Exception:An exception has been raised that is likely due to a transient failure. Consider enabling transient error resiliency by adding 'EnableRetryOnFailure()' to the 'UseMySql' call.
StackTrace:   at Pomelo.EntityFrameworkCore.MySql.Storage.Internal.MySqlExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func`4 operation, Func`4 verifySucceeded, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable`1.AsyncEnumerator.MoveNextAsync()
   at Microsoft.EntityFrameworkCore.EntityFrameworkQueryableExtensions.ToListAsync[TSource](IQueryable`1 source, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.EntityFrameworkQueryableExtensions.ToListAsync[TSource](IQueryable`1 source, CancellationToken cancellationToken)
   at ModernWMS.Core.Services.AccountService.Login(LoginInputViewModel loginInput, CurrentUser currentUser) in /tmp/ModernWMS-master/backend/ModernWMS.Core/Services/AccountService.cs:line 41
   at ModernWMS.Core.Controller.AccountController.LoginAsync(LoginInputViewModel loginAccount) in /tmp/ModernWMS-master/backend/ModernWMS.Core/Controller/AccountController.cs:line 77
   at lambda_method14(Closure, Object)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Logged|12_1(ControllerActionInvoker invoker)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker)
   at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
   at Microsoft.AspNetCore.Localization.RequestLocalizationMiddleware.Invoke(HttpContext context)
   at ModernWMS.Core.Middleware.GlobalExceptionMiddleware.Invoke(HttpContext context) in /tmp/ModernWMS-master/backend/ModernWMS.Core/Middleware/GlobalExceptionMiddleware.cs:line 52 
2024-08-29 06:05:29.0729||DEBUG|Microsoft.Extensions.Localization.ResourceManagerStringLocalizer|ResourceManagerStringLocalizer searched for 'operation_failed' in 'ModernWMS.Core.MultiLanguage' with culture ''. 
2024-08-29 06:05:29.0729||INFO|Microsoft.AspNetCore.Hosting.Diagnostics|Request finished HTTP/1.1 POST http://127.0.0.1:20011/login?culture=zh-cn application/json 68 - 200 - application/json 15115.4099ms 
2024-08-29 06:05:29.0729||DEBUG|Microsoft.AspNetCore.Server.Kestrel.Connections|Connection id "0HN67TS84CQ6O" stopped. 

看起来像是数据库连接方面的问题,之前也有Issue提到说sqlite即将不支持,请改用mysql/pgsql,但Dockerfile里除了ubuntu+donetsdk+nodejs外好像没有叠加到sql相关的image?Readme里也只字未提修改/配置数据库的事情。

PS. Nodejs16.x已在2023年EOL,有升级到20.x的打算么?而且如上个issue所提,使用的.NET 7.0其实现在也已经EOS了。

ModernWMS commented 2 months ago

可以下载源码直接安装么?

另外 , Nodejs16.x已在2023年EOL,有升级到20.x的打算么?而且如上个issue所提,使用的.NET 7.0其实现在也已经EOS了。 没有用到版本才有的特性, 理论上讲是支持的,你可以直接把配置改下,重新编译试下,

aflyhorse commented 2 months ago

用Dockerfile Approach 2的方式编译应该和下载源码安装差不多吧……都是拉取sourcecode,用.net sdk编译后端,用nodejs编译前端,只是最后运行时依赖的封装简化了一下; 此外Dockerfile缺了EXPOSE 20011端口,ENTRYPOINT也应该直接改成/app/run.sh

已在测试其他品牌的wms了(您这款功能较复杂,从提交入库单到完成上架中间有太多步骤,如签收、分拣etc,也不能设置跳过的选项,不太符合我的使用场景)。感谢您的贡献和付出。