Comments (3)
可以先把grpc和tcp转发的配置给注释掉然后在运行。
from jt808gateway.
Thanks for your quickly response! the JT808.Gateway.SimpleServer can run after comment the grpc in Program.cs, even there is fail as below.
~/dotnet/JT808Gateway/simples/JT808.Gateway.SimpleServer# dotnet run
dbug: Microsoft.Extensions.Hosting.Internal.Host[1]
Hosting starting
info: JT808TcpServer[0]
JT808 TCP Server start at 0.0.0.0:808.
info: JT808TcpReceiveTimeout[0]
[Check Receive Timeout]
info: JT808TcpReceiveTimeout[0]
[Session Online Count]:0
info: JT808UdpServer[0]
JT808 Udp Server start at 0.0.0.0:808.
info: JT808UdpReceiveTimeout[0]
[Check Receive Timeout]
info: JT808UdpReceiveTimeout[0]
[Session Online Count]:0
info: Microsoft.Hosting.Lifetime[0]
Application started. Press Ctrl+C to shut down.
info: Microsoft.Hosting.Lifetime[0]
Hosting environment: Production
info: Microsoft.Hosting.Lifetime[0]
Content root path: /root/dotnet/JT808Gateway/simples/JT808.Gateway.SimpleServer/bin/Debug/netcoreapp3.1/
dbug: Microsoft.Extensions.Hosting.Internal.Host[2]
Hosting started
fail: JT808TransmitService[0]
初始化配置链接远程服务端all_127.0.0.1:20000,链接异常:System.Net.Internals.SocketExceptionFactory+ExtendedSocketException (111): Connection refused 127.0.0.1:20000
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw(Exception source)
at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult)
at System.Net.Sockets.Socket.<>c.b__274_0(IAsyncResult iar)
--- End of stack trace from previous location where exception was thrown ---
at JT808.Gateway.Transmit.JT808TransmitService.InitRemoteServsers()
info: JT808TcpServer[0]
[Connected]:127.0.0.1:37196
info: JT808TcpServer[0]
[Connected]:127.0.0.1:37198
dbug: JT808TcpServer[0]
[Atomic Success Counter]:1
trce: JT808TcpServer[0]
[Accept Hex 127.0.0.1:37196]:7E010000310111111111110001000000004B6F696B653030314B6F696B653030313030303030303030303030304B6F696B6530303102D4C1413132333435347E
dbug: JT808NormalReplyMessageHandlerImpl[0]
可以自定义添加一些东西:上下行日志、数据转发
dbug: JT808SessionNoticeService[0]
JT808SessionOnline-11111111111
dbug: JT808MsgLogging[0]
up-11111111111-7E010000310111111111110001000000004B6F696B653030314B6F696B653030313030303030303030303030304B6F696B6530303102D4C1413132333435347E
dbug: JT808MsgLogging[0]
down-11111111111-7E8100000F01111111111100010001004A3131313131313131313131E57E
dbug: JT808TcpServer[0]
[Atomic Success Counter]:2
trce: JT808TcpServer[0]
[Accept Hex 127.0.0.1:37196]:7E01020004011111111111000231323334117E
dbug: JT808NormalReplyMessageHandlerImpl[0]
可以自定义添加一些东西:上下行日志、数据转发
dbug: JT808MsgLogging[0]
up-11111111111-7E01020004011111111111000231323334117E
dbug: JT808MsgLogging[0]
down-11111111111-7E8001000501111111111100020002010200977E
dbug: JT808TcpServer[0]
[Atomic Success Counter]:3
trce: JT808TcpServer[0]
[Accept Hex 127.0.0.1:37196]:7E0200001C0111111111110003000000050000000A0001ADB0000186A000320032001E200529200220297E
dbug: JT808NormalReplyMessageHandlerImpl[0]
可以自定义添加一些东西:上下行日志、数据转发
dbug: JT808MsgLogging[0]
up-11111111111-7E0200001C0111111111110003000000050000000A0001ADB0000186A000320032001E200529200220297E
dbug: JT808NormalReplyMessageHandlerImpl[0]
重写自带Msg0x0200的消息
dbug: JT808MsgLogging[0]
down-11111111111-7E8001000501111111111100030003020000967E
^Cinfo: Microsoft.Hosting.Lifetime[0]
Application is shutting down...
dbug: Microsoft.Extensions.Hosting.Internal.Host[3]
Hosting stopping
info: JT808UdpServer[0]
808 Udp Server Stop
fail: JT808UdpServer[0]
Received Bytes
System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'System.Net.Sockets.Socket'.
at System.Net.Sockets.Socket.EndReceiveMessageFrom(IAsyncResult asyncResult, SocketFlags& socketFlags, EndPoint& endPoint, IPPacketInformation& ipPacketInformation)
at System.Net.Sockets.Socket.<>c.b__284_0(IAsyncResult iar)
--- End of stack trace from previous location where exception was thrown ---
at JT808.Gateway.JT808UdpServer.<>c__DisplayClass12_0.<b__0>d.MoveNext()
from jt808gateway.
1.这个错误是因为需要打开另外一个tcp的服务器来接收808转发过来的数据,没有这个tcp的服务器他就会报错,但是自动几秒内自行重连,这个错误是可以忽略的;
2.Application is shutting down...再应用程序关闭的时候,可能由于Udp的服务还在接收打开的状态,但是socket已经释放了,所以才会报错,这个错误也可以忽略,但是可以改进这个错误;
3.不好意思,我没有Ubuntu 18.04 的系统,但是我再centos7下面添加grpc后也是正常运行的。
from jt808gateway.
Related Issues (20)
- Pipeline与DotNetty版本性能方面有差异吗? HOT 3
- Pipeline版本怎么集成LengthFieldBasedFrameDecoder协议? HOT 8
- 能否增加设备自定义协议处理方式? HOT 12
- IJT808MsgConsumer等接口OnMessage的元组参数问题 HOT 2
- 关于平台主动给设备下发指令 HOT 5
- 出现异常后无法继续接收并处理下个JT808包 HOT 2
- 有单独控制网关的start,stop功能吗 HOT 3
- StatusFlag 哪个状态是点火 哪个是熄火 HOT 2
- 运行JT808.Gateway.SimpleServer报错,不能连接127.0.0.1:20000 HOT 1
- 通过WebApi接口UnificationSend向设备发送消息后,拿不到设备返回的消息 HOT 1
- GPS 设备超过2台,Channel 会频繁断开,倒置GPS设备重新注册 、鉴权. HOT 1
- 压测发现tcp并发到1200时会出现延时了(网关添加kafka) HOT 1
- Docker 下报错,ubuntu 下运行也是这个错,我弄到 CentOS 没问题,但是 在CentOS 下 Docker 就报错 HOT 3
- SocketOptionName.NoDelay 设置 True 的时候 在Docker 运行会报错 HOT 4
- 大神,这个包在源码中没找到,JT808.DotNetty.Transmit HOT 2
- 运行找不到appsettings.json文件 HOT 4
- 基于core 3.1 Pipeline 这种方式客户端有测试的程序吗? HOT 1
- 有使用简单介绍说明么?
- HTML5中使用websocket怎么使用此网关进行数据同步 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jt808gateway.