craigerl / aprsd

Amateur radio APRS daemon which listens for messages and responds. By KM6LYW.
Apache License 2.0
120 stars 19 forks source link

Unable to start server #78

Closed jschollenberger closed 2 years ago

jschollenberger commented 2 years ago

Hi!

I'm new to aprsd and just started setting it up. I pip installed, made a config, and I can't get the server started:

  File "/usr/local/bin/aprsd", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.9/dist-packages/aprsd/aprsd.py", line 73, in main
    cli()
  File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 1137, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 1062, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 1668, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 763, in invoke
    return __callback(*args, **kwargs)
  File "/usr/local/lib/python3.9/dist-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/local/lib/python3.9/dist-packages/aprsd/cli_helper.py", line 65, in new_func
    return f(*args, **kwargs)
  File "/usr/local/lib/python3.9/dist-packages/aprsd/cmds/server.py", line 70, in server
    if not client.factory.is_client_enabled():
  File "/usr/local/lib/python3.9/dist-packages/aprsd/client.py", line 196, in is_client_enabled
    enabled |= self._builders[key].is_enabled(self.config)
TypeError: unsupported operand type(s) for |=: 'bool' and 'NoneType'

Full output: https://gist.github.com/jschollenberger/ac8c680353f7209b91956bfec06810aa

My config is pretty vanilla. I just entered my call, aprs password, and a few other values: https://gist.github.com/jschollenberger/e850ed1be3e5b31d158a5f0c7b66db94

Thanks for any hints in the right direction.

73 Jason

hemna commented 2 years ago

Hi Jason, I tested your config with the latest aprsd and I was able to reproduce the issue. I have a fix for it here: https://github.com/craigerl/aprsd/pull/79

If you don't want to use aprsd from git, then you can apply a simple workaround.
Just remove the entire kiss: block from your config for the time being and it will work.

I will release a new version of aprsd that will include the fix soon.

jschollenberger commented 2 years ago

Hi Walter,

Thanks for the quick reply! Removing the kiss block got it going. I didn't plan on using a modem at all, just APRS-IS. Is RF a requirement?

I am currently troubleshooting why I can send messages manually, but when I receive a ping message it doesn't increment the aprsd.plugins.ping.PingPlugin processed/sent packets and the reply just spins in the "send messages" tab.

[12/11/2021] [01:26:22 PM] [WEB_SEND_MSG-(mycall] [ERROR] XXXXXX Haven't completed everything in 60 seconds. BAIL! - [/usr/local/lib/python3.9/dist-packages/aprsd/flask.py:256]

Jason

hemna commented 2 years ago

Hi Jason, that typically happens when the web send message never gets an ack back from the recipient. Do you have all the logs around your send message attempt?

This is the log from my local attempt to use the web send message to ping another instance of aprsd I have running.

12/11/2021 10:30:16 AM RXPKT-WB4BOR-2>A     DEBUG    Starting                                                                        threads.py:74
12/11/2021 10:30:16 AM RXPKT-WB4BOR-2>A     INFO                                                                                  messaging.py:579
                                                     Received Message _______________
                                                       Raw     : WB4BOR-2>APZ100,TCPIP*,qAC,T2BC::WB4BOR-12:ping{6
                                                       From    : WB4BOR-2
                                                       Message : ping
                                                       Msg #   : 6
                                                     Received Message _______________ Complete
12/11/2021 10:30:16 AM RXPKT-WB4BOR-2>A     DEBUG    Send ACK(WB4BOR-2:6) to radio.                                               messaging.py:450
12/11/2021 10:30:16 AM SendAck-6            DEBUG    Starting                                                                        threads.py:74
12/11/2021 10:30:16 AM RXPKT-WB4BOR-2>A     DEBUG    ==> process: call "{'self': <aprsd.plugins.ping.PingPlugin object at              trace.py:48
                                                     0x10e2b68b0>, 'packet': {'raw':
                                                     'WB4BOR-2>APZ100,TCPIP*,qAC,T2BC::WB4BOR-12:ping{6', 'from': 'WB4BOR-2', 'to':
                                                     'APZ100', 'path': ['TCPIP*', 'qAC', 'T2BC'], 'via': 'T2BC', 'addresse':
                                                     'WB4BOR-12', 'format': 'message', 'message_text': 'ping', 'msgNo': '6', 'ts':
                                                     1639236616.651525}}"
12/11/2021 10:30:16 AM SendAck-6            DEBUG    GET client aprsis                                                               client.py:188
12/11/2021 10:30:16 AM RXPKT-WB4BOR-2>A     INFO     PingPlugin                                                                         ping.py:19
12/11/2021 10:30:16 AM SendAck-6            INFO                                                                                  messaging.py:579
                                                     Sending ack _______________
                                                       Raw     : WB4BOR-12>APZ100::WB4BOR-2 :ack6
                                                       To      : WB4BOR-2
                                                       Ack     : 6
                                                     Sending ack _______________ Complete
12/11/2021 10:30:16 AM RXPKT-WB4BOR-2>A     DEBUG    <== process: return (72ms) 'Pong! 10:30:16'                                       trace.py:80
12/11/2021 10:30:16 AM RXPKT-WB4BOR-2>A     DEBUG    Sending 'Pong! 10:30:16'                                                       threads.py:294
12/11/2021 10:30:16 AM RXPKT-WB4BOR-2>A     DEBUG    Length of MsgTrack is 1                                                      messaging.py:325
12/11/2021 10:30:16 AM SendMessage-2-Pong!  DEBUG    Starting                                                                        threads.py:74
12/11/2021 10:30:16 AM RXPKT-WB4BOR-2>A     DEBUG    Packet processing complete                                                     threads.py:325
12/11/2021 10:30:16 AM SendMessage-2-Pong!  INFO                                                                                  messaging.py:579
                                                     Sending Message _______________
                                                       Raw     : WB4BOR-12>APZ100::WB4BOR-2 :Pong! 10:30:16{2
                                                       To      : WB4BOR-2
                                                       Message : Pong! 10:30:16
                                                       Msg #   : 2
                                                     Sending Message _______________ Complete
12/11/2021 10:30:16 AM RXPKT-WB4BOR-2>A     DEBUG    Exiting                                                                         threads.py:80
12/11/2021 10:30:16 AM SendMessage-2-Pong!  DEBUG    GET cli
hemna commented 2 years ago

Fix is in 2.5.7 for this issue.