Git Product home page Git Product logo

fanout's People

Contributors

barthalion avatar brianmay avatar elliotkendall avatar freddyb avatar marcschmitzer avatar smilix avatar travisghansen 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fanout's Issues

Backgrounding of fanout causes exit 1

Running the commands:
./fanout --run-as=storage:storage --debug-level=3
./fanout --debug-level=3
./fanout
(and possibly others)

Hit Ctrl-Z (background job) and then fg causes:

[1353544671] ERROR: epoll_wait: Interrupted system call
[1]+ Exit 1 ./fanout

Basically fanout can't background...

write segfault when socket closes without notification

Looks like there are various ways to clean it up..

Program received signal SIGPIPE, Broken pipe.
0x00cf2402 in __kernel_vsyscall ()
(gdb) bt

(gdb) bt full
#0 0x00cf2402 in __kernel_vsyscall ()

No symbol table info available.
#1 0x001e34a1 in send () from /lib/libc.so.6

No symbol table info available.
#2 0x0804a526 in client_write (c=0x80e3ae8, data=0x80efbd8 "1349006458\n") at fanout.c:853

    sent = -1073750152

#3 0x0804a6ef in client_process_input_buffer (c=0x80e3ae8) at fanout.c:882

    line = 0x8086280 "ping"
    message = 0x80efbd8 "1349006458\n"
    action = 0xbfffe098 "\005"
    channel = 0x804bbb7 "DEBUG"
    i = 4

#4 0x08049d3f in main (argc=11, argv=0xbfffe764) at fanout.c:566

    srvsock = 7
    epollfd = 8
    nfds = 1
    efd = 1039
    n = 0
    res = 5
    portno = 80
    optval = -1073748208
    optlen = 4
    listen_backlog = 25
    max_events = 25
    pidfile = 0x0
    buffer = "ping\n", '\000' <repeats 1019 times>
    pwd = 0x2669b4
    grp = 0x266934
    user = 0xbfffe8c6 "sparklefan"
    group = 0xbfffe8d1 "sparklefan"
    user_id = 102
    group_id = 104
    ev = {events = 1, data = {ptr = 0x5fb, fd = 1531, u32 = 1531, u64 = 20497748600030715}}
    events = 0xbfffe0b0
    client_i = 0x80e3ae8
    client_tmp = 0x80edd08
    clilen = 28
    serv_addr = {sin6_family = 10, sin6_port = 20480, sin6_flowinfo = 0, sin6_addr = {in6_u = {
          u6_addr8 = '\000' <repeats 15 times>, u6_addr16 = {0, 0, 0, 0, 0, 0, 0, 0}, u6_addr32 = {0, 0, 0,
            0}}}, sin6_scope_id = 0}
    cli_addr = {sin6_family = 10, sin6_port = 45760, sin6_flowinfo = 0, sin6_addr = {in6_u = {
          u6_addr8 = "\000\000\000\000\000\000\000\000\000\000\377\377g\367\206;", u6_addr16 = {0, 0, 0, 0, 0,
            65535, 63335, 15238}, u6_addr32 = {0, 0, 4294901760, 998700903}}}, sin6_scope_id = 0}
    c = -1
    option_index = 0
    calculated_client_limit = 7984
    long_options = {{name = 0x804b390 "port", has_arg = 1, flag = 0x0, val = 0}, {name = 0x804b395 "daemon",
        has_arg = 0, flag = 0x804d4b4, val = 1}, {name = 0x804b39c "logfile", has_arg = 1, flag = 0x0,
        val = 0}, {name = 0x804b3a4 "pidfile", has_arg = 1, flag = 0x0, val = 0}, {
        name = 0x804b3ac "debug-level", has_arg = 1, flag = 0x0, val = 0}, {name = 0x804b3b8 "help",
        has_arg = 0, flag = 0x0, val = 0}, {name = 0x804b3bd "client-limit", has_arg = 1, flag = 0x0, val = 0},
      {name = 0x804b3ca "run-as", has_arg = 1, flag = 0x0, val = 0}, {name = 0x804b3d1 "max-logfile-size",
        has_arg = 1, flag = 0x0, val = 0}, {name = 0x0, has_arg = 0, flag = 0x0, val = 0}}

Systemd unit file

Hi,

I am package fanout as rpm for CentOS 7. so far I have just used the init script. But I guess it is time to use systemd unit files.

Did you create one already I can use?

Are you interested in a pull request for the rpm spec-file?

Bind to specified IP

Would you please add a command line parameter to bind to specific IP (instead of just 0.0.0.0)?

I notice there is also some IPv6 activity in the issues, too, so maybe an
-ip4
and an
-ipv6
option?

PIDFILE not null on startup.

When starting up on 12.04 x64 ubuntu the pidfile variable isnt set to null, so when it comes to forking off the to the background it tries to write to the pidfile and seg faults:

/export/src/external/fanout$ ./fanout  --port=12345 --daemon
Segmentation fault (core dumped)

Simple fix:

index b78e9a8..7fa66b2 100644
--- a/fanout.c
+++ b/fanout.c
@@ -157,7 +157,7 @@ int main (int argc, char *argv[])
socklen_t optlen = sizeof(optval);
u_int listen_backlog = 25;
u_int max_events = 25;

  • FILE *pidfile;
  • FILE *pidfile=NULL;
    server_start_time = (long)time (NULL);
    char buffer[1025];

IPv6 support

Hello,

Please can fanout listen on IPv6 sockets? Currently it only seems to listen for IPv4 connections.

Thanks

Minor change for port number option

I wanted to run mine on a high port 10000+, but found the size of the variable used for reading this was actually 1 short of what it should be (in the options parsing components), i've modified mine and seems to work fine.

diff --git a/fanout.c b/fanout.c
index 6e041ad..e91ce11 100644
--- a/fanout.c
+++ b/fanout.c
@@ -319,7 +319,7 @@ xit\n");
exit (EXIT_FAILURE);
}

  • char buf[5];
  • char buf[6];
    snprintf(buf, sizeof buf, "%d", portno);

e = getaddrinfo (NULL, buf, &hints, &ai);

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.