How to find execution status of a service on Remote computer? - status

sc query serviceName command will give the running status of specified service on local computer.
Also sc \\192.168.100.112 query serviceName will give the running status of specified service on remote computer whose ip address is 192.168.100.112.But when I used sc \\192.168.100.112 query serviceName, i am getting something like [SC] OpenSCManager FAILED 5:
Access is denied.
Can anyone throw some light on this?

Are you running this command under a domain admin account? It's a must for this to succeed.. Also notice that in W8K service names are case sensitive.

Related

How to grant privilege to CircleCI pipeline to query database during Cypress test?

I have a set of Cypress tests that query my client's MariaDB database.
In order to query the database during the tests, my client had to whitelist my IP address.
The problem is that they want these tests to run in a CircleCI pipeline.
When I run them in CircleCI, I get the below error:
ER_HOST_NOT_PRIVILEGED: Host 'ec2.xxx.compute-1.amazonaws.com' is not allowed to connect to this MariaDB server
I assume this is because the machine's IP address isn't whitelisted.
To resolve this, do I have to somehow get the IP address of the virtual machine & whitelist that?
Or do I need to make some change on the database side?

ERROR neutron.agent.dhcp.agent - Unexpected number of DHCP interfaces for metadata proxy

I constantly see this line of Error in neutron . I dont know how to solve it.
ERROR neutron.agent.dhcp.agent [-] Unexpected number of DHCP interfaces for metadata proxy, expected 1, got 3
thanks in advance
It's so simple. Just delete all DHCP agents from OpenStack and add a new agent to every controller node, then recover your MariaDB database with the Kolla-ansible module.
make sure that you have enough IPs to create new DHCP agents and that your network interface is configured correctly.
I ran into the exact same error message after upgrading neutron to victoria and opened a bug ticket for this. It ended up to be a bug in the ipv6 metadata implementation and is already fixed in the stable branches of neutron.
https://bugs.launchpad.net/neutron/+bug/1989979

corda CENM networkmap server start failing to connect database after a few week run

we operate CENM(1.2 and use helm template to run on k8s cluster) to construct our own private network and keep on running CENM network map server for a few week, then launching new node start failing.
with further investigation, its appeared that request timeout for http://nmap:10000/network-map causes problem.
in nmap server’s log, we found following output when access to above url with curl.
[NMServer] - Error while handling socket client message com.r3.enm.servicesapi.networkmap.handlers.LatestUnsignedNetworkParametersRetrievalMessage#760c53ea: HikariPool-1 - Connection is not available, request timed out after 30000ms.
netstat shows there is at least 3 establish connection to the database from the container which network map server runs, also I can connect database directly with using CLI.
so I don’t think it is neither database saturated nor network configuration problem.
anyone have an idea why this happens? I think restart probably solve the problem, but want to know the root cause...
regards,
Please test the following options.
Since it is the HikariCP (connection pool) component that is throwing the error it would be worth seeing if increasing the pool size in the network map configuration may help - see below)
Corda uses Hikari Pool for creating the connection pool. To configure the connection pool any custom properties can be set in the dataSourceProperties section.
dataSourceProperties = {
dataSourceClassName = "org.postgresql.ds.PGSimpleDataSource"
...
maximumPoolSize = 10
connectionTimeout = 50000
}
Has a healthcheck been conducted to verify there are sufficient resources on that postgres database i.e basic diagnostic checks ?
Another option to get more information logged from the network map service is to run with TRACE logging also:
From https://docs.corda.net/docs/cenm/1.2/troubleshooting-common-issues.html
Enabling debug/trace logging
Each service can be configured to run with a deeper log level via command line flags passed at startup:
java -DdefaultLogLevel=TRACE -DconsoleLogLevel=TRACE -jar <enm-service-jar>.jar --config-fi

ping database successfully, but got error: ORA-12154: TNS:could not resolve the connect identifier specified

I created an asp.net console application. It runs successfully on my local computer.
But after I deployed it to the dev server, I got the error: ORA-12154: TNS:could not resolve the connect identifier specified. I tried to ping the oracle database on the dev server and it was successful.
What could have gone wrong?
Can you share the connect details that you are configuring into your application?
When I connect to Oracle from Java, for example, I have to provide a hostname + SID + username (schema) + password. On the other hand, when I connect using SQL Developer or TOAD, I am able to leave off the hostname.
That's because there's a mechanism called "tnsnames" which provides the necessary networking glue to translate a SID into a network endpoint.

The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)

Occasionally I get this error when working on remote computers. It's hit or miss on which computer I get it on. But I am able to ping the computer and test-connection pans out. For example, the computer I got this error on today I was able to get to yesterday. I know the computer is on because It's right next me.
Get-WmiObject : The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)
At line:1 char:14
+ get-wmiObject <<<< -Class win32_operatingsystem -ComputerName $current -Authentication 6 -credential $credential | Invoke-WMIMethod -name Win32Shutdown
+ CategoryInfo : InvalidOperation: (:) [Get-WmiObject], COMException
+ FullyQualifiedErrorId : GetWMICOMException,Microsoft.PowerShell.Commands.GetWmiObjectCommand
Check to see if the Remote Procedure Call (RPC) service is running. If it is, then it's a firewall issue between your workstation and the server. You can test it by temporary disabling the firewall and retrying the command.
Edit after comment:
Ok, it's a firewall issue. You'll have to either limit the ports WMI/RPC work on, or open a lot of ports in the McAfee firewall.
Here are a few sites that explain this:
Microsoft KB for limiting ports
McAfee site talking about the same thing
You may get your answer here: Get-WmiObject : The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)
UPDATE
It might be due to various issues.I cant say which one is there in your case. It may be because:
DCOM is not enabled in host pc or target pc or on both
your firewall or even your antivirus is preventing the access
any WMI related service is disabled
Some WMI related services are:
Remote Access Auto Connection Manager
Remote Access Connection Manager
Remote Procedure Call (RPC)
Remote Procedure Call (RPC) Locator
Remote Registry
For DCOM settings refer to registry key HKLM\Software\Microsoft\OLE, value EnableDCOM. The value should be set to 'Y'.
My problem turned out to be blank spaces in the txt file that I was using to feed the WMI Powershell script.
I had the same problem when trying to run a PowerShell script that only looked at a remote server to read the size of a hard disk.
I turned off the Firewall (Domain networks, Private networks, and Guest or public network) on the remote server and the script worked.
I then turned the Firewall for Domain networks back on, and it worked.
I then turned the Firewall for Private network back on, and it also worked.
I then turned the Firewall for Guest or public networks, and it also worked.
Duting create cluster, my error was:
An error occurred while creating the cluster.
Could not determine Management Point Network Type.
The RPC server is unavailable
Solution:
Server Manager
Local Server
Click on one of the network adapter links, like "Ethernet".
Control Panel\Network and Internet\Network Connections
Right click on the first network adapter
Internet Protocol Version 4 (TCP/IPv4)
Properties
Advanced
DNS
Click radio button:
Append primary and connection specific DNS suffixes
If anyone else is reading this eons later. My problem was I deployed a GPO a few months ago that disables printer spooling via Windows Firewall rules. One of the rules is "File and printer sharing (Spooler Service - RPC-EPMAP)". This was set to deny.
This blocked the "RPC Endpoint Mapper" port range inbound and didn't specify a service. As a result this was blocking all traffic inbound on all RPC ports (tcp 1024-5000).
Disables the rule and this magically started working again.
TLDR; You need to allow the RPC Endpoint Mapper port range inbound on Windows firewall (tcp 1024-500) along with the WMI-In rule.

Resources