Giter VIP home page Giter VIP logo

aprsc's Introduction

aprsc's People

Contributors

cceremuga avatar dschadlich avatar fkautz avatar herrfeuer avatar hessu avatar kd7lxl avatar phirephly avatar snip avatar termigrator avatar timi7007 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aprsc's Issues

randomize upstream servers

Would it be possible to randomly shuffle the upstream servers to avoid flooding the same server sequence?

Gettin data

So i want to get the data of client table to create an API, how i can get the data for easily from port 14501? Any suggestion of this?

High load scenarios - huge virtual memory mmaped.

Hi.
I'm pushing aprsc to the performance limits and found out that for RX packet rate exceeding continuous 5000 packets/sec is the limit.
Reverse engineering showed it is related to exhausted blocks (CELLBLOCKS_MAX = 200) for pbufs.
It looks that it is possible to increase RX packet rate by increasing CELLBLOCKS_MAX (please confirm) - this is fine.

However, during prolonged situation with exhausted blocks I observed huge reservation of virtual memory by aprsc proces. Reservation is increasing up to several terabytes, and memory is not unreserved at all, process restart is required.
Short analysis revealed that problem could be related to lack of virt. memory unmapping in buffer starvation situation.

In cellmalloc.c:100 there is such code:

	cb = mmap( NULL, ca->createsize, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON, -1, 0);
#endif
	if (cb == NULL || cb == (char*)-1)
	  return -1;

	if (ca->cellblocks_count >= CELLBLOCKS_MAX) return -1; 

It looks that memory "mmaped" is not unmapped when there is no cellblocks.
Following proposal of fix resolved problem, but I guess there are other possible ways of making this logic:

```
if (ca->cellblocks_count >= CELLBLOCKS_MAX)
{
	munmap(cb, ca->createsize);
	return -1;
}
Regards
Sylwester



servers without filtered clients do not need to store positions

Servers, such as the T2HUBs, which only have full feed ports available, do not need to maintain a position history table. It is only needed to support filters. Same for filter wx stations and entrycalls tables.

Stop populating them if the server only has full feed ports. Saves plenty of memory on a hub.

HTTP POST expectedly fails on APRS-IS 14580 port

Hi,

I am having a problem with posting APRS data to APRS.fi using http POST to server which is installed on aprsc

curl --verbose --data "user SQ4LOL pass 12345" poland.aprs2.net:14580
Rebuilt URL to: poland.aprs2.net:14580/
Trying 46.21.223.230...
TCP_NODELAY set
Connected to poland.aprs2.net (46.21.223.230) port 14580 (#0)
POST / HTTP/1.1
Host: poland.aprs2.net:14580
User-Agent: curl/7.55.1
Accept: */*
Content-Length: 22
Content-Type: application/x-www-form-urlencoded
upload completely sent off: 22 out of 22 bytes

aprsc 2.1.5-g8af3cdc
Invalid login command
Invalid login command
Connection #0 to host poland.aprs2.net left intact

everything is ok when using server running on javAPRSSrvr

curl --verbose --data "user SQ4LOL pass 12345" czech.aprs2.net:14580
Rebuilt URL to: czech.aprs2.net:14580/
Trying 89.235.48.27...
CP_NODELAY set
Connected to czech.aprs2.net (89.235.48.27) port 14580 (#0)
POST / HTTP/1.1
Host: czech.aprs2.net:14580
User-Agent: curl/7.55.1
Accept: */*
Content-Length: 22
Content-Type: application/x-www-form-urlencoded
upload completely sent off: 22 out of 22 bytes

javAPRSSrvr 3.15b08

any idea what is causing Invalid login command?

thanks in advance!

Logging of dropped packets containing NUL bytes is broken

The vsnprintf/snprintf functions used in hlog() stop string inclusion when a NUL is met. Thus, the logging of a dropped incoming packet stops at the first NUL, which can be confusing, especially if the packet is dropped because of the NUL.

Should translate binary characters to hex escapes.

APRS-IS Packets Being Denied

I've been having an issue for some time now. I've tested uses quite a few servers.
I also put it to the test even more so by creating my own APRSC server and testing.

Here's my issue. I have several APRS IGate stations, that are also digis, some within range of each station also. The ones in range of each other are set to be on the same server. I can use "Northwest.aprs2.net" for example.. or my own that I've created.

Whenever the each station beacons over RF, nothing shows up on aprs.fi or other sites, even though the other station heard the beacon. I confirm that it hears it by remotely accessing the computers and watching the live traffic.

If I use a different server on each station, and then beacon over RF, I can see the packet show up on aprs.fi and other sites.

The issue here is that sometimes these sites may temporarily lose internet, only for a brief moment of time. So it's not only the beacon packets that get lost, but some things being digipeated by one of the stations. And since it can't be gated by station when it loses internet for that minute, that the other station picks up the packet, it's lost for good.
The beacons over RF are also useful for being gated. Mostly for propagation and showing up online as an RF station.

Nobody has been able to explain this. It acts as if the server sees packets that are logged into the same server are duplicate and therefore tossed.

Should flag critical issues (no uplink, hangs) and display prominently on status page

When aprsc has a serious problem, it should make the status page reflect that in a very visible way, such as changing the tone of the background to slightly red, and displaying a descriptive error message at the top of the page.

Some situations that should be flagged:

  • Uplinks configured but none of them reachable
  • Hangs caused by resource starvation causing packet loss
  • OOM

Syntax issue in test 30filter-cmd

Test 30 reports an issue with unescaped left braces. The test still passes, but this will break in the future.

t/30filter-cmd.t ................. Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/^SERVER>[^,]+,TCPIP\*,qAZ,TESTING::N5CAL-2  :filter.*active{ <-- HERE .*$/ at t/30filter-cmd.t line 113.
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/^SERVER>[^,]+,TCPIP\*,qAZ,TESTING::N5CAL-2  :filter.*active{ <-- HERE .*$/ at t/30filter-cmd.t line 134.

Cygwin Version 4.4.12(3)-release (i686-pc-cygwin) not working

Hello,

when I use the application compiler I get the following error:

accept.c: In Funktion »accept_liveupgrade_single«:
accept.c:1160:40: Warnung: Zeigerziele bei Übergabe des Arguments 3 von »getpeername« unterscheiden sich im Vorzeichenbesitz [-Wpointer-sign]
if (getpeername(fd->valueint, &sa.sa, &addr_len) != 0) {
^
In file included from accept.c:24:0:
/usr/include/sys/socket.h:26:7: Anmerkung: »socklen_t * {aka int *}« erwartet, aber Argument hat Typ »unsigned int *«
int getpeername (int, struct sockaddr *__peer, socklen_t *);


The start of the application is also not possible:

$ ./aprsc.exe
2017/12/03 16:49:09.033399 aprsc[12800:20000008] WARNING: Configuration: setrlimit(RLIMIT_NOFILE) failed: Too many open files
2017/12/03 16:49:09.033498 aprsc[12800:20000008] WARNING: Configuration could not raise FileLimit (not running as root), it is now 3200
Segmentation fault (Speicherabzug geschrieben)


Cygwin Output (GNU bash, Version 4.4.12(3)-release (i686-pc-cygwin)):

thomas.schaefer@RAMPAGE-IV-E /usr/src/aprsc-master/src
$ ./configure
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking whether gcc needs -traditional... no
checking for GNU make... make
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking event2/event.h usability... yes
checking event2/event.h presence... yes
checking for event2/event.h... yes
checking event2/http.h usability... yes
checking event2/http.h presence... yes
checking for event2/http.h... yes
checking event2/buffer.h usability... yes
checking event2/buffer.h presence... yes
checking for event2/buffer.h... yes
checking for event_base_new in -levent... yes
checking sys/capability.h usability... no
checking sys/capability.h presence... no
checking for sys/capability.h... no
checking sys/prctl.h usability... no
checking sys/prctl.h presence... no
checking for sys/prctl.h... no
checking for cap_init in -lcap... no
checking sys/eventfd.h usability... no
checking sys/eventfd.h presence... no
checking for sys/eventfd.h... no
checking alloca.h usability... yes
checking alloca.h presence... yes
checking for alloca.h... yes
checking poll.h usability... yes
checking poll.h presence... yes
checking for poll.h... yes
checking sys/epoll.h usability... no
checking sys/epoll.h presence... no
checking for sys/epoll.h... no
checking netinet/sctp.h usability... no
checking netinet/sctp.h presence... no
checking for netinet/sctp.h... no
checking for atan2f... yes
checking for pthread_exit in -lpthread... yes
checking for getnameinfo... yes
checking for connect... yes
checking for gethostbyname... yes
checking for socket... yes
checking for socketpair... yes
checking for getnameinfo... (cached) yes
checking for gai_strerror... yes
checking for inet_ntop... yes
checking for inet_pton... yes
checking for __sync_fetch_and_add... yes
checking for library containing clock_gettime... none required
checking for setenv... yes
checking for putenv... yes
checking for library containing deflate... -lz
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating ac-hdrs.h
config.status: ac-hdrs.h is unchanged

thomas.schaefer@RAMPAGE-IV-E /usr/src/aprsc-master/src
$ make
gcc -g -O2 -march=i686 -Wall -Wstrict-prototypes -D_REENTRANT -c aprsc.c
gcc -g -O2 -march=i686 -Wall -Wstrict-prototypes -D_REENTRANT -c accept.c
accept.c: In Funktion »accept_liveupgrade_single«:
accept.c:1160:40: Warnung: Zeigerziele bei Übergabe des Arguments 3 von »getpeername« unterscheiden sich im Vorzeichenbesitz [-Wpointer-sign]
if (getpeername(fd->valueint, &sa.sa, &addr_len) != 0) {
^
In file included from accept.c:24:0:
/usr/include/sys/socket.h:26:7: Anmerkung: »socklen_t * {aka int *}« erwartet, aber Argument hat Typ »unsigned int *«
int getpeername (int, struct sockaddr *__peer, socklen_t *);
^~~~~~~~~~~
gcc -g -O2 -march=i686 -Wall -Wstrict-prototypes -D_REENTRANT -c worker.c
gcc -g -O2 -march=i686 -Wall -Wstrict-prototypes -D_REENTRANT -c errno_aprsc.c
gcc -g -O2 -march=i686 -Wall -Wstrict-prototypes -D_REENTRANT -c login.c
gcc -g -O2 -march=i686 -Wall -Wstrict-prototypes -D_REENTRANT -c incoming.c
gcc -g -O2 -march=i686 -Wall -Wstrict-prototypes -D_REENTRANT -c dupecheck.c
gcc -g -O2 -march=i686 -Wall -Wstrict-prototypes -D_REENTRANT -c outgoing.c
gcc -g -O2 -march=i686 -Wall -Wstrict-prototypes -D_REENTRANT -c clientlist.c
gcc -g -O2 -march=i686 -Wall -Wstrict-prototypes -D_REENTRANT -c client_heard.c
gcc -g -O2 -march=i686 -Wall -Wstrict-prototypes -D_REENTRANT -c parse_aprs.c
gcc -g -O2 -march=i686 -Wall -Wstrict-prototypes -D_REENTRANT -c parse_qc.c
gcc -g -O2 -march=i686 -Wall -Wstrict-prototypes -D_REENTRANT -c messaging.c
gcc -g -O2 -march=i686 -Wall -Wstrict-prototypes -D_REENTRANT -c config.c
gcc -g -O2 -march=i686 -Wall -Wstrict-prototypes -D_REENTRANT -c netlib.c
gcc -g -O2 -march=i686 -Wall -Wstrict-prototypes -D_REENTRANT -c xpoll.c
gcc -g -O2 -march=i686 -Wall -Wstrict-prototypes -D_REENTRANT -c acl.c
gcc -g -O2 -march=i686 -Wall -Wstrict-prototypes -D_REENTRANT -c cfgfile.c
gcc -g -O2 -march=i686 -Wall -Wstrict-prototypes -D_REENTRANT -c passcode.c
gcc -g -O2 -march=i686 -Wall -Wstrict-prototypes -D_REENTRANT -c uplink.c
gcc -g -O2 -march=i686 -Wall -Wstrict-prototypes -D_REENTRANT -c rwlock.c
gcc -g -O2 -march=i686 -Wall -Wstrict-prototypes -D_REENTRANT -c hmalloc.c
gcc -g -O2 -march=i686 -Wall -Wstrict-prototypes -D_REENTRANT -c hlog.c
gcc -g -O2 -march=i686 -Wall -Wstrict-prototypes -D_REENTRANT -c keyhash.c
gcc -g -O2 -march=i686 -Wall -Wstrict-prototypes -D_REENTRANT -c filter.c
gcc -g -O2 -march=i686 -Wall -Wstrict-prototypes -D_REENTRANT -c cellmalloc.c
gcc -g -O2 -march=i686 -Wall -Wstrict-prototypes -D_REENTRANT -c historydb.c
gcc -g -O2 -march=i686 -Wall -Wstrict-prototypes -D_REENTRANT -c counterdata.c
gcc -g -O2 -march=i686 -Wall -Wstrict-prototypes -D_REENTRANT -c status.c
gcc -g -O2 -march=i686 -Wall -Wstrict-prototypes -D_REENTRANT -c cJSON.c
gcc -g -O2 -march=i686 -Wall -Wstrict-prototypes -D_REENTRANT -c http.c
gcc -g -O2 -march=i686 -Wall -Wstrict-prototypes -D_REENTRANT -c ssl.c
gcc -g -O2 -march=i686 -Wall -Wstrict-prototypes -D_REENTRANT -c sctp.c
Generating version_data.h
gcc -g -O2 -march=i686 -Wall -Wstrict-prototypes -D_REENTRANT -c version.c
gcc -g -o aprsc aprsc.o accept.o worker.o errno_aprsc.o login.o incoming.o dupecheck.o outgoing.o clientlist.o client_heard.o parse_aprs.o parse_qc.o messaging.o config.o netlib.o xpoll.o acl.o cfgfile.o passcode.o uplink.o rwlock.o hmalloc.o hlog.o keyhash.o filter.o cellmalloc.o historydb.o counterdata.o status.o cJSON.o http.o ssl.o sctp.o version.o -levent -lpthread -lz
perl -ne "s{@DATEVERSION@}{2.1.4- - 2017 Dezember 03}g;
s{@varrun@}{/opt/aprsc/logs}g;
s{@VarLog@}{/opt/aprsc/logs}g;
s{@CFGFILE@}{/opt/aprsc/etc/aprsc.conf}g;
print;"
< aprsc.8.in > aprsc.8

thomas.schaefer@RAMPAGE-IV-E /usr/src/aprsc-master/src
$ make install
Generating version_data.h
gcc -g -O2 -march=i686 -Wall -Wstrict-prototypes -D_REENTRANT -c version.c
gcc -g -o aprsc aprsc.o accept.o worker.o errno_aprsc.o login.o incoming.o dupecheck.o outgoing.o clientlist.o client_heard.o parse_aprs.o parse_qc.o messaging.o config.o netlib.o xpoll.o acl.o cfgfile.o passcode.o uplink.o rwlock.o hmalloc.o hlog.o keyhash.o filter.o cellmalloc.o historydb.o counterdata.o status.o cJSON.o http.o ssl.o sctp.o version.o -levent -lpthread -lz
./install-sh -m 755 -d /opt/aprsc/etc
./install-sh -m 755 -d /opt/aprsc/logs
./install-sh -m 755 -d /opt/aprsc/data
./install-sh -m 755 -d /opt/aprsc/web
./install-sh -m 755 aprsc /opt/aprsc/sbin/aprsc
./install-sh -m 755 aprsc_munin /opt/aprsc/sbin/aprsc_munin
./install-sh -m 644 aprsc.8 /man/man8/aprsc.8
./install-sh -m 644 web/aprsc.css web/aprsc.js web/aprsc-graph.js web/strings-en.json web/strings-fi.json web/index.html web/favicon.ico web/aprsc-logo4.png web/[email protected] web/aprsc-joulukissa.jpg web/excanvas.min.js web/angular.min.js web/angular-translate.min.js web/angular-translate-loader-url.min.js web/ngDialog.min.js web/ngDialog.min.css web/ngDialog-theme-plain.min.css web/jquery.min.js web/jquery.flot.min.js web/jquery.flot.time.min.js web/jquery.flot.selection.min.js web/jquery.flot.resize.min.js web/bootstrap/css/bootstrap.min.css web/bootstrap/fonts/glyphicons-halflings-regular.eot web/bootstrap/fonts/glyphicons-halflings-regular.ttf web/bootstrap/fonts/glyphicons-halflings-regular.woff web/bootstrap/fonts/glyphicons-halflings-regular.woff2 /opt/aprsc/web
if [ ! -f /opt/aprsc/etc/aprsc.conf ] ; then
./install-sh -m 644 aprsc.conf /opt/aprsc/etc/aprsc.conf ;
else true ; fi

thomas.schaefer@RAMPAGE-IV-E /usr/src/aprsc-master/src
$ cd /opt/aprsc/

thomas.schaefer@RAMPAGE-IV-E /opt/aprsc
$ cd sbin

thomas.schaefer@RAMPAGE-IV-E /opt/aprsc/sbin
$ ./aprsc.exe
2017/12/03 16:49:09.033399 aprsc[12800:20000008] WARNING: Configuration: setrlimit(RLIMIT_NOFILE) failed: Too many open files
2017/12/03 16:49:09.033498 aprsc[12800:20000008] WARNING: Configuration could not raise FileLimit (not running as root), it is now 3200
Segmentation fault (Speicherabzug geschrieben)

thomas.schaefer@RAMPAGE-IV-E /opt/aprsc/sbin
$

Web: Support for "MOTD"

Operators need to communicate messages to the users, the traditional way is to put a message on the status page.

The current workaround is to edit web/index.html, but that gets overwritten by an upgrade. Should provide a nicer method to insert a message in there. Include some HTML in the middle?

APT Repository Keys Invalid

Following the installation instructions using the APT repository, I encountered a couple of errors:

root@a3182715fc53:/# gpg --keyserver keys.gnupg.net --recv C51AA22389B5B74C3896EF3CA72A581E657A2B8D
gpg: keyserver receive failed: No name

keys.gnupg.net doesn't seem to exist any longer. I was able to receive the key by switching the keyserver to pgp.mit.edu.

Once the key was received, it appears to have expired.

root@a3182715fc53:/# gpg --list-keys
/root/.gnupg/pubring.kbx
------------------------
pub   dsa2048 2012-08-30 [SC] [expired: 2020-08-25]
      C51AA22389B5B74C3896EF3CA72A581E657A2B8D
uid           [ expired] aprsc Release Engineering (Heikki Hannikainen) <[email protected]>

Confirmed that trying to update the package cache after adding this repository results in an error for this one.

root@a3182715fc53:/# apt-get update
Hit:1 http://security.debian.org/debian-security buster/updates InRelease
Hit:2 http://deb.debian.org/debian buster InRelease      
Hit:3 http://deb.debian.org/debian buster-updates InRelease
Get:4 http://aprsc-dist.he.fi/aprsc/apt buster InRelease [1903 B]
Err:4 http://aprsc-dist.he.fi/aprsc/apt buster InRelease
  The following signatures were invalid: EXPKEYSIG A72A581E657A2B8D aprsc Release Engineering (Heikki Hannikainen) <[email protected]>
Reading package lists... Done
W: GPG error: http://aprsc-dist.he.fi/aprsc/apt buster InRelease: The following signatures were invalid: EXPKEYSIG A72A581E657A2B8D aprsc Release Engineering (Heikki Hannikainen) <[email protected]>
E: The repository 'http://aprsc-dist.he.fi/aprsc/apt buster InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

IPv6 ACL: ::0/126 does not match ::1

There is something wrong with IPv6 ACL processing. The bug appears even without the last change (SHA: aaf7486) which masks host bits in the configured ACL address. Network byte ordering bug with the prefix length, maybe?

apt upgrade which makes old config invalid will restart the server and leave it down

When a future version of aprsc makes old configuration files incompatible, the APT or YUM upgrade will restart the aprsc process before the operator gets a chance of trying to update the configuration to be compatible.

  • aprsc should have a command line option to test configuration validity, quit, and report validity using return code
  • init script's restart method should test the old/new config, and refuse to restart process if new config does not parse
  • postinstall scripts should use that restart method

Uplink address resolving failure seems blocking any new uplink connection

Hi,

on one of our aprsc server we got multiplre time the following error:
2022/01/03 13:28:06.402512 aprsc[1762:7f4661de2700] INFO: Uplink xxx: address resolving failure of 'xxx' '10152': System error
after this, aprsc get lot of time the same error and never successfully connect back to its uplink.
If i restart aprsc it immediately connect to its uplink without any issue.

This issue occured just after server boot and first uplink connection try (i do not know for previous occurence).

Concerned aprsc is running aprsc 2.1.10-gd72a17c.

Any idea?

Thanks

SCTP sockets are not fully implemented

SCTP is somewhere between UDP and TCP, and it's properties seem to fit the APRS-IS requirements pretty well. Should implement SCTP support in aprsc, starting with client listener so that igates could start using it.

Should have per-client-IP and per-subnet connection limits

Currently a single misbehaving client can create hundreds or thousands of connections to the server and consume file descriptor & memory resources or simply fill the maxclients setting for the Listener.

Should implement a configurable limit of connections per client IP address (default to 10 or something), refuse new ones over the limit. Also, another limit per a configured prefix length (20 per /24 or something for IPv4, per /48 for IPv6).

nginx source code should have an example of a very efficient implementation.

Connection timeouts seem to cause worker hangs

When uplink connections fail through timeout, some packet flow hangs seem to occur; workers get internally delayed packets. Is a lock being held or something?

Probably the worker was stuck on uplink_close() of a second uplink (trying to connect to a server which rejected login), which obtains uplink_client_mutex. make_uplink() holds uplink_client_mutex for the duration of the connection attempt. This deadlock should be fixed.

2021/04/27 02:46:23.415179 aprsc-aggr[1257:7f6c0c8bf700] ERROR: Uplink cwop4: connect to 129.15.108.117:10152 timed out
2021/04/27 02:46:23.415598 aprsc-aggr[1257:7f6c0c901700] ERROR: worker 0: process_outgoing got packet 3003528 aged 7 sec (now 52108 t 52101)

2021/04/27 02:47:15.093992 aprsc-aggr[1257:7f6c0c8bf700] ERROR: Uplink cwop4: connect to 129.15.108.117:10152 timed out
2021/04/27 02:47:15.094631 aprsc-aggr[1257:7f6c0c901700] ERROR: worker 0: process_outgoing got packet 3009256 aged 6 sec (now 52160 t 52154)

If one of the aprs servers is down, how the aprs network continue to run ?

Several aprs server are connected themselves. (Seem to be the uplink connections ?)

What happen in the following case:

  1. An aprs client is connected to i.e aprs server 1
  2. The network connection is lost with this specific server

Does the client "know" the other aprs servers ?
Does it could reconnect automatically itself with one of these server ?

New signing CA used by ARRL

Having requested a new LOTW certificate from ARRL after changing my callsign, I've discovered that they've apparently changed their signing certificate. As a result, APRS2 servers reject my certificate as having a self-signed cert in the chain. For reference, I've attached ARRL's new certificates.
LogbookoftheWorldProductionCA.txt

Some packets bypassing the user defined filter?

Hello,

I've some clients (arpx 2.9) which set an user defined filter "r/49.6780/12.160/20", but the server (aprsc 2.1.10) sends packets outside the definied ranges. Now I tried to expand filter to block this packets "r/49.6780/12.160/20 -t/t -p/CW/DW -u/APRARX/APLWS*/APMI0*". But the filter didn't match to the unwanted packets.

I attach a text file with the packets which bypass the following filter: "r/49.6780/12.160/20 r/49.5570/12.4060/15 -t/t -p/CW/DW -u/APRARX/APLWS*/APMI0*"

Is it a bug or it's my fail?

Thank you and a happy new year!

Tom

bypassfilter.txt

aprsc crash on long filter string

Hi,

i just got 2 occurrences of my both aprsc servers still running but were not able to respond anymore to any TCP requests (http ou aprs). Existing TCP connections were also dropped.
Logs were no more updating.

Both servers which got the issue at same time was running aprsc 2.0.19-g05a4d35

Unfortunately, I don't have so much information, but maybe it can comes from one client having bad behavior ...

Any idea is welcome.

Thanks

Alert server operators when TLS certs expire

In the round-robin DNS pools, it's not great when you're connecting to a server and the cert is expired. Instead, log warnings when this is happening, send alerts and maybe turn off the TLS port if the cert expires so the server acts as if it is down, rather than triggering cert errors.

Live upgrade forgets MsgRcpts and client coordinates

When a live upgrade is performed, the client's latest coordinates are lost, causing range filter to stop functioning until the client sends a new position.

Also, the message recipients list (of callsigns heard by a client) is cleared. This makes the equivalent harm to the client reconnecting after a traditional restart upgrade, so it's not too bad. Should be fixed.

Live upgrade forgets per-client detailed packet drop reason counters

The per-client packet drop reason counters are written on disk but not reloaded in a live upgrade. The total error counter (which is reloaded) does not match the sum of reason counts after a live upgrade.

Should also dump the labels of each counter in the state file, so that removing and reordering error counters would actually work right.

APRS-IS Packets Being Denied

I'd like to bring up the issue once again. I'm unsure if it has been resolved in future updates. Though I don't believe it has, as I still see the same issues of packets not being igated when they should be. This has been very problematic and frustrating.

#48

I was setting up some new stations and once again, had the issue that neither would igate without being "rejected" by the server. They happened to end up on the same servers but in 2 different locations. The end result, lost packets that can be critical in a time of need.

Lack of Developer Documentation

Building aprsc and the test suite depend on you having the following installed:

  • libevent-dev
  • libjson-xs-perl

Running tests requires that you:
cd src
./configre
make
make testinstall
cd ../tests
make test

Test failures in UDP load test

Environment: Ubuntu 18.04.4; Linux bach 4.15.0-109-generic #110-Ubuntu SMP Tue Jun 23 02:39:32 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0

aprsc master branch

On make test, the following is observed:

t/64udp-load.t ................... 1/14 bound udp port 127.0.0.1 16405, rcvbuf 65536 sndbuf 65536
Load testing full feed => UDP peer:
reading the rest, have received 6119 packets, sent 6421
t/64udp-load.t ................... 7/14 rcved undefined
after reading the rest, have received 6303 packets, sent 6421, outstanding 9424 bytes
took 3.544 seconds, 1778 packets/sec
missing: F100>APRS,qAR,OH9XYZ-5:!6028.51N/02505.68E# packet 90 blaa blaa blaa blaa END
F101>APRS,qAR,OH9XYZ-5:!6028.51N/02505.68E# packet 91 blaa blaa blaa blaa END
F102>APRS,qAR,OH9XYZ-5:!6028.51N/02505.68E# packet 92 blaa blaa blaa blaa END
F103>APRS,qAR,OH9XYZ-5:!6028.51N/02505.68E# packet 93 blaa blaa blaa blaa END
F104>APRS,qAR,OH9XYZ-5:!6028.51N/02505.68E# packet 94 blaa blaa blaa blaa END
F105>APRS,qAR,OH9XYZ-5:!6028.51N/02505.68E# packet 95 blaa blaa blaa blaa END
F106>APRS,qAR,OH9XYZ-5:!6028.51N/02505.68E# packet 96 blaa blaa blaa blaa END

[...] 

F299>APRS,qAR,OH9XYZ-5:!6028.51N/02505.68E# packet 289 blaa blaa blaa blaa END
F300>APRS,qAR,OH9XYZ-5:!6028.51N/02505.68E# packet 290 blaa blaa blaa blaa END
F97>APRS,qAR,OH9XYZ-5:!6028.51N/02505.68E# packet 87 blaa blaa blaa blaa END
F98>APRS,qAR,OH9XYZ-5:!6028.51N/02505.68E# packet 88 blaa blaa blaa blaa END
F99>APRS,qAR,OH9XYZ-5:!6028.51N/02505.68E# packet 89 blaa blaa blaa blaa END
# Test 7 got: "6303" (t/64udp-load.t at line 142)
#   Expected: "6421" (Received wrong number of lines from blob)
#  t/64udp-load.t line 142 is: 	ok($rxn, $txn, "Received wrong number of lines from blob");
# Test 8 got: "514908" (t/64udp-load.t at line 143)
#   Expected: "524332" (Received wrong number of bytes from blob)
#  t/64udp-load.t line 143 is: 	ok($rxl, $txl, "Received wrong number of bytes from blob");
# Test 9 got: "9424" (t/64udp-load.t at line 144)
#   Expected: "0" (There are outstanding bytes in the server after timeout)
#  t/64udp-load.t line 144 is: 	ok($outstanding, 0, "There are outstanding bytes in the server after timeout");
Load testing UDP peer => full feed:
reading the rest, have received 6118 packets, sent 6421

[ ... more test output ... ]


Test Summary Report
-------------------
t/64udp-load.t                 (Wstat: 0 Tests: 14 Failed: 6)
  Failed tests:  7-12
Files=36, Tests=2521, 142 wallclock secs ( 0.57 usr  0.17 sys +  3.66 cusr  3.98 csys =  8.38 CPU)
Result: FAIL
Failed 1/36 test programs. 6/2521 subtests failed.
Makefile:19: recipe for target 'test' failed
make[1]: *** [test] Error 255
make[1]: Leaving directory '/home/gewesp/git/github/aprsc/tests'
Makefile:138: recipe for target 'test' failed
make: *** [test] Error 2

TCP_NODELAY should be only set after login

... so that SSL handshake writes would coalesce nicely, but the APRS packets would still go in smaller bunches. Affects both client login and logging in to an Uplink.

Invalid callsign in path

Direwolf generates a packet of the form:

[rx>ig] AISAT-1>CQ,,,qAO,M7RCE::CQ-0 :From AMSAT INDIA & Exseed Space |3179768|38|36|1070{482

Which results in invalid callsign in path, and the packet being dropped. Is this a direwolf or aprsc problem?

Client SSL: fall back to passcode auth on invalid client certs

Hi,

Currently, if a client connects to the SSL port (24580), the client certificate is checked after receiving the user line from the client, and if the certificate check fails, the connection is reset:

<<< # aprsc 2.1.2-gc90ee9c
>>> user DO1GL pass -1 vers foo -1
<<< # Client certificate not accepted: unable to verify the first certificate
read:errno=0

It would be a nice graceful fallback to allow a client to perform passcode authentication if the client certificate is not accepted by the server (that might be caused by a mismatching root or by an expired client cert).

This might introduce some problems, though:

  • should a client with an invalid cert and invalid passcode be rejected or accepted as unauthorized?
  • will this cause debugging problems when a user thinks they are authenticated, while they actually aren't?

Gated packets without a client-generated q construct get qAS when using TLS

When connecting with TCP, gated packets (FROMCALL != LOGIN) get the qAR construct appended to the path. When connecting with TLS, they get qAS. There shouldn't be a difference between connecting with TCP and connecting with TLS and while it should be up to a client to correctly append the qAR or qAO, aprsc should guard against clients that aren't doing that correctly and do something sensible.

m/ filter does not work for unverified clients

m/ looks up the position from the historydb (cache of last positions from the APRS-IS stream) based on the connected client's username, and the historydb only gets populated by packets accepted to the stream. As a result, m/ filters do not work unless you're verified and can send packets to the IS.

Should put lat/lon/cos_lat to client struct and use that for m/ filter range calculation.

Reported by Ge0rG.

Uplink link dropped due to "Output buffer full" and not reconnecting

Hi,

I'm facing an issue with an aprsc server is disconnected from uplink due to "Output buffer full".
No problem about the disconnection, but it never reconnect to upstream.
Only way to reconnect seems to restart the server.

Both servers are running: aprsc 2.0.19-g05a4d35

Thanks in advance for your help.

On-line reconfiguration does not work (do not even try to use it)

If reconfiguration is attempted, all listening sockets are closed and reopened with the new configuration. Existing statistics counters are reset to 0, and the listeners show up as having 0 clients connected, even though all the old clients are still connected. I have no idea how badly UDP client sockets behave after this.

So, please don't even try it.

HTTP and uplink reconfiguration seems to work, although all uplinks are disconnected and reconnected even if the configuration does not change.

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.