SeisComP / seedlink

Seedlink server to be built within SeisComP
Other
12 stars 17 forks source link

standalone seedlink setup #6

Closed HerrMuellerluedenscheid closed 2 years ago

HerrMuellerluedenscheid commented 2 years ago

Hi,

I compiled seiscomp including the seedlink service. When I check seiscomp I get the following on an entirely fresh ubuntu:

mariuskriegerowski@qs-test:/opt/seiscomp/bin$ ./seiscomp check
could not open file '/opt/seiscomp/var/run/seiscomp.pid': No such file or directory

Does var/run have to be created manually? Can this be fixed in the installation procedure?

Edit: var/log apparently also needs to be created.

gempa-jabe commented 2 years ago

Actually there is no installation procedure. seiscomp creates var/run and var/log automatically at startup. Does the user who calls seiscomp check have write permissions in /opt/seiscomp?

andres-h commented 2 years ago

Maybe the problem is that you run 'seiscomp check' on unconfigured system. If you create the required "bindings" and run 'seiscomp update-config', the directories should be created.

See: https://www.seiscomp.de/doc/base/tutorials/waveforms.html

BTW, all config options are described in etc/descriptions/*.xml. I don't know if Ansible should also take over Seedlink configuration, but I just refer to my OpenWrt Seiscomp (basically just Seedlink) project that does include configuration (luci app): https://github.com/andres-h/seiscompwrt

The standard Seiscomp configuration GUI is scconfig.

HerrMuellerluedenscheid commented 2 years ago

So, I gave it another round but still missing something I guess:

sysop@qs-test:/opt/seiscomp/bin$ ./seiscomp update-config
* starting kernel modules
* configure kernel
* configure diskmon
* configure seedlink
warning: $organization is not defined in /opt/seiscomp/share/templates/seedlink/seedlink_head.tpl
warning: $organization is not defined in /opt/seiscomp/share/templates/seedlink/seedlink_station_head.tpl
* configure slarchive    
sysop@qs-test:/opt/seiscomp/bin$ ./seiscomp start seedlink 
starting seedlink
 maximum number of open files set to 1048576
Summary: 1 modules started
sysop@qs-test:/opt/seiscomp/bin$ ./seiscomp status
diskmon              is not running
seedlink             is not running [WARNING]
slarchive            is not running
Summary: 3 modules reported

Checking the seedlink log file:

Fri Dec 17 15:19:18 2021 - seedlink: SeedLink v3.3 (2020.203) started
Fri Dec 17 15:19:18 2021 - seedlink: loading seedlink configuration from file '/opt/seiscomp/var/lib/seedlink/seedlink.ini'
Fri Dec 17 15:19:18 2021 - seedlink: cannot open file '@ROOTDIR@/var/run/seedlink.pid' (No such file or directory)

Do I have to define @ROOTDIR@ somewhere? Could you help me out with the right documentation pages? Everything installed as user sysop in locations owned by sysop.

HerrMuellerluedenscheid commented 2 years ago

Okay, just found out that I first have to seiscomp enable seedlink. A user feedback would be more self-explanatory like:

sysop@qs-test:/opt/seiscomp/bin$ ./seiscomp start seedlink 
starting seedlink
 maximum number of open files set to 1048576
Summary: WARNING YOU HAVE TO ENABLE THE SEEDLINK MODULE FIRST: seiscomp enable seedlink
andres-h commented 2 years ago

No, "enable seedlink" is not necessary. Enabled modules are started by "seiscomp start", but you can always start seedlink by using "seiscomp start seedlink" explicitly.

The problem here is that @ROOTDIR@ is not resolved if you install seedlink only, so you have to add:

lockfile = @ROOTDIR@/var/run/seedlink.pid
filebase = @ROOTDIR@/var/lib/seedlink/buffer

to etc/seedlink.cfg, replacing @ROOTDIR@ by the actual directory.

andres-h commented 2 years ago

Documentation reference:

https://www.seiscomp.de/doc/apps/seedlink.html#confval-lockfile https://www.seiscomp.de/doc/apps/seedlink.html#confval-filebase

HerrMuellerluedenscheid commented 2 years ago

Thanks! Will try that!

HerrMuellerluedenscheid commented 2 years ago

Thanks @andres-h for the hint. This got me one step further. However, there still seems to be a failure and the log file doens't help much.

sysop@qs-test:/opt/seiscomp/bin$ cat ../var/log/seedlink.log 
Fri Dec 17 16:05:18 2021 - seedlink: SeedLink v3.3 (2020.203) started
Fri Dec 17 16:05:18 2021 - seedlink: loading seedlink configuration from file '/opt/seiscomp/var/lib/seedlink/seedlink.ini'
Fri Dec 17 16:05:18 2021 - seedlink: no plugins defined

Is there a way to increase verbosity?

andres-h commented 2 years ago

If you have no stations configured, there are no plugins defined in seedlink.ini either. Plugins are used to connect to different data sources.

Seedlink cannot start, because it has nothing to do. This is normal.

gempa-jabe commented 2 years ago

Please note that this is not a user forum. Make sure that you understand how seedlink is working and how to configure it properly before optimizing it. I don't intend to be offending, it just might help you to get your job done. Documentation is available at https://www.seiscomp.de.

HerrMuellerluedenscheid commented 2 years ago

If you have no stations configured, there are no plugins defined in seedlink.ini either. Plugins are used to connect to different data sources.

Seedlink cannot start, because it has nothing to do. This is normal.

That would be helpful to find in the logs, as well :)

HerrMuellerluedenscheid commented 2 years ago

Please note that this is not a user forum. Make sure that you understand how seedlink is working and how to configure it properly before optimizing it. I don't intend to be offending, it just might help you to get your job done. Documentation is available at https://www.seiscomp.de.

Sorry, didn't mean to bother. Anyways, I'll keep you updated about the ansible role once it's running.