SQLite DB listener not starting
Closed this issue · 1 comments
When I attempt to follow:
http://grr-response.blogspot.com/2014/10/using-distributed-data-store-in-grr.html
The following test command works fine:
/usr/share/grr-server/bin/python /usr/share/grr-server/lib/python2.7/site-packages/grr/server/data_server/data_server.py --config=/etc/grr/server.local.yaml --master --verbose
Yet when I do a systemctl restart grr-server (samething for stop/start) I dont see the port listening on 7000, but I do see the other ports (8080,8000) listening and I do see the processes running.
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1312/sshd
tcp 0 0 0.0.0.0:44449 0.0.0.0:* LISTEN 14900/python
tcp 0 224 172.31.25.121:22 :64257 ESTABLISHED 1352/sshd: ubuntu [
tcp6 0 0 :::8080 :::* LISTEN 14910/python
tcp6 0 0 :::22 :::* LISTEN 1312/sshd
tcp6 0 0 :::8000 :::* LISTEN 14900/python
root 14891 0.0 0.0 19704 3284 ? Ss Feb18 0:00 /bin/bash /usr/bin/grr_server --component ui --disallow_missing_config_definitions -p StatsStore.process_id=ui_c08493b14788489686337d6813ce5190
root 14892 0.0 0.0 19704 3292 ? Ss Feb18 0:00 /bin/bash /usr/bin/grr_server --component http_server --disallow_missing_config_definitions -p StatsStore.process_id=http_server_c08493b14788489686337d6813ce5190
root 14893 0.0 0.0 19704 3228 ? Ss Feb18 0:00 /bin/bash /usr/bin/grr_server --component worker2 --disallow_missing_config_definitions -p StatsStore.process_id=worker2_c08493b14788489686337d6813ce5190
root 14900 0.1 4.6 730456 187964 ? Sl Feb18 2:18 /usr/share/grr-server/bin/python /usr/share/grr-server//bin/grr_server --context Global Install Context --component ui --disallow_missing_config_definitions -p StatsStore.process_id=ui_c08493b14788489686337d6813ce5190
root 14903 0.0 0.0 19704 3296 ? Ss Feb18 0:00 /bin/bash /usr/bin/grr_server --component worker --disallow_missing_config_definitions -p StatsStore.process_id=worker_c08493b14788489686337d6813ce5190
root 14909 0.4 4.7 802000 193920 ? Sl Feb18 6:07 /usr/share/grr-server/bin/python /usr/share/grr-server//bin/grr_server --context Global Install Context --component worker2 --disallow_missing_config_definitions -p StatsStore.process_id=worker2_c08493b14788489686337d6813ce5190
root 14910 0.2 4.6 726740 189024 ? Sl Feb18 4:02 /usr/share/grr-server/bin/python /usr/share/grr-server//bin/grr_server --context Global Install Context --component http_server --disallow_missing_config_definitions -p StatsStore.process_id=http_server_c08493b14788489686337d6813ce5190
root 14911 0.4 4.8 802256 196456 ? Sl Feb18 6:00 /usr/share/grr-server/bin/python /usr/share/grr-server//bin/grr_server --context Global Install Context --component worker --disallow_missing_config_definitions -p StatsStore.process_id=worker_c08493b14788489686337d6813ce5190
Config Snippet blow:
Server.initialized: 'True'
Datastore.implementation: SqliteDataStore
Frontend.bind_port: '8080'
Dataserver.server_list:
- http://grrdb02.fdqn.net:7000
- http://grrdb.fdqn.net:7000
Dataserver.client_credentials: - grrdbuser:SOMEPASS
Dataserver.server_username: servergroup
Dataserver.server_password: GROUPPASS
Thoughts?
Figured it out
systemctl edit grr-server on both master and slave. I had to save to the temp file and then save to the override.conf file for some reason. Then 'systemctl restart grr-server'
Master
[Service]
ExecReload=
ExecReload=/bin/systemctl --no-block reload grr-server@dataserver_master.service
ExecStart=
ExecStart=/bin/systemctl --no-block start grr-server@dataserver_master.service
ExecStop=
ExecStop=/bin/systemctl --no-block stop grr-server@dataserver_master.service
Slave
[Service]
ExecReload=
ExecReload=/bin/systemctl --no-block reload grr-server@dataserver_slave.service
ExecStart=
ExecStart=/bin/systemctl --no-block start grr-server@dataserver_slave.service
ExecStop=
ExecStop=/bin/systemctl --no-block stop grr-server@dataserver_slave.service