Category Archives: Error

[Solved] Failed loading positionFile: /opt/module/flume/taildir_position.json

Error Message: 2022-03-22 15:55:57,000 (lifecycleSupervisor-1-0) [ERROR – org.apache.flume.source.taildir.ReliableTaildirEventReader.loadPositionFile(ReliableTaildirEventReader.java:147)] Failed loading positionFile: /opt/module/flume/taildir_position.json

use flume1.9 tildir source, memory channel, hdfs sink to write a configuration file, use in hdfs no file into, and then I look at the log file, found the above error


My profile

Profile:

a3.sources = r3
a3.sinks = k3
a3.channels = c3

a3.sources.r3.type = TAILDIR
a3.sources.r3.positionFile = /opt/module/flume/taildir_position.json
a3.sources.r3.filegroups = f1 f2
a3.sources.r3.filegroups.f1 = /opt/module/flume/files/.*log.*
a3.sources.r3.filegroups.f2 = /opt/module/flume/files2/.*file.*


# Describe the sink
a3.sinks.k3.type = hdfs
a3.sinks.k3.hdfs.path = hdfs://hadoop102:8020/flume/test2/%Y%m%d/%H
#Prefix of the uploaded file
a3.sinks.k3.hdfs.filePrefix = upload-
# whether to scroll the folder according to time
a3.sinks.k3.hdfs.round = true
# how many time units to create a new folder
a3.sinks.k3.hdfs.roundValue = 1
# redefine the units of time
a3.sinks.k3.hdfs.roundUnit = hour
# whether to use the local timestamp
a3.sinks.k3.hdfs.useLocalTimeStamp = true
# accumulate how many Event before flush to HDFS once
a3.sinks.k3.hdfs.batchSize = 100
# set the file type, can support compression
a3.sinks.k3.hdfs.fileType = DataStream
# how often to generate a new file
a3.sinks.k3.hdfs.rollInterval = 600
# set the scrolling size of each file is about 128M
a3.sinks.k3.hdfs.rollSize = 134217700
# file scrolling and the number of Event has nothing to do with
a3.sinks.k3.hdfs.rollCount = 0
#Minimum number of redundancies
a3.sinks.k3.hdfs.minBlockReplicas = 1

# Use a channel which buffers events in memory
a3.channels.c3.type = memory
a3.channels.c3.capacity = 1000
a3.channels.c3.transactionCapacity = 100

# Bind the source and sink to the channel
a3.sources.r3.channels = c3
a3.sinks.k3.channel = c3

Solution:

Modify
a3.sources.r3.positionFile = /opt/module/flume/taildir_position.json,
to
a3.sources.r3.positionFile = /opt/module/flume/taildir.json

a3.sources = r3
a3.sinks = k3
a3.channels = c3

a3.sources.r3.type = TAILDIR
a3.sources.r3.positionFile = /opt/module/flume/taildir_position.json
a3.sources.r3.filegroups = f1 f2
a3.sources.r3.filegroups.f1 = /opt/module/flume/files/.*log.*
a3.sources.r3.filegroups.f2 = /opt/module/flume/files2/.*file.*


# Describe the sink
a3.sinks.k3.type = hdfs
a3.sinks.k3.hdfs.path = hdfs://hadoop102:8020/flume/test2/%Y%m%d/%H
#Prefix of the uploaded file
a3.sinks.k3.hdfs.filePrefix = upload-
# whether to scroll the folder according to time
a3.sinks.k3.hdfs.round = true
# how many time units to create a new folder
a3.sinks.k3.hdfs.roundValue = 1
# redefine the units of time
a3.sinks.k3.hdfs.roundUnit = hour
# whether to use the local timestamp
a3.sinks.k3.hdfs.useLocalTimeStamp = true
# accumulate how many Event before flush to HDFS once
a3.sinks.k3.hdfs.batchSize = 100
# set the file type, can support compression
a3.sinks.k3.hdfs.fileType = DataStream
# how often to generate a new file
a3.sinks.k3.hdfs.rollInterval = 600
# set the scrolling size of each file is about 128M
a3.sinks.k3.hdfs.rollSize = 134217700
# file scrolling and the number of Event has nothing to do with
a3.sinks.k3.hdfs.rollCount = 0
#Minimum number of redundancies
a3.sinks.k3.hdfs.minBlockReplicas = 1

# Use a channel which buffers events in memory
a3.channels.c3.type = memory
a3.channels.c3.capacity = 1000
a3.channels.c3.transactionCapacity = 100

# Bind the source and sink to the channel
a3.sources.r3.channels = c3
a3.sinks.k3.channel = c3

[Solved] thrift failed error: The system cannot execute the specified program.

Error:
Apache IoTDB CI Error:
thrift failed output:
thrift failed error: The system cannot execute the specified program.

Reason:

		<profile>
            <id>windows</id>
            <activation>
                <os>
                    <family>windows</family>
                </os>
            </activation>
            <properties>
                <os.classifier>windows-x86_64</os.classifier>
                <thrift.download-url>http://artfiles.org/apache.org/thrift/${thrift.version}/thrift-${thrift.version}.exe</thrift.download-url>
                <thrift.executable>thrift-${thrift.version}-win-x86_64.exe</thrift.executable>
                <thrift.skip-making-executable>true</thrift.skip-making-executable>
                <thrift.exec-cmd.executable>echo</thrift.exec-cmd.executable>
                <thrift.exec-cmd.args>"Do nothing"</thrift.exec-cmd.args>
            </properties>
        </profile>

The reason is that thrift has changed the download link, thrift.download-url no executable file found:

http://artfiles.org/apache.org/thrift/${thrift.version}/thrift-${thrift.version}.exe

Solution:

Just update the link

http://archive.apache.org/dist/thrift/${thrift.version}/thrift-${thrift.version}.exe

https://github.com/apache/iotdb/pull/5293/files

Execution failed for task ‘:app:kaptDebugKotlin‘ [How to Solve]

Error compiling project with kotlin:

Execution failed for task ‘:app:kaptDebugKotlin’.
A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptExecution
java.lang.reflect.InvocationTargetException (no error message)
various kotlin annotation errors will be reported

The problem is that the version of kotlin plug-in is inconsistent with that in build

buildscript {
    ext.kotlin_version = '1.3.50'
    repositories {
        google()
        jcenter()
        
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.5.3'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}

Check the version of the org.jetbrains.kotlin:kotlin-gradle-plugin is consistent with the version of the kotlin that the module depends on or not.

[Solved] webrtc Compile Error: ERROR: The installation of the Chrome OS default fonts failed.

Installing Chrome OS fonts.
Installing Chrome OS fonts to /usr/local/share/fonts/chromeos.
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:--  0:02:09 --:--:--     0curl: (7) Failed to connect to commondatastorage.googleapis.com port 443: 连接超时
Traceback (most recent call last):
  File "./build/linux/install-chromeos-fonts.py", line 120, in <module>
    sys.exit(main(sys.argv[1:]))
  File "./build/linux/install-chromeos-fonts.py", line 67, in main
    subprocess.check_call(['curl', '-L', url, '-o', tarball])
  File "/usr/lib/python2.7/subprocess.py", line 541, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['curl', '-L', 'https://commondatastorage.googleapis.com/chromeos-localmirror/distfiles/notofonts-20161129.tar.bz2', '-o', '/usr/local/share/fonts/chromeos/notofonts-20161129.tar.bz2']' returned non-zero exit status 7
ERROR: The installation of the Chrome OS default fonts failed.
This is expected if your repo is installed on a remote file system.
It is recommended to install your repo on a local file system.
You can skip the installation of the Chrome OS default founts with
the command line option: --no-chromeos-fonts.

Compile webrtc configuration report error: ERROR: The installation of the Chrome OS default fonts failed.
This means that the installation of the Chrome fonts failed, so far found that this has any effect on the use of webrtc later, you can add -no-chromeos-fonts after the command as prompted, meaning not to install the fonts.

./build/install-build-deps.sh --no-chromeos-fonts

ST-LINK Download Program Error: flash download failed – ‘cortex m4‘

Possible cause: Project testing using ST-link download program debugging, before all good to download the program, after some tests such as power-down storage may make the chip locked up
Tried solutions: I have looked for some solutions, but most of them are not add in the programming algorithm of flash download in debug, but they don’t seem to work for me.
Final solution: Download the STM32 ST-LINK Utility software to handle the problem.

1. Connect the board to the computer using ST-LINK and open the STM32 ST-LINK Utility.

2. Click Option Bytes in Target
You don’t need to click connect in Target here, just click Option Bytes directly after opening the software, otherwise mine will prompt a can’t read memory error.
3. Change this to disable, and click apply.


4. After that, you can download the program normally in keil5.

[Solved] failed to req API:localhost:8848/nacos/v1/ns/instance. code:500 msg: java.net.ConnectException

1. Error Messages
nacos connect error:

2022-03-23 10:06:48 |ERROR |main |SpringApplication.java:826 |org.springframework.boot.SpringApplication |Application run failed
java.lang.IllegalStateException: failed to req API:/nacos/v1/ns/instance after all servers([localhost:8848]) tried: failed to req API:localhost:8848/nacos/v1/ns/instance. code:500 msg: java.net.ConnectException: Connection refused: connect
    at com.alibaba.nacos.client.naming.net.NamingProxy.reqAPI(NamingProxy.java:467)
    at com.alibaba.nacos.client.naming.net.NamingProxy.reqAPI(NamingProxy.java:389)
    at com.alibaba.nacos.client.naming.net.NamingProxy.registerService(NamingProxy.java:191)
    at com.alibaba.nacos.client.naming.NacosNamingService.registerInstance(NacosNamingService.java:207)
    at com.alibaba.cloud.nacos.registry.NacosServiceRegistry.register(NacosServiceRegistry.java:64)
    at org.springframework.cloud.client.serviceregistry.AbstractAutoServiceRegistration.register(AbstractAutoServiceRegistration.java:239)
    at com.alibaba.cloud.nacos.registry.NacosAutoServiceRegistration.register(NacosAutoServiceRegistration.java:76)
    at org.springframework.cloud.client.serviceregistry.AbstractAutoServiceRegistration.start(AbstractAutoServiceRegistration.java:138)
    at org.springframework.cloud.client.serviceregistry.AbstractAutoServiceRegistration.bind(AbstractAutoServiceRegistration.java:101)
    at org.springframework.cloud.client.serviceregistry.AbstractAutoServiceRegistration.onApplicationEvent(AbstractAutoServiceRegistration.java:88)
    at org.springframework.cloud.client.serviceregistry.AbstractAutoServiceRegistration.onApplicationEvent(AbstractAutoServiceRegistration.java:47)
    at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)
    at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)
    at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
    at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:403)
    at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:360)
    at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.finishRefresh(ServletWebServerApplicationContext.java:165)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:553)
    at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141)
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747)
    at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215)
    at com.atguigu.guli.service.edu.ServiceEduApplication.main(ServiceEduApplication.java:15)

 

2. Solution
1.Check whether nacos is open
2.Check whether nacos is open properly
3.  nacos and eureka are not the same, eureka is part of the project, nacos is more like a partner relationship.

         ,--.
       ,--.'|
   ,--,:  : |                                         
,`--.'`|  ' :                       ,---.               
|   :  :  | |                      '   ,'\   .--.--.   
:   |   \ | :  ,--.--.     ,---. / /  |//   '   
|   : '  '; |/      \  /    \.   ; ,. :|  :  /`./   
'   ' ;.    ;.--.  .-. |/  /''   | |: :|  :  ;_
|   | | \   | \__\/: . ..    '/'   | .; : \  \    `.      
'   : |  ; .' ," .--.; |'   ; :__|   :    |  `----.   \
|   | '`--' // ,.  |'   | '.'|\   \ // /`--'  /
'   : |     ;  :   .'   \   :    : `----'  '--'.     /
;   |.'     |  ,     .-./\   \ /           `--'---'
'---'        `--`---'     `----'

4. If Nacos starts normally, restart the project, or not

(1) Check annotation @enablediscoveryclient

(2) Check configuration file

# Note the space position
  cloud:
    nacos:
      discovery:
        server-addr: localhost:8848 # nacos server location

[Solved] Job for mysqld.service failed because the control process exited with error code.

Install mysql8 in centos8 environment by using yum. The following error messages are reported:

Job for mysqld.service failed because the control process exited with error code.

See "systemctl status mysqld.service" and "journalctl -xe" for details.

 

Because VIM/etc/my.cnf file Is configured before installation, specifying the directory /var/log/mysqld.log

The actual log directory is /var/log/MySQL/mysqld.log

After modifying the directory, restart OK

Android studio configurate intent-filter and compile error [Solved]

The error contents are as follows:

Manifest merger failed : android:exported needs to be explicitly specified for <activity>. Apps targeting Android 12 and higher are required to specify an explicit value for `android:exported` when the corresponding component has an intent filter defined.

 

When targeting is greater than or equal to Android 12, if some activities are configured with intent-filter, the exported property must be configured at the same time.

According to the error report, there are two solutions:

1. Modify the targetSdk of build.gradle less than 30.

2. Or add the export attribute to the <Intent-filter> tag in AndroidManifest.xml and assign it to true

Last hammer

No problem!

[Solved] webService Error: webservice Interface call error reported.

webservice Interface call error reported.

org.apache.axis2.AxisFault: Unmarshalling Error: Unexpected element (uri: "http://service
s.bingosoft.net/", local: "arg1"). The required elements are <{}arg5>,<{}arg4>,<{}arg3>,<{}arg2>,
<{}arg1>,<{}arg0>

Solution:
When the return parameter is hashMap, the error is reported, not to return hashMap successful call, did not understand what the reason, the webService underlying is not introduced hashMap
return Map can write a map in the entity class will return normally