Category Archives: How to Fix

Spock + powermock simulation static method reports an error java.lang.classcastexception

Question:

When using Spock + powermock to simulate static methods, the following errors are encountered:

javax.xml.parsers.FactoryConfigurationError: Provider com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl could not be instantiated: java.lang.ClassCastException: com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl cannot be cast to javax.xml.parsers.DocumentBuilderFactory

	at javax.xml.parsers.FactoryFinder.newInstance(FactoryFinder.java:204)
	at javax.xml.parsers.FactoryFinder.newInstance(FactoryFinder.java:152)
	at javax.xml.parsers.FactoryFinder.find(FactoryFinder.java:277)
	at javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFactory.java:120)
	at org.apache.logging.log4j.core.config.xml.XmlConfiguration.newDocumentBuilder(XmlConfiguration.java:183)
	at org.apache.logging.log4j.core.config.xml.XmlConfiguration.<init>(XmlConfiguration.java:89)
	at org.apache.logging.log4j.core.config.xml.XmlConfigurationFactory.getConfiguration(XmlConfigurationFactory.java:46)
	at org.apache.logging.log4j.core.config.ConfigurationFactory$Factory.getConfiguration(ConfigurationFactory.java:517)
	at org.apache.logging.log4j.core.config.ConfigurationFactory$Factory.getConfiguration(ConfigurationFactory.java:492)
	at org.apache.logging.log4j.core.config.ConfigurationFactory$Factory.getConfiguration(ConfigurationFactory.java:405)
	at org.apache.logging.log4j.core.config.ConfigurationFactory.getConfiguration(ConfigurationFactory.java:323)
	at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:687)
	at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:708)
	at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:263)
	at org.apache.logging.log4j.core.async.AsyncLoggerContext.start(AsyncLoggerContext.java:76)
	at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:153)
	at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:45)
	at org.apache.logging.log4j.LogManager.getContext(LogManager.java:194)
	at org.apache.logging.log4j.spi.AbstractLoggerAdapter.getContext(AbstractLoggerAdapter.java:138)
	at org.apache.logging.slf4j.Log4jLoggerFactory.getContext(Log4jLoggerFactory.java:45)
	at org.apache.logging.log4j.spi.AbstractLoggerAdapter.getLogger(AbstractLoggerAdapter.java:48)
	at org.apache.logging.slf4j.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:30)
	at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:358)
	at org.slf4j.LoggerFactory$getLogger.call(Unknown Source)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:115)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:127)
	at com.athaydes.spockframework.report.SpockReportExtension.<clinit>(SpockReportExtension.groovy)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
	at java.lang.Class.newInstance(Class.java:442)
	at org.spockframework.runtime.GlobalExtensionRegistry.instantiateGlobalExtension(GlobalExtensionRegistry.java:88)
	at org.spockframework.runtime.GlobalExtensionRegistry.initializeGlobalExtensions(GlobalExtensionRegistry.java:58)
	at org.spockframework.runtime.RunContext.start(RunContext.java:56)
	at org.spockframework.runtime.RunContext.get(RunContext.java:166)
	at org.spockframework.runtime.Sputnik.runExtensionsIfNecessary(Sputnik.java:90)
	at org.spockframework.runtime.Sputnik.getDescription(Sputnik.java:54)
	at org.powermock.modules.junit4.internal.impl.DelegatingPowerMockRunner.getDescription(DelegatingPowerMockRunner.java:164)
	at org.powermock.modules.junit4.common.internal.impl.JUnit4TestSuiteChunkerImpl.getDescription(JUnit4TestSuiteChunkerImpl.java:194)
	at org.powermock.modules.junit4.common.internal.impl.AbstractCommonPowerMockRunner.getDescription(AbstractCommonPowerMockRunner.java:51)
	at org.junit.runners.model.RunnerBuilder.configureRunner(RunnerBuilder.java:81)
	at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:72)
	at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:37)
	at org.junit.vintage.engine.discovery.DefensiveAllDefaultPossibilitiesBuilder.runnerForClass(DefensiveAllDefaultPossibilitiesBuilder.java:57)
	at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:70)
	at org.junit.vintage.engine.discovery.ClassSelectorResolver.resolveTestClass(ClassSelectorResolver.java:66)
	at org.junit.vintage.engine.discovery.ClassSelectorResolver.resolve(ClassSelectorResolver.java:47)
	at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.lambda$resolve$2(EngineDiscoveryRequestResolution.java:134)
	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
	at java.util.ArrayList$ArrayListSpliterator.tryAdvance(ArrayList.java:1361)
	at java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:126)
	at java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:499)
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:486)
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
	at java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:152)
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:464)
	at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.resolve(EngineDiscoveryRequestResolution.java:185)
	at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.resolve(EngineDiscoveryRequestResolution.java:125)
	at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.resolveCompletely(EngineDiscoveryRequestResolution.java:91)
	at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.run(EngineDiscoveryRequestResolution.java:82)
	at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolver.resolve(EngineDiscoveryRequestResolver.java:113)
	at org.junit.vintage.engine.discovery.VintageDiscoverer.discover(VintageDiscoverer.java:44)
	at org.junit.vintage.engine.VintageTestEngine.discover(VintageTestEngine.java:63)
	at org.junit.platform.launcher.core.DefaultLauncher.discoverEngineRoot(DefaultLauncher.java:181)
	at org.junit.platform.launcher.core.DefaultLauncher.discoverRoot(DefaultLauncher.java:168)
	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:132)
	at com.intellij.junit5.JUnit5IdeaTestRunner.startRunnerWithArgs(JUnit5IdeaTestRunner.java:71)
	at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:33)
	at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:221)
	at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:54)
	
Caused by: java.lang.ClassCastException: com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl cannot be cast to javax.xml.parsers.DocumentBuilderFactory
	at javax.xml.parsers.FactoryFinder.newInstance(FactoryFinder.java:190)
	... 72 more

resolvent

Add this comment to the error reporting unit test class:

@PowerMockIgnore(["org.w3c.dom.*", "javax.xml.*", "org.xml.*"])

Dubbo SPI custom equalization policy error

 

Problem Description: I use idea to create   Meta-inf/Dubbo folder. However, due to idea’s own reasons, two layers of folders cannot be created continuously.

META-INF.dubbo     It was actually created by a   Meta-inf.dubbo folder.

Cause error:

No such extension org.apache.dubbo.rpc.cluster.loadbalance by name XX, no related exception was found, please check whatever related SPI module is missing.

solution:

Create folders layer by layer. Ensure that there are meta-inf and Dubbo folders under the resource, then there is no problem

VCSA web access error 503 Service Unavailable

Problem Description:

VCSA running well suddenly cannot be accessed, and the web page reports an error:
503 service unavailable (failed to connect to endpoint: [[n7vmacore4http16localservicespec: 0x00005649e04415e0] _servernamespace =/_isredirect = false _pipename =/var/run/VMware/vpxd webserver pipe)


Cause analysis:

https://kb-uat.vmware.com/s/article/67818?lang=zh_cn

The reasons I often encounter are:

    vCenter server appliance (VCSA) high virtual disk space (76563) check the expiration date of the certificate on vCenter server (79248/82332) vSphere vxpd service of VCSA is abnormal and does not operate normally;


    Solution:

    1、 VCenter server appliance (VCSA) high virtual disk space (76563)

    https://kb-uat.vmware.com/s/article/76563?lang=zh_cn

      log in to the vCenter server appliance as root through SSH or through the vCenter virtual machine console to find out which partitions are full;

      df -h
      

      Run the following command to find partitions that are 85% full or higher:

      df -h |awk '0+$5 >= 85 {print}'
      

      Find large log files and delete them if they are useless. Note: *. Tgz files are archived log package files and can be removed.

      find /storage/log -type f -size +100M
      

    2、 Check the expiration date of the certificate on the vCenter server (79248/82332)

    https://kb.vmware.com/s/article/79248?lang=zh_ cn
    https://kb-uat.vmware.com/s/article/82332

    The expiration of this certificate is often encountered on vcsa6.0, because the STS certificate of vcsa6.0 generally expires in 2 years. It is very difficult to hang up as soon as it expires. Encountered two or three times. According to the official KB, I failed to handle it successfully once. I don’t understand why ~. Finally, the toss is to redeploy the VCSA, which is faster and easier (provided that there are fewer managed hosts on your VCSA, and it’s not troublesome to add it again)
    however, this problem has not been encountered in vcsa6.5 and above. If you encounter it, please refer to the official KB.

    3、 VSphere vxpd service of VCSA is abnormal and is not running normally

    In the past, I deployed VCSA myself as “vCenter server with an embedded platform services controller”, and then encountered 503 errors. VCSA also looked at the space utilization and vSphere client services, but vSphere vxpd services couldn’t work. After a closer look, I found that the VCSA architecture was “vCenter server with an external platform services controller”, There is also a separate platform services controller virtual machine. It is suspected that there is a problem with the PSC, but the root password is not known, so it can only be forcibly restarted. Due to abnormal shutdown, the startup enters the emergency rescue mode,
    prompt failed to start system check on/dev/disk/by partuuid/* * *
    backhand is one

    fsck /dev/disk/by-partuuid/***
    

    Restart it again, start it normally, return to VCSA and restart all services

    service-control --stop --all
    service-control --start --all
    

    So far, VCSA has finally been accessed normally.

Error reporting processing of pyinstaller packaging geopandas environment

Article catalog

1. Iteration error of geopandas occurs when executing exe. 2. Fiona cannot be found when executing exe_ Shim3. Cannot find fiona.shema4. Summary by executing exe

First, use pyinstaller – F main.py to package the code into an EXE with a black window. The following are some problems and solutions

1. The iteration error of geopandas occurs when executing exe

The error information is as follows:

(gis_data_process) D:\code\gis_data_processing>main.exe
Traceback (most recent call last):
  File "main.py", line 10, in <module>
    from gis_data_process import *
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "PyInstaller\loader\pyimod03_importers.py", line 546, in exec_module
  File "gis_data_process.py", line 7, in <module>
    import geopandas
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "PyInstaller\loader\pyimod03_importers.py", line 546, in exec_module
  File "geopandas\__init__.py", line 17, in <module>
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "PyInstaller\loader\pyimod03_importers.py", line 546, in exec_module
  File "geopandas\datasets\__init__.py", line 6, in <module>
StopIteration
[24328] Failed to execute script 'main' due to unhandled exception!

The solution is as follows:

    comment geopandas\__ init__. Py line 17 code “import geopandas. Datasets # noqa” delete the build, dist and spec files generated by packaging and reuse pyinstaller – f main. Py packaging

    2. Execute exe and cannot find Fiona_ shim

    The error information is as follows:

    (gis_data_process) D:\code\gis_data_processing>main.exe
    Unhandled exception in thread started by <bound method GISDataProcess.generate_file_execute of <__main__.GISDataProcess object at 0x0000021A0C5D8DC8>>
    Traceback (most recent call last):
      File "main.py", line 156, in generate_file_execute
        generate_shapefile(file_path, shape_path)
      File "gis_data_process.py", line 172, in generate_shapefile
        kml_to_shapefile(kml_path, shape_path)
      File "gis_data_process.py", line 417, in kml_to_shapefile
        geojson_to_shapefile(geojson_path, shape_path)
      File "gis_data_process.py", line 220, in geojson_to_shapefile
        geometry = geopandas.read_file(geojson_path)
      File "geopandas\io\file.py", line 166, in _read_file
      File "geopandas\io\file.py", line 81, in _check_fiona
    ImportError: the 'read_file' function requires the 'fiona' package, but it is not installed or does not import correctly.
    Importing fiona resulted in: No module named 'fiona._shim'
    

    The solution is as follows:

      find the. Spec file generated by packaging, find hiddenimports, add “Fiona. _shim”, delete the build and dist directories generated by packaging, and use pyinstaller main.spec to package and generate exe

      3. Fiona.shema cannot be found by executing exe

      The error information is as follows:

      (gis_data_process) D:\code\gis_data_processing>main.exe
      Unhandled exception in thread started by <bound method GISDataProcess.generate_file_execute of <__main__.GISDataProcess object at 0x00000220B655B5E8>>
      Traceback (most recent call last):
        File "main.py", line 156, in generate_file_execute
          generate_shapefile(file_path, shape_path)
        File "gis_data_process.py", line 172, in generate_shapefile
          kml_to_shapefile(kml_path, shape_path)
        File "gis_data_process.py", line 417, in kml_to_shapefile
          geojson_to_shapefile(geojson_path, shape_path)
        File "gis_data_process.py", line 220, in geojson_to_shapefile
          geometry = geopandas.read_file(geojson_path)
        File "geopandas\io\file.py", line 166, in _read_file
        File "geopandas\io\file.py", line 81, in _check_fiona
      ImportError: the 'read_file' function requires the 'fiona' package, but it is not installed or does not import correctly.
      Importing fiona resulted in: No module named 'fiona.schema'
      

      The solution is as follows:

        find the. Spec file generated by packaging, find hiddenimports, add “Fiona. Schema”, delete the build and dist directories generated by packaging, and use pyinstaller main.spec to package and generate exe

        4. Summary

        After the above three steps are completed, you can successfully package into exe, but opening exe has a black window. You can change console = true to console = false in the spec file, and then use pyinstaller main.spec to package and generate exe, so that there is no black window

XLRDError: Excel xlsx file; Not supported error reporting solutions

The reason is that pip is installed with the latest version 2.0.1 and only supports. XLS files. So pandas.read_ Excel (‘xxx. Xlsx ‘) will report an error.

You can install the old version xlrd and execute the command in CMD:

pip uninstall xlrd
pip install xlrd==1.2.0

Solved the error report!

Homebrew reports an error after upgrading MacOS to Big Sur

Question

Homebrew reports an error after upgrading MacOS to Big Sur, as follows:

$ brew
Traceback (most recent call last):
	23: from /usr/local/Library/Homebrew/brew.rb:6:in `<main>'
	22: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
	21: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
	20: from /usr/local/Library/Homebrew/global.rb:3:in `<top (required)>'
	19: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
	18: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
	17: from /usr/local/Library/Homebrew/extend/pathname.rb:4:in `<top (required)>'
	16: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
	15: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
	14: from /usr/local/Library/Homebrew/utils.rb:2:in `<top (required)>'
	13: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
	12: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
	11: from /usr/local/Library/Homebrew/emoji.rb:24:in `<top (required)>'
	10: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
	 9: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
	 8: from /usr/local/Library/Homebrew/extend/os/emoji.rb:1:in `<top (required)>'
	 7: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
	 6: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
	 5: from /usr/local/Library/Homebrew/os.rb:1:in `<top (required)>'
	 4: from /usr/local/Library/Homebrew/os.rb:18:in `<module:OS>'
	 3: from /usr/local/Library/Homebrew/os/mac.rb:21:in `version'
	 2: from /usr/local/Library/Homebrew/os/mac.rb:21:in `new'
	 1: from /usr/local/Library/Homebrew/os/mac/version.rb:26:in `initialize'
/usr/local/Library/Homebrew/version.rb:198:in `initialize': Version value must be a string; got a NilClass () (TypeError)

terms of settlement

Modify the/usr/local/library/homebrew/version.rb file and change @ version in the initialize function to a specific value, such as:

  def initialize(val)
    if val.respond_to?(:to_str)
      @version = val.to_str
    else
      raise TypeError, "Version value must be a string; got a #{val.class} (#{val})"
    end
  end

Change to

  def initialize(val)
    if val.respond_to?(:to_str)
      @version = '10.15.7'
    else
      raise TypeError, "Version value must be a string; got a #{val.class} (#{val})"
    end
  end

How to query the production environment logstash report error parsing JSON

1. Some errors are reported in the production environment

The information is as follows:

2021-10-15T15:49:28,932][WARN ][logstash.filters.json    ][main][7e17a3dc7e2c6df08ed7012ca6bfe17e3277d05d745f2c5bf55d2b01b151e25b] Error parsing json {:source=>"message", :raw=>"查询用户详情接口", :exception=>#<LogStash::Json::ParserError: Invalid UTF-8 start byte 0x9f
 at [Source: (byte[])"Query user details interface"; line: 1, column: 3]>}
[2021-10-15T15:49:28,946][ERROR][logstash.outputs.elasticsearch][main][862f1cf74fcefb4312e0b0aa2e9fdf074e2e77c675e5c24e9b7a04d1054f1947] Could not index event to Elasticsearch. {:status=>400, :action=>["index", {:_id=>nil, :_index=>"%{aName}-log_2021_10", :routing=>nil, :_type=>"_doc"}, #<LogStash::Event:0x6527baeb>], :response=>{"index"=>{"_index"=>"%{aName}-log_2021_10", "_type"=>"_doc", "_id"=>nil, "status"=>400, "error"=>{"type"=>"invalid_index_name_exception", "reason"=>"Invalid index name [%{aName}-log_2021_10], must be lowercase", "index_uuid"=>"_na_", "index"=>"%{aName}-log_2021_10"}}}}
[2021-10-15T15:49:29,446][WARN ][logstash.filters.json    ][main][52e7421840cd9e07ac4081f9b005972562be1954f89c4f4bc5e30c5c19ebae78] Error parsing json {:source=>"message", :raw=>"spAuthAttributes ==========> {\"chainCodes\":\"60d9acb97314488689b899f4495e0857,3d01cb64635b46d4955606e6b356af70,c3283b04c2ad48a09d770b5a96b96a4c,850ff333c6664138b38344a75545ce8e\",\"customLoginStyle\":\"default\",\"samlEntityID\":\"portal\",\"securityLevel\":\"1\",\"spCode\":\"portal\",\"spLocalLogoutUrl\":\"\",\"spName\":\"portal\",\"spOsType\":0,\"tokenValidPeriod\":36000,\"url\":\"https://i.gt.cn\",\"userAttr\":\"\"}", :exception=>#<LogStash::Json::ParserError: Unrecognized token 'spAuthAttributes': was expecting ('true', 'false' or 'null')
 at [Source: (byte[])"spAuthAttributes ==========> {"chainCodes":"60d9acb97314488689b899f4495e0857,3d01cb64635b46d4955606e6b356af70,c3283b04c2ad48a09d770b5a96b96a4c,850ff333c6664138b38344a75545ce8e","customLoginStyle":"default","samlEntityID":"portal","securityLevel":"1","spCode":"portal","spLocalLogoutUrl":"","spName":"portal","spOsType":0,"tokenValidPeriod":36000,"url":"https://i.gt.cn","userAttr":""}"; line: 1, column: 18]>}
[2021-10-15T15:49:29,447][WARN ][logstash.filters.json    ][main][52e7421840cd9e07ac4081f9b005972562be1954f89c4f4bc5e30c5c19ebae78] Error parsing json {:source=>"message", :raw=>"redis执行时间:{}1", :exception=>#<LogStash::Json::ParserError: Unrecognized token 'redis执行时间': was expecting ('true', 'false' or 'null')
 at [Source: (byte[])"redis execution time: {}1"; line: 1, column: 21]>}

2. Processing method
this is because the log is not printed as required during processing. We need to open a new logstash to print the abnormal log
the configuration is as follows:

[root@k8s-master1 conf.d]# more aName1.conf 
input{
    kafka{
           bootstrap_servers => "10.152.17.50:9092"
           group_id => "gt-scs-log-new"
           topics => "gt-scs-log"
           consumer_threads => 1
           decorate_events => true
           auto_offset_reset => "latest"
           type => "gt-scs"
    }
}
filter {
    if [type] == "gt-scs" {
      mutate { 
                add_field => { "types" => "%{type}"}
             }
      json {
                source => "message"
          }
      json {
                source => "message"
          }

    }
}
output { 
  if [tags] { 
        stdout {
                codec => "rubydebug"
        }
  }
}

3. Results

[Solved] error: cannot create �� Illegal byte sequence

Phenomenon:

Unzip a compressed package under mac(   If the folder name or file contains Chinese) Yes, the following error occurs during compressed zip archiving under Windows:

error:   cannot create �…
Illegal byte sequence

Solution::

# use ditto to replace unzip

ditto -V -x -k --sequesterRsrc --rsrc FILE_NAME.ZIP YOUR_DESTINATION

[Solved] Golden Gate ggsci start manager: ERROR: Parameter file mgr.prm does not exist.

1. An error is thrown when starting Ogg. Error: parameter file/Ogg/dirprm/mgr.prm does not exist

[oracle@node01:/ogg]$ ggsci

Oracle GoldenGate Command Interpreter for Oracle
Version 19.1.0.0.4 OGGCORE_19.1.0.0.0_PLATFORMS_191017.1054_FBO
Linux, x64, 64bit (optimized), Oracle 19c on Oct 17 2019 21:16:29
Operating system character set identified as UTF-8.

Copyright (C) 1995, 2019, Oracle and/or its affiliates. All rights reserved.



GGSCI (node01) 1> start mgr
ERROR: Parameter file /ogg/dirprm/mgr.prm does not exist.

GGSCI (node01) 3> info all                                

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     STOPPED

2. Execute commands using Oracle users

[oracle@node01:/ogg]$ cd /ogg
[oracle@node01:/ogg]$ mkdir dirprm
[oracle@node01:/ogg]$ mkdir dirrpt
[oracle@node01:/ogg]$ mkdir dirpcs

3. Execute the command to add a port

GGSCI (node01) 5> edit param mgr
add
PORT 7809

GGSCI (node01) 6> start manager
Manager started.

GGSCI (node01) 7> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING

Error: Projects must list all files or use an ‘include‘ pattern.

When importing a file, the file clearly exists but an error is reported:

File 'xxx/packages/@vue/src/use-list.ts' is not listed within the file list of project 'xxx/packages@/vue/tsconfig.json'. Projects must list all files or use an 'include' pattern.

resolvent:

  stay   Is not listed within the file to add or modify a regular path to the include in the file indicated.

At present, the file indicating the path regularity problem is tsconfig.json, so go to the tsconfig.json file to view the include item.

tsconfig.json:

{
  "include": ["src"],
}

Modified tsconfig.json:

{
  "include": ["src/**/*.ts"],
}