[stork-users] Error: Cannot get state of machine

Slawek Figiel slawek at isc.org
Wed Jul 6 09:00:27 UTC 2022


Hi John!

 > That is correct.  There is an agent running on the server. Should I 
not?  I read somewhere in the documentation or in the readdoc.io that 
this may be necessary.  I had not considered that this may be the 
challenge I am experiencing.

The Stork Agent must be installed on the same machine as Kea Control 
Agent and Kea daemons. The agent needs direct access to the Control 
Agent configuration file and the Kea daemon process info.

I opened #801 to explain in detail the target localization of the agent 
in the documentation.

Thank you for your assistance, Kevin!

Slawek

On 05/07/2022 23:24, stork-users-request at lists.isc.org wrote:
> Send Stork-users mailing list submissions to
> 	stork-users at lists.isc.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> 	https://lists.isc.org/mailman/listinfo/stork-users
> or, via email, send a message with subject or body 'help' to
> 	stork-users-request at lists.isc.org
>
> You can reach the person managing the list at
> 	stork-users-owner at lists.isc.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Stork-users digest..."
>
>
> Today's Topics:
>
>     1. Error:  Cannot get state of machine (John Gammon)
>     2. Re: Error: Cannot get state of machine (Kevin P. Fleming)
>     3. Re: Error: Cannot get state of machine (John Gammon)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Tue, 5 Jul 2022 20:30:10 +0000
> From: John Gammon <john.gammon at forkeddeer.com>
> To: "stork-users at lists.isc.org" <stork-users at lists.isc.org>
> Subject: [stork-users] Error:  Cannot get state of machine
> Message-ID:
> 	<BN8PR19MB29626E41D21C779B18C9F76598819 at BN8PR19MB2962.namprd19.prod.outlook.com>
> 	
> Content-Type: text/plain; charset="iso-8859-1"
>
> Good afternoon, folks.
>
> I am building a TESTBENCH environment with a complete Kea, Stork, and database.  I am completing the prototype of what I will be expanding into a production environment eventually.
>
> I have three Stork 'machines' in the management console.  Each of the three are throwing the same error, "Cannot get state of machine".  I am curious as to why this error is being thrown.  I am able to see them in the air-gapped network and the configuration seems solid, according to the documentation.
>
> Any pointers in the right direction for troubleshooting?  I am including the .env files from our AIR-GAPPED TESTBENCH.
>
> <<-----------------------------server.env----------------------------->>
> /////////////////////////////////////////////////////////////////////////////////////////
> //  Date [YYYYMMDD] ... Initials [JPG||JV||MY||BV] ... Changes of record
> //-------------------------------------------------------------------------------------//
> ##  20220526...jpg...TESTBENCH Config Items for agent config
> /////////////////////////////////////////////////////////////////////////////////////////
> ### database settings
> ### the address of a PostgreSQL database
> STORK_DATABASE_HOST=localhost
> ### the port of a PostgreSQL database
> STORK_DATABASE_PORT=5432
> ### the name of a database
> STORK_DATABASE_NAME=stork
> ### the username for connecting to the database
> STORK_DATABASE_USER_NAME=stork
> ### the SSL mode for connecting to the database
> ### possible values: disable, require, verify-ca or verify-full
> # STORK_DATABASE_SSLMODE=
> ### the location of the SSL certificate used by the server to connect to the database
> # STORK_DATABASE_SSLCERT=
> ### the location of the SSL key used by the server to connect to the database
> # STORK_DATABASE_SSLKEY=
> ### the location of the root certificate file used to verify the database server's certificate
> # STORK_DATABASE_SSLROOTCERT=
> ### the password for the username connecting to the database
> ### empty password is set to avoid prompting a user for database password
> STORK_DATABASE_PASSWORD=D3f at ultP@ssW0rd5
>
> ### REST API settings
> ### IP address on which the server listens
> STORK_REST_HOST=6.6.6.2
> ### port number on which the server listens
> STORK_REST_PORT=8080
> ### a file with a certificate to use for secure connections
> # STORK_REST_TLS_CERTIFICATE=
> ### a file with a private key to use for secure connections
> # STORK_REST_TLS_PRIVATE_KEY=
> ### a certificate authority file used for mutual TLS authentication
> # STORK_REST_TLS_CA_CERTIFICATE=
> ### a directory with static files served in the UI
> STORK_REST_STATIC_FILES_DIR=/usr/share/stork/www
>
> ### Enable Prometheus /metrics HTTP endpoint for exporting metrics from
> ### the server to Prometheus. It is recommended to secure this endpoint
> ### (e.g. using HTTP proxy).
> # STORK_SERVER_ENABLE_METRICS=true
>
>
> <<-----------------------------agent.env----------------------------->>
> /////////////////////////////////////////////////////////////////////////////////////////
> //  Date [YYYYMMDD] ... Initials [JPG||JV||MY||BV] ... Changes of record
> //-------------------------------------------------------------------------------------//
> ##  20220526...jpg...TESTBENCH Config Items for agent config
> /////////////////////////////////////////////////////////////////////////////////////////
> ##
> ### the IP or hostname to listen on for incoming Stork server connections
> STORK_AGENT_HOST=6.6.6.2
>
> ### the TCP port to listen on for incoming Stork server connections
> STORK_AGENT_PORT=8080
>
> ### listen for commands from the Stork server only, but not for Prometheus requests
> STORK_AGENT_LISTEN_STORK_ONLY=true
>
> ### listen for Prometheus requests only, but not for commands from the Stork server
> # STORK_AGENT_LISTEN_PROMETHEUS_ONLY=true
>
> ### settings for exporting stats to Prometheus
> ### the IP or hostname on which the agent exports Kea statistics to Prometheus
> # STORK_AGENT_PROMETHEUS_KEA_EXPORTER_ADDRESS=
> ### the port on which the agent exports Kea statistics to Prometheus
> # STORK_AGENT_PROMETHEUS_KEA_EXPORTER_PORT=
> ### how often the agent collects stats from Kea, in seconds
> # STORK_AGENT_PROMETHEUS_KEA_EXPORTER_INTERVAL=
> ## enable or disable collecting per subnet stats from Kea
> # STORK_AGENT_PROMETHEUS_KEA_EXPORTER_PER_SUBNET_STATS=true
> ### the IP or hostname on which the agent exports BIND9 statistics to Prometheus
> # STORK_AGENT_PROMETHEUS_BIND9_EXPORTER_ADDRESS=
> ### the port on which the agent exports BIND9 statistics to Prometheus
> # STORK_AGENT_PROMETHEUS_BIND9_EXPORTER_PORT=
> ### how often the agent collects stats from BIND 9, in seconds
> # STORK_AGENT_PROMETHEUS_BIND9_EXPORTER_INTERVAL=
>
> ### Stork Server URL used by the agent to send REST commands to the server during agent registration
> STORK_AGENT_SERVER_URL=http://6.6.6.2
>
> ### skip TLS certificate verification when the Stork Agent connects
> ### to Kea over TLS and Kea uses self-signed certificates
> # STORK_AGENT_SKIP_TLS_CERT_VERIFICATION=true
>
>
>
> John Gammon
> Network Engineer
> Forked Deer Electric Cooperative, Inc./Forked Deer Connect, LLC.
> Halls, TN  38040
>
> John Gammon
>
> Network Engineer
>
> Office   731-903-4282
>
> john.gammon at forkeddeer.com<mailto:%20john.gammon at forkeddeer.com>
>
> [fdec logo]
>
> 1135 North Church Street
>
> PO Box 67
>
> Halls, TN 38040
>
> www.forkeddeer.com
>
>
> ------------------------------
>
> Message: 2
> Date: Tue, 5 Jul 2022 17:22:02 -0400
> From: "Kevin P. Fleming" <kevin at km6g.us>
> Cc: "stork-users at lists.isc.org" <stork-users at lists.isc.org>
> Subject: Re: [stork-users] Error: Cannot get state of machine
> Message-ID:
> 	<CAE+Udoro1Hg1g92iupy9a4ht5_1--Kxx2UYv5S3Wdp4L_=zjww at mail.gmail.com>
> Content-Type: text/plain; charset="UTF-8"
>
> You have STORK_AGENT_HOST and STORK_AGENT_SERVER_URL pointed to the
> same IP address. Are they running on the same machine?
>
> On Tue, Jul 5, 2022 at 4:30 PM John Gammon <john.gammon at forkeddeer.com> wrote:
>> Good afternoon, folks.
>>
>> I am building a TESTBENCH environment with a complete Kea, Stork, and database.  I am completing the prototype of what I will be expanding into a production environment eventually.
>>
>> I have three Stork 'machines' in the management console.  Each of the three are throwing the same error, "Cannot get state of machine".  I am curious as to why this error is being thrown.  I am able to see them in the air-gapped network and the configuration seems solid, according to the documentation.
>>
>> Any pointers in the right direction for troubleshooting?  I am including the .env files from our AIR-GAPPED TESTBENCH.
>>
>> <<-----------------------------server.env----------------------------->>
>> /////////////////////////////////////////////////////////////////////////////////////////
>> //  Date [YYYYMMDD] ... Initials [JPG||JV||MY||BV] ... Changes of record
>> //-------------------------------------------------------------------------------------//
>> ##  20220526...jpg...TESTBENCH Config Items for agent config
>> /////////////////////////////////////////////////////////////////////////////////////////
>> ### database settings
>> ### the address of a PostgreSQL database
>> STORK_DATABASE_HOST=localhost
>> ### the port of a PostgreSQL database
>> STORK_DATABASE_PORT=5432
>> ### the name of a database
>> STORK_DATABASE_NAME=stork
>> ### the username for connecting to the database
>> STORK_DATABASE_USER_NAME=stork
>> ### the SSL mode for connecting to the database
>> ### possible values: disable, require, verify-ca or verify-full
>> # STORK_DATABASE_SSLMODE=
>> ### the location of the SSL certificate used by the server to connect to the database
>> # STORK_DATABASE_SSLCERT=
>> ### the location of the SSL key used by the server to connect to the database
>> # STORK_DATABASE_SSLKEY=
>> ### the location of the root certificate file used to verify the database server's certificate
>> # STORK_DATABASE_SSLROOTCERT=
>> ### the password for the username connecting to the database
>> ### empty password is set to avoid prompting a user for database password
>> STORK_DATABASE_PASSWORD=D3f at ultP@ssW0rd5
>>
>> ### REST API settings
>> ### IP address on which the server listens
>> STORK_REST_HOST=6.6.6.2
>> ### port number on which the server listens
>> STORK_REST_PORT=8080
>> ### a file with a certificate to use for secure connections
>> # STORK_REST_TLS_CERTIFICATE=
>> ### a file with a private key to use for secure connections
>> # STORK_REST_TLS_PRIVATE_KEY=
>> ### a certificate authority file used for mutual TLS authentication
>> # STORK_REST_TLS_CA_CERTIFICATE=
>> ### a directory with static files served in the UI
>> STORK_REST_STATIC_FILES_DIR=/usr/share/stork/www
>>
>> ### Enable Prometheus /metrics HTTP endpoint for exporting metrics from
>> ### the server to Prometheus. It is recommended to secure this endpoint
>> ### (e.g. using HTTP proxy).
>> # STORK_SERVER_ENABLE_METRICS=true
>>
>>
>> <<-----------------------------agent.env----------------------------->>
>> /////////////////////////////////////////////////////////////////////////////////////////
>> //  Date [YYYYMMDD] ... Initials [JPG||JV||MY||BV] ... Changes of record
>> //-------------------------------------------------------------------------------------//
>> ##  20220526...jpg...TESTBENCH Config Items for agent config
>> /////////////////////////////////////////////////////////////////////////////////////////
>> ##
>> ### the IP or hostname to listen on for incoming Stork server connections
>> STORK_AGENT_HOST=6.6.6.2
>>
>> ### the TCP port to listen on for incoming Stork server connections
>> STORK_AGENT_PORT=8080
>>
>> ### listen for commands from the Stork server only, but not for Prometheus requests
>> STORK_AGENT_LISTEN_STORK_ONLY=true
>>
>> ### listen for Prometheus requests only, but not for commands from the Stork server
>> # STORK_AGENT_LISTEN_PROMETHEUS_ONLY=true
>>
>> ### settings for exporting stats to Prometheus
>> ### the IP or hostname on which the agent exports Kea statistics to Prometheus
>> # STORK_AGENT_PROMETHEUS_KEA_EXPORTER_ADDRESS=
>> ### the port on which the agent exports Kea statistics to Prometheus
>> # STORK_AGENT_PROMETHEUS_KEA_EXPORTER_PORT=
>> ### how often the agent collects stats from Kea, in seconds
>> # STORK_AGENT_PROMETHEUS_KEA_EXPORTER_INTERVAL=
>> ## enable or disable collecting per subnet stats from Kea
>> # STORK_AGENT_PROMETHEUS_KEA_EXPORTER_PER_SUBNET_STATS=true
>> ### the IP or hostname on which the agent exports BIND9 statistics to Prometheus
>> # STORK_AGENT_PROMETHEUS_BIND9_EXPORTER_ADDRESS=
>> ### the port on which the agent exports BIND9 statistics to Prometheus
>> # STORK_AGENT_PROMETHEUS_BIND9_EXPORTER_PORT=
>> ### how often the agent collects stats from BIND 9, in seconds
>> # STORK_AGENT_PROMETHEUS_BIND9_EXPORTER_INTERVAL=
>>
>> ### Stork Server URL used by the agent to send REST commands to the server during agent registration
>> STORK_AGENT_SERVER_URL=http://6.6.6.2
>>
>> ### skip TLS certificate verification when the Stork Agent connects
>> ### to Kea over TLS and Kea uses self-signed certificates
>> # STORK_AGENT_SKIP_TLS_CERT_VERIFICATION=true
>>
>>
>>
>> John Gammon
>> Network Engineer
>> Forked Deer Electric Cooperative, Inc./Forked Deer Connect, LLC.
>> Halls, TN  38040
>>
>> John Gammon
>>
>> Network Engineer
>>
>> Office   731-903-4282
>>
>> john.gammon at forkeddeer.com<mailto:%20john.gammon at forkeddeer.com>
>>
>> [fdec logo]
>>
>> 1135 North Church Street
>>
>> PO Box 67
>>
>> Halls, TN 38040
>>
>> www.forkeddeer.com
>> --
>> Stork-users mailing list
>> Stork-users at lists.isc.org
>> https://lists.isc.org/mailman/listinfo/stork-users
>
> ------------------------------
>
> Message: 3
> Date: Tue, 5 Jul 2022 21:27:51 +0000
> From: John Gammon <john.gammon at forkeddeer.com>
> To: "Kevin P. Fleming" <kevin at km6g.us>
> Cc: "stork-users at lists.isc.org" <stork-users at lists.isc.org>
> Subject: Re: [stork-users] Error: Cannot get state of machine
> Message-ID:
> 	<BN8PR19MB2962E4322346CDDEA341A83498819 at BN8PR19MB2962.namprd19.prod.outlook.com>
> 	
> Content-Type: text/plain; charset="us-ascii"
>
> @Kevin P. Fleming<mailto:kevin at km6g.us>
> That is correct.  There is an agent running on the server.  Should I not?  I read somewhere in the documentation or in the readdoc.io that this may be necessary.  I had not considered that this may be the challenge I am experiencing.
>
> R,
> John
> ________________________________
> From: Stork-users <stork-users-bounces at lists.isc.org> on behalf of Kevin P. Fleming <kevin at km6g.us>
> Sent: Tuesday, July 5, 2022 16:22
> Cc: stork-users at lists.isc.org <stork-users at lists.isc.org>
> Subject: Re: [stork-users] Error: Cannot get state of machine
>
> You have STORK_AGENT_HOST and STORK_AGENT_SERVER_URL pointed to the
> same IP address. Are they running on the same machine?
>
> On Tue, Jul 5, 2022 at 4:30 PM John Gammon <john.gammon at forkeddeer.com> wrote:
>> Good afternoon, folks.
>>
>> I am building a TESTBENCH environment with a complete Kea, Stork, and database.  I am completing the prototype of what I will be expanding into a production environment eventually.
>>
>> I have three Stork 'machines' in the management console.  Each of the three are throwing the same error, "Cannot get state of machine".  I am curious as to why this error is being thrown.  I am able to see them in the air-gapped network and the configuration seems solid, according to the documentation.
>>
>> Any pointers in the right direction for troubleshooting?  I am including the .env files from our AIR-GAPPED TESTBENCH.
>>
>> <<-----------------------------server.env----------------------------->>
>> /////////////////////////////////////////////////////////////////////////////////////////
>> //  Date [YYYYMMDD] ... Initials [JPG||JV||MY||BV] ... Changes of record
>> //-------------------------------------------------------------------------------------//
>> ##  20220526...jpg...TESTBENCH Config Items for agent config
>> /////////////////////////////////////////////////////////////////////////////////////////
>> ### database settings
>> ### the address of a PostgreSQL database
>> STORK_DATABASE_HOST=localhost
>> ### the port of a PostgreSQL database
>> STORK_DATABASE_PORT=5432
>> ### the name of a database
>> STORK_DATABASE_NAME=stork
>> ### the username for connecting to the database
>> STORK_DATABASE_USER_NAME=stork
>> ### the SSL mode for connecting to the database
>> ### possible values: disable, require, verify-ca or verify-full
>> # STORK_DATABASE_SSLMODE=
>> ### the location of the SSL certificate used by the server to connect to the database
>> # STORK_DATABASE_SSLCERT=
>> ### the location of the SSL key used by the server to connect to the database
>> # STORK_DATABASE_SSLKEY=
>> ### the location of the root certificate file used to verify the database server's certificate
>> # STORK_DATABASE_SSLROOTCERT=
>> ### the password for the username connecting to the database
>> ### empty password is set to avoid prompting a user for database password
>> STORK_DATABASE_PASSWORD=D3f at ultP@ssW0rd5
>>
>> ### REST API settings
>> ### IP address on which the server listens
>> STORK_REST_HOST=6.6.6.2
>> ### port number on which the server listens
>> STORK_REST_PORT=8080
>> ### a file with a certificate to use for secure connections
>> # STORK_REST_TLS_CERTIFICATE=
>> ### a file with a private key to use for secure connections
>> # STORK_REST_TLS_PRIVATE_KEY=
>> ### a certificate authority file used for mutual TLS authentication
>> # STORK_REST_TLS_CA_CERTIFICATE=
>> ### a directory with static files served in the UI
>> STORK_REST_STATIC_FILES_DIR=/usr/share/stork/www
>>
>> ### Enable Prometheus /metrics HTTP endpoint for exporting metrics from
>> ### the server to Prometheus. It is recommended to secure this endpoint
>> ### (e.g. using HTTP proxy).
>> # STORK_SERVER_ENABLE_METRICS=true
>>
>>
>> <<-----------------------------agent.env----------------------------->>
>> /////////////////////////////////////////////////////////////////////////////////////////
>> //  Date [YYYYMMDD] ... Initials [JPG||JV||MY||BV] ... Changes of record
>> //-------------------------------------------------------------------------------------//
>> ##  20220526...jpg...TESTBENCH Config Items for agent config
>> /////////////////////////////////////////////////////////////////////////////////////////
>> ##
>> ### the IP or hostname to listen on for incoming Stork server connections
>> STORK_AGENT_HOST=6.6.6.2
>>
>> ### the TCP port to listen on for incoming Stork server connections
>> STORK_AGENT_PORT=8080
>>
>> ### listen for commands from the Stork server only, but not for Prometheus requests
>> STORK_AGENT_LISTEN_STORK_ONLY=true
>>
>> ### listen for Prometheus requests only, but not for commands from the Stork server
>> # STORK_AGENT_LISTEN_PROMETHEUS_ONLY=true
>>
>> ### settings for exporting stats to Prometheus
>> ### the IP or hostname on which the agent exports Kea statistics to Prometheus
>> # STORK_AGENT_PROMETHEUS_KEA_EXPORTER_ADDRESS=
>> ### the port on which the agent exports Kea statistics to Prometheus
>> # STORK_AGENT_PROMETHEUS_KEA_EXPORTER_PORT=
>> ### how often the agent collects stats from Kea, in seconds
>> # STORK_AGENT_PROMETHEUS_KEA_EXPORTER_INTERVAL=
>> ## enable or disable collecting per subnet stats from Kea
>> # STORK_AGENT_PROMETHEUS_KEA_EXPORTER_PER_SUBNET_STATS=true
>> ### the IP or hostname on which the agent exports BIND9 statistics to Prometheus
>> # STORK_AGENT_PROMETHEUS_BIND9_EXPORTER_ADDRESS=
>> ### the port on which the agent exports BIND9 statistics to Prometheus
>> # STORK_AGENT_PROMETHEUS_BIND9_EXPORTER_PORT=
>> ### how often the agent collects stats from BIND 9, in seconds
>> # STORK_AGENT_PROMETHEUS_BIND9_EXPORTER_INTERVAL=
>>
>> ### Stork Server URL used by the agent to send REST commands to the server during agent registration
>> STORK_AGENT_SERVER_URL=http://6.6.6.2
>>
>> ### skip TLS certificate verification when the Stork Agent connects
>> ### to Kea over TLS and Kea uses self-signed certificates
>> # STORK_AGENT_SKIP_TLS_CERT_VERIFICATION=true
>>
>>
>>
>> John Gammon
>> Network Engineer
>> Forked Deer Electric Cooperative, Inc./Forked Deer Connect, LLC.
>> Halls, TN  38040
>>
>> John Gammon
>>
>> Network Engineer
>>
>> Office   731-903-4282
>>
>> john.gammon at forkeddeer.com<mailto:%20john.gammon at forkeddeer.com>
>>
>> [fdec logo]
>>
>> 1135 North Church Street
>>
>> PO Box 67
>>
>> Halls, TN 38040
>>
>> www.forkeddeer.com<http://www.forkeddeer.com>
>> --
>> Stork-users mailing list
>> Stork-users at lists.isc.org
>> https://lists.isc.org/mailman/listinfo/stork-users
> --
> Stork-users mailing list
> Stork-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/stork-users
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <https://lists.isc.org/pipermail/stork-users/attachments/20220705/c861005f/attachment.htm>
>
> ------------------------------
>
> Subject: Digest Footer
>
> Stork-users mailing list
> Stork-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/stork-users
>
>
> ------------------------------
>
> End of Stork-users Digest, Vol 29, Issue 1
> ******************************************


More information about the Stork-users mailing list