Giter VIP home page Giter VIP logo

Comments (3)

SmallChi avatar SmallChi commented on May 28, 2024

可以先把grpc和tcp转发的配置给注释掉然后在运行。

from jt808gateway.

fieldsye avatar fieldsye commented on May 28, 2024

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.

SmallChi avatar SmallChi commented on May 28, 2024

1.这个错误是因为需要打开另外一个tcp的服务器来接收808转发过来的数据,没有这个tcp的服务器他就会报错,但是自动几秒内自行重连,这个错误是可以忽略的;
2.Application is shutting down...再应用程序关闭的时候,可能由于Udp的服务还在接收打开的状态,但是socket已经释放了,所以才会报错,这个错误也可以忽略,但是可以改进这个错误;
3.不好意思,我没有Ubuntu 18.04 的系统,但是我再centos7下面添加grpc后也是正常运行的。
grpc
grpc-client

from jt808gateway.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.