Comments (6)
We should def error out if the configuration is the same.
However, it should be possible to run multiple instance on the same server - like one for the primary instance, and another for standby
from pgagroal.
We should def error out if the configuration is the same.
The only "quick" way to find out if the configuration is (almost) the same is the failure of bind
or the same usage of the managament socket (and it could be also the metrics one). If any of these is already in use, we should abort.
However, it should be possible to run multiple instance on the same server - like one for the primary instance, and another for standby
Good point, but while it is immediate to find out a "misrun" by the user when using the same configuration for multiple instances, if the pid_file
is absolute, this becomes harder to detect if the pid file is relative (until we fix the above socket problems).
from pgagroal.
@fluca1978 I couldn't reproduce this, but I may have misunderstood the bug.
What I am trying to do is set the unix_socket_dir
to a relative path in config and then run two pgagroal instances from different directories. What I get is a bind error.
If you could give me more details I could work something out.
from pgagroal.
@fluca1978 I couldn't reproduce this, but I may have misunderstood the bug.
What I am trying to do is set the
unix_socket_dir
to a relative path in config and then run two pgagroal instances from different directories. What I get is a bind error.If you could give me more details I could work something out.
When I launch the second instance, I got a bind error too, but the instance continues to run. Is your second instance aborting? That could be due to the presence or absence of other network cards?
from pgagroal.
When I launch the second instance, I got a bind error too, but the instance continues to run. Is your second instance aborting?
Yes, mine aborts exactly after returning from pgagroal_bind
function.
$ ./pgagroal -c pgagroal.conf
2024-04-03 10:54:45 DEBUG configuration.c:2656 PID file automatically set to: [./pgagroal.2345.pid]
2024-04-03 10:54:45 DEBUG network.c:648 server: bind: localhost:2345 (Address already in use)
2024-04-03 10:54:45 FATAL main.c:924 pgagroal: Could not bind to localhost:2345
That could be due to the presence or absence of other network cards?
I have researched this and it's possible that it is a matter of how the OS deals with SO_REUSEADDR
, but I need to research more. Do you have details on the address-port pairs that were bound on each processes?
from pgagroal.
Apprently the problem is with ``hostconfiguration: if set to
localhost` the second instance aborts as expected:
% pgagroal
-> DEBUG network.c:648 server: bind: localhost:54322 (Address already in use)
-> DEBUG network.c:648 server: bind: localhost:54322 (Address already in use)
-> FATAL main.c:924 pgagroal: Could not bind to localhost:54322
but when set to *
the second instance runs.
from pgagroal.
Related Issues (20)
- Change `warnx` in `pgagroal-admin` to point at the right file
- Make `pgagroal-admin` provide JSON output HOT 2
- Allow `pgagroal-admin` to specify where to store the master key password file HOT 8
- Missing new line in the `pagraoal-admin` help screen
- Improve the `restart_server` function HOT 1
- Improve the `invalid master key file` error HOT 8
- Improve the `pgagroal-admin` command `master-key` to warn users about need for new encryption HOT 1
- Fix error message in `pgagroal-admin master-key` HOT 2
- Cannot compile after vault implementation has been merged HOT 5
- Documentation framework HOT 2
- Management protocol documentation HOT 2
- Management protocol incompatibilites due to version numbers HOT 1
- Evaluate and implement full JSON command support HOT 2
- I/O: Replace libev with a native event loop (Linux Support) HOT 1
- pgagroal connections are in Graceful state since a long time HOT 4
- Prometheus: Logging
- pgagroal-admin: SegFault with -P
- Report misconfiguration of `log_level` when set to `debug`
- Unknown value for `tls` field for server configuration in `pgagroal.conf` HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pgagroal.