[vz-dev] [BUG] vzlogger starts httpd even if it`s disabled in configuration #65

devzero at web.de devzero at web.de
Mon Dec 22 13:05:53 CET 2014


>    mhh, also ich glaube ich habe bei dem versuch vzlogger als "commandline logger" zu nutzen 2 bugs gefunden:
>     
>    1.   vzlogger startet im hintergrund als daemon, obwohl in vzlogger.conf daemon:false gesetzt ist.
>    2.   obwohl local -> enabled:false  gesetzt ist, scheint da der webserver im hintergrund zu starten
>     
>    also wenn es keine bugs sind ist es zumindest verhalten was ich nicht erwartet hätte.
>
>
>Ja, das ist bekannt: https://github.com/volkszaehler/vzlogger/issues/63

für 2. hab ich mal noch nen neues bugticket aufgemacht:

https://github.com/volkszaehler/vzlogger/issues/65


i`m trying to use vzlogger in foreground and i don´t need httpd. local is disabled, so is daemon. i would expect that vzlogger starts in foreground and does not start httpd - but vzlogger starts as daemon instead and also starts httpd, which is a major issue - as starting a tool which opens a listening port when explicitly being told not to do so imposes a security risk.

linux-xlde:~/vzlogger # vzlogger
[Dec 22 04:02:59][mtr0] Creating new meter with protocol sml.
[Dec 22 04:02:59][mtr0] Meter configured, enabled.
[Dec 22 04:02:59] New meter initialized (protocol=sml)
[Dec 22 04:02:59] Have 1 meters.
[Dec 22 04:02:59][main] daemon=0, local=1
[Dec 22 04:02:59] Daemonize process...
[Dec 22 04:02:59] Opened logfile /var/log/vzlogger.log
[Dec 22 04:02:59][] ===> Start meters
[Dec 22 04:02:59][mtr0] Meter connection established
[Dec 22 04:02:59][mtr0] Meter thread started
[Dec 22 04:02:59][mtr0] Meter is opened. Starting channels.
[Dec 22 04:02:59][http] Starting local interface HTTPd on port 8080
[Dec 22 04:02:59][] Startup done.
[Dec 22 04:02:59][mtr0] Number of readers: 32
[Dec 22 04:02:59][mtr0] Config.daemon: 0
[Dec 22 04:02:59][mtr0] Config.local: 1

this is my configuration -

/**

    vzlogger configuration *
    use proper encoded JSON with javascript comments *
    take a look at the wiki for detailed information:
    http://wiki.volkszaehler.org/software/controller/vzlogger#configuration */

{
"retry": 30, // how long to sleep between failed requests, in seconds
"daemon": false, // run periodically
"verbosity": 15, // between 0 and 15
"log": "/var/log/vzlogger.log", // path to logfile, optional

"local": {
    "enabled": false,   // should we start the local HTTPd for serving live readings?
    "port": 8080,       // the TCP port for the local HTTPd
    "index": true,      // should we provide a index listing of available channels if no UUID was requested?
    "timeout": 30,      // timeout for long polling comet requests, 0 disables comet, in seconds
    "buffer": 600       // how long to buffer readings for the local interface, in seconds
},

"meters": [
    {
        "enabled": true,               // disabled meters will be ignored
        "skip": false,                  // if enabled, errors when opening meter will lead to meter being ignored
        "protocol": "sml",              // see 'vzlogger -h' for list of available protocols
        "device": "/dev/ttyUSB1",
        "interval": 2,
    }
]

}




More information about the volkszaehler-dev mailing list