There were some issues with cleanup on exit, not properly removing the API socket.  To cure this, when pydecnet is not running, rm /tmp/decnetapi.sock (or whatever name you specified in the "api" config line).  Then pydecnet should start.

paul

On Jul 8, 2024, at 8:42 PM, Mike Kostersitz <mikekostersitz@gmail.com> wrote:

Thanks Paul,

One thing I noticed by simply installing the new version with pip3 install http://akdesign.dyndns.org:8080/resources/public/decnet-1.1.0rc2-py3-none-any.whl is that it fails to launch 

2024-07-08 17:34:29.185: THEARK: Initializing API server on /tmp/decnetapi.sock
Traceback (most recent call last):
  File "/usr/local/bin/pydecnet", line 11, in <module>
    load_entry_point('decnet==1.1.0rc2', 'console_scripts', 'pydecnet')()
  File "/usr/local/lib/python3.7/dist-packages/decnet-1.1.0rc2-py3.7.egg/decnet/main.py", line 208, in main
    api = apiserver.ApiServer (api, nodes)
  File "/usr/local/lib/python3.7/dist-packages/decnet-1.1.0rc2-py3.7.egg/decnet/apiserver.py", line 145, in __init__
    raise RuntimeError ("Another socket server is already running")
RuntimeError: Another socket server is already running

I needed to explicitly kill the old instance that was left behind
HTTPS is not working though 
This is my http.conf
http -4 --http-port 8000 --https-port 8443 --certificate /etc/letsencrypt/live/the-ark.ddns.net/fullchain.pem


This is the launch log

2024-07-08 17:34:49.472: MainThread main.py.176:  command line: /usr/local/bin/pydecnet --daemon --log-config /home/pi/dev-logging.json /home/pi/theark.conf /home/pi/http.conf
2024-07-08 17:34:49.473: MainThread config.py.486: Reading config /home/pi/theark.conf
2024-07-08 17:35:04.486: MainThread config.py.486: Reading config /home/pi/http.conf
2024-07-08 17:35:04.597: THEARK node.py.177: Initializing node THEARK
2024-07-08 17:35:04.849: THEARK datalink.py.44: Initializing data link layer
2024-07-08 17:35:04.865: THEARK datalink.py.63: Initialized Ethernet datalink ETH-1
2024-07-08 17:35:04.866: THEARK multinet.py.68: Multinet datalink MUL-1 initialized:
  Mode:   listen
  Dest:   decnet.jfcl.com:0
  Source: None:700
2024-07-08 17:35:04.887: THEARK datalink.py.63: Initialized Multinet datalink MUL-1
2024-07-08 17:35:04.887: THEARK multinet.py.68: Multinet datalink MUL-2 initialized:
  Mode:   listen
  Dest:   192.168.0.131:0
  Source: None:700
2024-07-08 17:35:04.888: THEARK datalink.py.63: Initialized Multinet datalink MUL-2
2024-07-08 17:35:04.889: THEARK mop.py.298: Initializing MOP layer
2024-07-08 17:35:04.889: THEARK mop.py.309: Initialized MOP circuit ETH-1
2024-07-08 17:35:04.891: THEARK routing.py.327: Initializing routing layer
2024-07-08 17:35:04.893: THEARK datalink.py.811: <decnet.ethernet.EthPort object at 0x75a2b330> protocol 60-03 added
2024-07-08 17:35:04.893: THEARK datalink.py.792: <decnet.ethernet.EthPort object at 0x75a2b330> multicast address ab-00-00-03-00-00 added
2024-07-08 17:35:04.894: THEARK timers.py.167: Started 10.00 second timeout for <decnet.routing.Update object at 0x75888ea0>
2024-07-08 17:35:04.895: THEARK timers.py.167: Started 600.00 second timeout for <decnet.routing.Update object at 0x75898300>
2024-07-08 17:35:04.895: THEARK timers.py.167: Started 600.00 second timeout for <decnet.routing.Update object at 0x75898450>
2024-07-08 17:35:04.897: THEARK nsp.py.110: Initializing NSP
2024-07-08 17:35:05.023: THEARK session.py.450: Session control object 19 (NML) module Module decnet.modules.nml
2024-07-08 17:35:05.024: THEARK session.py.450: Session control object 25 (MIRROR) module Module decnet.modules.mirror
2024-07-08 17:35:05.024: THEARK session.py.450: Session control object 26 (EVTLOG) module Module decnet.modules.evl
2024-07-08 17:35:05.025: THEARK session.py.450: Session control object 123 (PSTHRU) module File applications/pmr.py
2024-07-08 17:35:05.025: THEARK session.py.453: Session control object TOPOL module Module decnet.modules.topol
2024-07-08 17:35:05.026: THEARK apiserver.py.137: Initializing API server on /tmp/decnetapi.sock
2024-07-08 17:35:05.026: THEARK main.py.221: About to transition to daemon mode
2024-07-08 17:35:05.026: THEARK logging.py.358: DECnet/Python logging stopped





From: Paul Koning <paulkoning@comcast.net>
Sent: Monday, July 8, 2024 5:28 PM
To: The Hobbyist DECnet mailing list <hecnet@lists.dfupdate.se>
Subject: [HECnet] PyDECnet release candidate 2
 
I just released PyDECnet 1.1 rc2.  You can find kits at http://akdesign.dyndns.org:8080/resources/public/index.html (the "V1.1 release candidate 2" lines are it).

This contains a few bugfixes; a notable one makes HTTPS for the embedded web server work if you're running Python 3.12 or later.  (Thanks Wilm!)

I did a major rewrite of the "api-connecors.txt" documentation file, so now the recommended "Connectors" mechanism for writing PyDECnet applications and accessing its API should be a lot more useable.

Barring surprises I'll probably issue the final V1.1 release in a week or so.

        paul

_______________________________________________
HECnet mailing list -- hecnet@lists.dfupdate.se
To unsubscribe send an email to hecnet-leave@lists.dfupdate.se
_______________________________________________
HECnet mailing list -- hecnet@lists.dfupdate.se
To unsubscribe send an email to hecnet-leave@lists.dfupdate.se