After installing Aerospike community edition on amazon linux 2 instance unable to curl localhost with 3000 port we are getting connection reset by peer, However port 3000 is listning on server.
In aerospike logs getting -
[root@ip-10-10-1-7 ~]# tail -f /var/log/aerospike/aerospike.log
Jun 01 2023 13:46:40 GMT: WARNING (socket): (socket.c:780) Socket 0.0.0.0:3000 in use, waiting
Jun 01 2023 13:46:45 GMT: WARNING (socket): (socket.c:780) Socket 0.0.0.0:3000 in use, waiting
Jun 01 2023 13:46:46 GMT: WARNING (hb): (hb.c:4218) error allocating space for mesh recv buffer of size 33619974 on fd 29
Jun 01 2023 13:46:50 GMT: WARNING (socket): (socket.c:780) Socket 0.0.0.0:3000 in use, waiting
Jun 01 2023 13:46:55 GMT: WARNING (socket): (socket.c:780) Socket 0.0.0.0:3000 in use, waiting
Jun 01 2023 13:47:00 GMT: WARNING (socket): (socket.c:780) Socket 0.0.0.0:3000 in use, waiting
Jun 01 2023 13:47:05 GMT: WARNING (socket): (socket.c:780) Socket 0.0.0.0:3000 in use, waiting
Jun 01 2023 13:47:10 GMT: WARNING (socket): (socket.c:780) Socket 0.0.0.0:3000 in use, waiting
Jun 01 2023 13:47:14 GMT: INFO (as): (signal.c:202) SIGTERM received, shutting down Aerospike Community Edition build 6.2.0.0 os el7
Jun 01 2023 13:47:14 GMT: WARNING (as): (signal.c:206) startup was not complete, exiting immediately
=================================================================
[root@ip-10-10-1-7 ~]# netstat -nltp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 2132/rpcbind
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 2771/sshd
tcp 0 0 0.0.0.0:3000 0.0.0.0:* LISTEN 4579/asd
tcp 0 0 0.0.0.0:3001 0.0.0.0:* LISTEN 4579/asd
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 2587/master
tcp 0 0 0.0.0.0:3002 0.0.0.0:* LISTEN 4579/asd
tcp 0 0 0.0.0.0:3003 0.0.0.0:* LISTEN 4579/asd
tcp6 0 0 :::111 :::* LISTEN 2132/rpcbind
tcp6 0 0 :::22 :::* LISTEN 2771/sshd
[root@ip-10-10-1-7 ~]#
=================================================================
[root@ip-10-10-1-7 ~]# curl -iv localhost:3000
* Trying 127.0.0.1:3000...
* Connected to localhost (127.0.0.1) port 3000 (#0)
> GET / HTTP/1.1
> Host: localhost:3000
> User-Agent: curl/7.88.1
> Accept: */*
>
* Recv failure: Connection reset by peer
* Closing connection 0
curl: (56) Recv failure: Connection reset by peer
[root@ip-10-10-1-7 ~]#
=================================================================
Config file
[root@ip-10-10-1-7 ~]# cat /etc/aerospike/aerospike.conf
# Aerospike database configuration file for use with systemd.
service {
proto-fd-max 15000
}
logging {
console {
context any info
}
}
network {
service {
address any
port 3000
}
heartbeat {
mode mesh
#multicast-group 239.1.99.222
port 3002
address any
# To use unicast-mesh heartbeats, remove the 3 lines above, and see
# aerospike_mesh.conf for alternative.
interval 150
timeout 10
}
fabric {
port 3001
}
info {
port 3003
}
}
namespace test {
replication-factor 2
memory-size 4G
storage-engine memory
}
namespace bar {
replication-factor 2
memory-size 4G
storage-engine memory
# To use file storage backing, comment out the line above and use the
# following lines instead.
# storage-engine device {
# file /opt/aerospike/data/bar.dat
# filesize 16G
# data-in-memory true # Store data in memory in addition to file.
# }
}