Closed txolo99 closed 6 months ago
@txolo99 after 1.8.1-0 and 1.9.0-0, only root user can query and start omiagent with scxadmin -start or scxadmin -restart. your logs and omi/scxadmin behavior looks as expected.
All the commands are executed as root but the problem persists:
# id
uid=0(root) gid=0(root) groups=0(root)
# scxadmin -restart
Trying to stop omi with systemctl
omi is stopped.
Trying to start omi with systemctl
omi is started.
# scxadmin -status
omiserver: is running
omiagent: is stopped
@txolo99 any impact on SCOM side?
@txolo99 any impact on SCOM side?
No, I'm executing all the time the commands as root.
@txolo99 by default below is good at the beginning, but if you query scx provider classes like /opt/omi/bin/omicli ei root/scx SCX_OperatingSystem
and /opt/omi/bin/omicli ei root/scx SCX_Agent
you will see more omiagent instances. that's by design.
# scxadmin -status
omiserver: is running
omiagent: is stopped
# /opt/omi/bin/omicli ei root/scx SCX_OperatingSystem
instance of SCX_OperatingSystem
{
Caption=Debian GNU/Linux 11.0 (x86_64)
Description=Debian GNU/Linux 11.0 (x86_64)
[Key] Name=Linux Distribution
EnabledState=5
RequestedState=12
EnabledDefault=2
[Key] CSCreationClassName=SCX_ComputerSystem
[Key] CSName=xxxxxxxxx
[Key] CreationClassName=SCX_OperatingSystem
OSType=36
OtherTypeDescription=5.10.0-21-amd64 #1 SMP Debian 5.10.162-1 (2023-01-21) x86_64
Version=11.0
LastBootUpTime=20240417105217.000000+000
LocalDateTime=20240513074116.401102+000
CurrentTimeZone=120
NumberOfLicensedUsers=0
NumberOfUsers=2
NumberOfProcesses=321
MaxNumberOfProcesses=127791
TotalSwapSpaceSize=10484732
TotalVirtualMemorySize=26877932
FreeVirtualMemory=8198844
FreePhysicalMemory=1317416
TotalVisibleMemorySize=16393200
SizeStoredInPagingFiles=10484732
FreeSpaceInPagingFiles=6881428
MaxProcessMemorySize=0
MaxProcessesPerUser=63895
OperatingSystemCapability=64 bit
SystemUpTime=2234954
}
# /opt/omi/bin/omicli ei root/scx SCX_Agent
instance of SCX_Agent
{
Caption=SCX Agent meta-information
Description=Release_Build - 20240228
InstallDate=20240508110151.000000+000
[Key] Name=scx
VersionString=1.9.0-0
MajorVersion=1
MinorVersion=9
RevisionNumber=0
BuildNumber=0
BuildDate=2024-02-28T00:00:00Z
Architecture=x64
OSName=Debian GNU/Linux
OSType=Linux
OSVersion=11.0
KitVersionString=1.9.0-0
Hostname=xxxxxxxx
OSAlias=UniversalD
UnameArchitecture=x86_64
MinActiveLogSeverityThreshold=INFO
MachineType=Virtual
PhysicalProcessors=4
LogicalProcessors=4
}
now you check scxadmin -status
, you will see 2 omiagent instances running.
now you check
scxadmin -status
, you will see 2 omiagent instances running.
Yes:
# scxadmin -status
omiserver: is running
omiagent: 2 instances running
In normal SCOM case, SCOM will requests to omi with HTTPS WSMan request with 1270 port which has HTTPSPORT setting in /etc/opt/omi/conf/omiserver.conf
file and there will be 1 or 2 omiagent process(s) be launched by omiserver/omiengine, in that case you needn't to run omicli commands.
In normal SCOM case, SCOM will requests to omi with HTTPS WSMan request with 1270 port which has HTTPSPORT setting in
/etc/opt/omi/conf/omiserver.conf
file and there will be 1 or 2 omiagent process(s) be launched by omiserver/omiengine, in that case you needn't to run omicli commands.
The parameter HTTSPORT is configured in that file but the omiagent processes don't start automatically:
# cat /etc/opt/omi/conf/omiserver.conf
# omiserver configuration file
##
## httpport -- listening port for the binary protocol (default is 5985)
##
httpport=0
##
## httpsport -- listening port for the binary protocol (default is 5986)
##
httpsport=0,1270
##
## idletimeout -- idle providers unload timeout in seconds (defualt is 90)
##
#idletimeout=TIMEOUT
##
## loglevel -- set the loggiing options for MI server
## Valid options are: ERROR, WARNING, INFO, DEBUG, VERBOSE (debug builds only)
## If commented out, then default value is: WARNING
##
loglevel = DEBUG
##
## NtlmCredsFile -- credentials file for NTLM authentication
##
## To enable NTLM authentication via negotiation (SPNEGO), specify the
## location of the credentials file. This file is in the form:
##
## <domain>:<username>:<password>
##
## For further information, please see: https://github.com/Microsoft/omi/blob/master/Unix/doc/setup-ntlm-omi.md
##
#NtlmCredsFile=/etc/opt/omi/.creds/ntlm
##
## Settings for omi-related directory and file paths.
## You can modify below default path value to other location.
##
## omi log folder and log file
#logdir=/var/opt/omi/log
#logfile=/var/opt/omi/log/omiserver.log
##
## The cert and its private key for TLS/SSL communication
## pemfile -- The certificate to use for TLS/SSL communication
## For pemfile, its owner is root user
## keyfile -- The private key that corresponds to the TLS/SSL certificate
## To modify keyfile, make sure its owner is `omi:omi`:
## run `chown omi:omi /yourpath/omikey.pem`
##
#pemfile=/etc/opt/omi/ssl/omi.pem
#keyfile=/etc/opt/omi/ssl/omikey.pem
##
## This section is for security protocol settings
## NoSSLv2: When it is true, the SSLv2 protocol is disabled.
## NoSSLv3: When it is true, the SSLv3 protocol is disabled.
## If NoSSLv2 and NoSSLv3 are both set to true, only TLS encryption will be negotiated.
##
#NoSSLv2=true
#NoSSLv3=false
# Enabling this will cause each provider to run under it's own omiagent
# process. This will take considerably more memory, but is useful for
# diagnosing omiagent cores due to a provider fault. Setting of `true`
# means that each provider runs under it's own omiagent process.
#agentDebugging=false
# List of authorized and unauthorized user groups, separated by commas.
# Both local and domain groups can be listed. For example:
# AuthorizedGroups=SCX\scx local admins, SCX\domain users, adm
# UnauthorizedGroups=games
# If both parameters are blank (default), authorization checks are not
# performed. For more info, see
# https://github.com/Microsoft/omi/tree/master/Unix/doc/allow-deny-handling.md
#AuthorizedGroups=
#UnauthorizedGroups=
that means your SCOM doesn't discover current box. do you see the current box agent status on SCOM console?
that means your SCOM doesn't discover current box. do you see the current box agent status on SCOM console?
The status on SCOM is not good, and does not seem to connect with the agent.
In other server with less version of the agent I could see three instances of the omiagent:
# scxadmin -status
omiserver: is running
omiagent: 3 instances running
May be another process still to be started?
on your other server , you can run ps -ef|grep omiagent
to check the 3 omiagent instances. that should be fine.
For the not good status agent, you need to discover it then it will be there on your SCOM console.
In other server the output is:
# ps -ef | grep omiagent
omi 1725 1255 0 Mar15 ? 00:02:32 /opt/omi/bin/omiagent 12 14 --destdir / --providerdir /opt/omi/lib --loglevel WARNING
root 1906 1255 0 Mar15 ? 00:41:06 /opt/omi/bin/omiagent 12 14 --destdir / --providerdir /opt/omi/lib --loglevel WARNING
scxmon 2340 1255 0 Mar15 ? 00:02:53 /opt/omi/bin/omiagent 12 14 --destdir / --providerdir /opt/omi/lib --loglevel WARNING
root 1268763 661828 0 09:08 pts/0 00:00:00 grep --color=auto omiagent
I've deleted the agent on SCOM console (without deinstall), but in the pending agents doesn't appear.
delete the agent will not affect Linux agent box, that doesn't uninstall the scx agent on Linux box. for non-discover Linux box, they will keep what they are, as they are not connected to SCOM.
In this server the result is ok but in other when I'm trying to detect that server on the SCOM console always throws this error:
Unexpected DiscoveryResult.ErrorData type. Please file bug report.
ErrorData: System.NullReferenceException
Referencia a objeto no establecida como instancia de un objeto.
en System.Activities.WorkflowApplication.Invoke(Activity activity, IDictionary`2 inputs, WorkflowInstanceExtensionManager extensions, TimeSpan timeout)
en System.Activities.WorkflowInvoker.Invoke(Activity workflow, IDictionary`2 inputs, TimeSpan timeout, WorkflowInstanceExtensionManager extensions)
en Microsoft.SystemCenter.CrossPlatform.ClientActions.DefaultDiscovery.InvokeWorkflow(IManagedObject managementActionPoint, DiscoveryTargetEndpoint criteria, IInstallableAgents installableAgents)
I've followed this link but whithout success.
In this server the result is ok but in other when I'm trying to detect that server on the SCOM console always throws this error:
Unexpected DiscoveryResult.ErrorData type. Please file bug report. ErrorData: System.NullReferenceException Referencia a objeto no establecida como instancia de un objeto. en System.Activities.WorkflowApplication.Invoke(Activity activity, IDictionary`2 inputs, WorkflowInstanceExtensionManager extensions, TimeSpan timeout) en System.Activities.WorkflowInvoker.Invoke(Activity workflow, IDictionary`2 inputs, TimeSpan timeout, WorkflowInstanceExtensionManager extensions) en Microsoft.SystemCenter.CrossPlatform.ClientActions.DefaultDiscovery.InvokeWorkflow(IManagedObject managementActionPoint, DiscoveryTargetEndpoint criteria, IInstallableAgents installableAgents)
I've followed this link but whithout success.
I answer myself... There were old processes up, so I've killed them and started with scxadmin and then the SCOM console recognized it.
Thanks for everything
good to know it works. :)
After upgrade to OMI-1.9.0-0, the agent doesn't start.