How to retrieve edge device Master Driver Configuration Store file - volttron

From linux command prompt how do I retrieve the Master Driver Configuration Store file to upload for the ILC agent config? Am running VOLTTRON 8.1.3
If I do a $ vctl status I have these agents running.
UUID AGENT IDENTITY TAG STATUS HEALTH
02 actuatoragent-1.0 platform.actuator actuator running [3071467] GOOD
3c bacnet_proxyagent-0.5 platform.bacnet_proxy proxy running [3060006] GOOD
eb forwarderagent-5.1 forwarderagent-5.1_1 running [2947263] GOOD
14 listeneragent-3.3 listeneragent-3.3_1 running [2998418] GOOD
35 platform_driveragent-4.0 platform.driver master running [3144087] GOOD
7d testthreeagentagent-0.1 platform.testthreeagent test_three running [3098409] GOOD
c6 volttron_openadr_ven-1.0.1.dev5 volttron_openadr_ven-1.0.1.dev5_1 0
Am I supposed to export this in JSON as a file? $ vctl config list platform.driver
This will list all BACnet device config files in CSV format. Any help appreciated...
EDIT
If I do:
$ vctl config get platform.driver config
This only prints:
{
"driver_scrape_interval": 0.05,
"publish_breadth_first_all": false,
"publish_depth_first": false,
"publish_breadth_first": false
}
Which I don't think is what I need for the ILC algorithm config.

If you are trying to use the ILC configuration generator you need the platform.driver config store.
It is a file in your VOLTTRON_HOME, by default here:
~/.volttron/configuration_store/platform.driver.store

vctl config get platform.driver drivername
where drivername is devices/foo/bar/baf or config.csv or whatever...
if expecting json output then add --json flag

Related

Keycloak 19 docker can't find suitable driver for sqlserver

I deployed keycloak 19 in azure app service using the quay.io/keycloak/keycloak:19.0.1 image; It's working fine when using the dev file database; but I'm having trouble when I tried to connect on my SQL server database, I followed the instruction here but I'm getting the error below
ERROR [org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler] (main) ERROR: No suitable driver found for jdbc:sqlserver://MySDBServer:1433;databaseName=MyDatabaseName
Here's my Setup in app settings configurations
KC_DB:mssql
KC_DB_URL_HOST:[MyDatabaseServer]
KC_DB_PASSWORD:[MyDatabasePassword]
KC_DB_USERNAME:[MyDatatabaseUsername]
KC_DB_URL_DATABASE:[MydatabaseName]
KC_PROXY:edge
Passing the --optimized parameter to the start should fix it.
bin/kc.[sh|bat] start --optimized
In case of a Dockerfile, your ENTRYPOINT will look like:
ENTRYPOINT ["/opt/keycloak/bin/kc.sh", "start", "--optimized"]
You can read about the --optimized parameter at the links given below.
Optimize the Keycloak startup
Changes to the server configuration and startup

How to setup CouchDB with JWT auth?

I'm trying to setup just for CouchDB, so I can use my current API tokens to authenticate in CouchDB.
But the docs don't seem to provide enough information to set this up.
I don't understand what the payload of the gut needs to contain identifying the user. How do I configure the jwt secret?
Is there any simple example out there or something like or tutorial to do this correctly?
this thread may be helpful:
https://github.com/apache/couchdb/discussions/2947
edit:
ok i found a configuration that worked for me - this solution won't be suitable for anything more than a testing couchdb instance.
configure local.ini (docker image)
1.1 -> ssh to your docker docker exec -it bash
1.2 -> install vim for convenience and disable visual mode:
$ apt-get update
$ apt-get install vim
$ echo "set mouse-=a" >> ~/.vimrc
1.3 -> update local.ini
$ vi /opt/couchdb/etc/local.ini
in [chttpd] section add line
authentication_handlers = {chttpd_auth, jwt_authentication_handler}, {chttpd_auth, cookie_authentication_handler}, {chttpd_auth, default_authentication_handler}
at the very end of the file add jwt_keys config
[jwt_keys]
hmac:_default = aGVsbG8=
hmac:foo = aGVsbG8y
restart your container
configure postman :
bearer token for _default hmac is
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJ1c2VyXzEiLCJleHAiOjE1OTI2MTEyMDB9.Y9jNgSeSBl54V2MHg1hXhivyZsdXTeiAVJR2DSlF6LQ
put it into postman and issue following get request:
http://localhost:5984/_session
you should see something like :
{"ok":true,"userCtx":{"name":"user_1","roles":[]},"info":{"authentication_handlers":["jwt","cookie","default"],"authenticated":"jwt"}}
now go in your browser to couchdb ui and login as admin
http://127.0.0.1:5984/_utils/#login
then click the "lock" icon next to the database you wish the user_1 to have privileges and update the permissions accordingly.
check
check if your user_1 authenticating via jwt has permissions on the database by issuing appropriate request, for example
http://localhost:5984/campaigns

Solr can't find config file despite beeing exiting

I have changed some rights within a new core (solr 7.7.1) I am trying to configure. That has now led to failing to start the core on solr start. The rights look allright to me and everything else as well. Not different to other cores.
The error msg:
SolrCore Initialization Failures
test: org.apache.solr.common.SolrException:org.apache.solr.common.SolrException: Could not load conf for core test: Error loading solr config from /var/solr/data/test/conf/solrconfig.xml
Please check your logs for more information
log:
core test is not available due to init failure: Could not load conf for core test: Error loading solr config from /var/solr/data/test/conf/solrconfig.xml
at org.apache.solr.core.CoreContainer.getCore(CoreContainer.java:1644)
The file itself:
ls -ls /var/solr/data/test/conf/solrconfig.xml
4 lrwxrwxrwx 1 solr solr 71 Mar 25 09:52 /var/solr/data/test/conf/solrconfig.xml -> /home/www/test/solrconfig.xml
Looks 1:1 with another core config. What am I missing?
Check, if the file /home/www/test/solrconfig.xml exits
Find out, under which user account solr is running. Use something like ps -efa | grep solr and check, if this user has access to /home/www/test/solrconfig.xml
If /var/solr/data/test/conf/solrconfig.xml and /home/www/test/solrconfig.xml resists at the same filesystem: try to use hardlinks instead of softlinks.

Mesosphere installation PermissionError:/genconf/config.yaml

I got a Mesosphere-EE, and install on fedora 23 server (kernel 4.4)with:
$bash dcos_generate_config.ee.sh --web –v
then output:
Running mesosphere/dcos-genconf docker with BUILD_DIR set to/home/mesos-ee/genconf
Usage of loopback devices is strongly discouraged for production use.Either use `--storage-opt dm.thinpooldev` or use `--storage-opt
dm.no_warn_on_loop_devices=true` to suppress this warning.
07:53:46:: Logger set to DEBUG
07:53:46:: ====> Starting DCOS installer in web mode
07:53:46:: DCOS Installer v1
07:53:46:: Starting server ('0.0.0.0', 9000)
Then I start firefox though vnc, the vnc is on root. then:
07:53:57:: Root page requested. 07:53:57:: Serving/usr/local/lib/python3.4/site-packages/dcos_installer/templates/index.html
07:53:58:: Request for configuration type made.
07:53:58::Configuration file not found, /genconf/config.yaml. Writing new onewith all defaults.
07:53:58:: Error handling request
PermissionError: [Errno 13] Permission denied: '/genconf/config.yaml'
But I already have a genconf/config.yaml, it look like:
bootstrap_url: http://<bootstrap_public_ip>:<your_port>
cluster_name: '<cluster-name>'
exhibitor_storage_backend: zookeeper
exhibitor_zk_hosts: <host1>:2181,<host2>:2181,<host3>:2181
exhibitor_zk_path: /dcos
master_discovery: static
master_list:
- <master-private-ip-1>
- <master-private-ip-2>
- <master-private-ip-3>
superuser_username: <username>
superuser_password_hash: <hashed-password>
resolvers:
- 8.8.8.8
- 8.8.4.4
I do not know what’s going on. If you have any idear, please let me know, thank you very much!
Disable Selinux!
Configure SELINUX=disabled in the /etc/selinux/config file and then reboot!
Be ensure the selinux is disabled by the command getenforce.
$ getenforce
Disabled
zhe.
Correctly installing the enterprise edition depends on the correct system prerequisites. Anyway I suppose you're still on the bootstrap node so I will give you some path to succed in your current task.
Run the script as root or as a user issuing sudo dcos_generate_config.ee.sh
The script will also generate the config file automatically; if you want to use your own configuration file then create a folder named genconf and put it inside before running the script. You should changes the values inside <> with your specific configuration. If you need more help for your specific case send me an email to infofs2 at gmail.com

mount using nfs4 giving no such device error

I am trying to mount a folder workspace from server to the client over nfs. For this I bind the folder to an /export by adding the following in my /etc/fstab on server:
/home /export none bind
Then I add the following lines in my /etc/exports on my server:
/export *(ro,sync,no_subtree_check,insecure,fsid=0)
/export/workspace *(rw,sync,no_subtree_check,insecure,nohide)
I load the exportfs file, and restart the nfs-kernel-server:
exportfs -vr
service nfs-kernel-server restart
I now go to my client and check which folders can be exported:
showmount -e 192.168.145.131
Export list fo 192.168.145.131:
/export/workspace *
/export *
But when I try mounting the folder, I get the following error:
sudo mount -t nfs4 192.168.145.131:/workspace nfs/ -v
mount.nfs4: timeout set for Sat Apr 19 19:16:51 2014
mount.nfs4: trying text-based options 'addr=192.168.145.131,clientaddr=192.168.145.128'
mount.nfs4: mount(2): No such device
mount.nfs4: No such device
I have also tried mounting :/export/workspace and :/home/workspace but that gives me the same error. I have tried loading the nfs module using modprobe on both client and server, but the module is loaded on both client and server.
Any help would be much appreciated. Thanks.
Solved the problem after 3 days!!
I tried mounting the nfs4 server folder from a client with a newer Kernel version (3.8). I was able to do so. So I copied the configuration file /boot/configure-3.8-generic file to my /usr/src/.config, and enabled the option Filesystems -> Network File Systems -> NFS3 client load as module and NFS4 client load as module.
compiled my kernel again, created initrd image, updated grub, and now I am able to mount the server folder from my 2.6 kernel client also!

Resources