gotthardp / lorawan-server

Compact server for private LoRaWAN networks
https://gotthardp.github.io/lorawan-server
MIT License
946 stars 327 forks source link

Erlang shuts down when starting lorawan-server. Ubuntu 22 #845

Open TecsolAus opened 8 months ago

TecsolAus commented 8 months ago

This is a new installation. Erlang is installed, compiles and runs the "hello world" test script. When running sudo systemctl start lorawan-server, and then sudo systemctl status lorawan-server I get an error:

× lorawan-server.service - LoRaWAN Server Loaded: loaded (/lib/systemd/system/lorawan-server.service; disabled; vendor preset: enabled) Active: failed (Result: exit-code) since Wed 2024-01-10 12:51:02 AEDT; 9min ago Process: 1240608 ExecStart=/usr/lib/lorawan-server/bin/lorawan-server (code=exited, status=1/FAILURE) Main PID: 1240608 (code=exited, status=1/FAILURE) CPU: 1.234s

Jan 10 12:51:01 5-ubu22-04 systemd[1]: Started LoRaWAN Server. Jan 10 12:51:02 5-ubu22-04 lorawan-server[1240652]: [os_mon] memory supervisor port (memsup): Erlang has closed Jan 10 12:51:02 5-ubu22-04 lorawan-server[1240653]: [os_mon] cpu supervisor port (cpu_sup): Erlang has closed Jan 10 12:51:02 5-ubu22-04 lorawan-server[1240614]: {"init terminating in do_boot",{{badmatch,{error,{lorawan_server,{{notsup,[{crypto,notsup_to_error,1,[{file,"crypto.erl"},> Jan 10 12:51:02 5-ubu22-04 lorawan-server[1240614]: init terminating in do_boot ({{badmatch,{error,{lorawanserver,{}}}},[{lorawanapp,start,0,[{},{_}]},{init,start_em,1,[]> Jan 10 12:51:02 5-ubu22-04 lorawan-server[1240614]: Jan 10 12:51:02 5-ubu22-04 lorawan-server[1240614]: Crash dump is being written to: erl_crash.dump...done Jan 10 12:51:02 5-ubu22-04 systemd[1]: lorawan-server.service: Main process exited, code=exited, status=1/FAILURE Jan 10 12:51:02 5-ubu22-04 systemd[1]: lorawan-server.service: Failed with result 'exit-code'. Jan 10 12:51:02 5-ubu22-04 systemd[1]: lorawan-server.service: Consumed 1.234s CPU time.

I'm not sure where to go here to debug the issue. It appears lorawan-server is causing Erlang to crash completely.

regards, james@tecsol.com.au

massiekris commented 1 month ago

I had a similar problem. As it turned out, the problem was related to the OS (Ubuntu 22) using OpenSSL3.0.x, which caused and error in the crypto.erl file. I uninstalled OpenSSL3.0.x and installed OpenSSL 1.1.1w and the problem was fixed.

regards,

Kris