Author Archives: Robins

SRS5.0 Error: srt serve error code=6006 [How to Solve]

Using SRS 5.0, with SRT push flow configured, an error is reported after starting the configuration file:

 srt serve error code=6006 : srt disabled,

My configuration:

listen              1935;
max_connections     1000;
daemon              off;
srs_log_tank        console;
srt_server {
enabled on;
listen 10080;
maxbw 1000000000;
connect_timeout 4000;
latency 20;
peerlatency 20;
recvlatency 20;
}

解决:添加上以下

Solution: Add the following code

vhost __defaultVhost__ {
    srt {
        enabled     on;
        srt_to_rtmp on;
    }
}

So far, the problem has been solved.

My srs is deployed on ubuntu and push and pull streams are on different computers. Pushflow and ubuntu are on one public network. The pull stream is on another public network. The time delays are as follows.

1. push streaming is using core image

2, pulling stream is using ffplay

3, remote control of the pulling computer on the pushing computer, cut the comparison chart.

Room DB Error: AppDatabase_Impl does not exist [How to Solve]

Kotlin tests the use of Android Room, and when calling Room.databaseBuilder in coroutine, it reports an error:

AppDatabase_Impl does not exist

After checking the developer documentation, you can configure it according to the documentation. After thinking deeply, you find that there is a problem with the developer documentation

dependencies {
    val room_version = "2.4.3"

    implementation("androidx.room:room-runtime:$room_version")
    annotationProcessor("androidx.room:room-compiler:$room_version")

    // To use Kotlin annotation processing tool (kapt)
    kapt("androidx.room:room-compiler:$room_version")
    // To use Kotlin Symbol Processing (KSP)
    ksp("androidx.room:room-compiler:$room_version")

    // optional - Kotlin Extensions and Coroutines support for Room
    implementation("androidx.room:room-ktx:$room_version")

    // optional - RxJava2 support for Room
    implementation("androidx.room:room-rxjava2:$room_version")

    // optional - RxJava3 support for Room
    implementation("androidx.room:room-rxjava3:$room_version")

    // optional - Guava support for Room, including Optional and ListenableFuture
    implementation("androidx.room:room-guava:$room_version")

    // optional - Test helpers
    testImplementation("androidx.room:room-testing:$room_version")

    // optional - Paging 3 Integration
    implementation("androidx.room:room-paging:2.5.0-alpha03")
}

The above developer documents give, but when adding dependencies, one dependency is:

 kapt("androidx.room:room-compiler:$room_version")

So the problem lies here. There is a dependency of Kapt, but there is no plugin of Kapt

The final solution:

Modify the configuration of app gradle.build to add the plugin kotlin-kapt, as follows:

plugins {
    id 'com.android.application'
    id 'org.jetbrains.kotlin.android'
    id 'kotlin-kapt'
}

Then confirm the three dependency dependencies related to room:

  implementation("androidx.room:room-runtime:2.4.3")
    annotationProcessor("androidx.room:room-compiler:2.4.3")
    kapt("androidx.room:room-compiler:2.4.3")

Resin Failed to Startup Error: ERROR: transport error 202: bind failed: Address already in use: JVM_Bind Listenin (Two Resins in One PC)

Error content:

ERROR: transport error 202: bind failed: Address already in use: JVM_Bind Listening for transport dt_socket at addres

The cause of the error is obviously port occupation, but I have clearly changed the app_servers in the resin.properties file to a different port.

The reason
The reason is that I modified the jvm_args in the resin.properties file of one of the resins before in order to allow idea to debug the resin service remotely.

Original content

jvm_args  : -Xmx4000m -Xms4000m -XX:ParallelGCThreads=20 -XX:+UseConcMarkSweepGC -XX:-OmitStackTraceInFastThrow -XX:+UseParNewGC -XX:+DisableExplicitGC -javaagent:wagent.jar -javaagent:stophotdeploy.jar -Djdk.tls.ephemeralDHKeySize=2048 -Dfile.encoding=GBK -javaagent:rasp/rasp.jar

I changed it to

jvm_args  : -Xdebug -Xrunjdwp:transport=dt_socket,address=9081,server=y,suspend=n -Dcom.sun.management.jmxremote -Xloggc:/var/log/resin_gc.log

The other resin service still keeps the original content, so the two services cannot be started, and an error will be reported that the address port is occupied.

 

Solution:

The solution is to configure address= for both resins and set the port differently, or use the original default jvm_args.

Here use the method of configuring address= for both.

The first file.

jvm_args  : -Xdebug -Xrunjdwp:transport=dt_socket,address=9081,server=y,suspend=n -Dcom.sun.management.jmxremote -Xloggc:/var/log/resin_gc.log

Second file

jvm_args  : -Xdebug -Xrunjdwp:transport=dt_socket,address=9082,server=y,suspend=n -Dcom.sun.management.jmxremote -Xloggc:/var/log/resin_gc.log

[Solved] Frida-server Startup Error: syntax error: unexpected‘(‘

Problem description:

An error will be reported after frida-server-15.2.android-arm64.xz is installed, as follows:

�5�5�5�5�: inaccessible or not found
./fs152201[2]: �: inaccessible or not found
./fs152201[80]: syntax error: unexpected '('

Solution:

The correct way is to switch to root privileges first. Then use the following command . /filename. To summarize, there is a problem with the boot method. The correct one is: . /filename

For example.

redfin:/data/local/tmp # . /fs152201

verification:

1: Premise:

1.1: Install the corresponding version of frida on the PC side

pip  install frida
pip install frida-tools

1.2: Check the version of frida. The server should be installed to the matching version

frida –version

2: Start to verify whether the frida-server installation is successful or not. Execute the following commands in the cmd window. If a list appears, it indicates success.

 frida-ps -U

PHP php-config is not installed error in ubuntu 16 [How to Solve]

Environment

Ubuntu 16.04.1 LTSPHP 7.0.33

Question

When compiling and installing php extensions with php config, it is found that php-config does not exist.

Check whether php-config exists or not?

$ whereis php-config
php-config:

As above, it returns null, indicating that it does not exist.

Solution:

This problem occurs because the php-dev package is not installed. You can install it once.

Install php-dev

$ apt-get install php-dev

If php5 is version, run apt-get install php5-dev.

re-check php-config

$ whereis php-config
php-config: /usr/bin/php-config /usr/bin/php-config7.0 /usr/share/man/man1/php-config.1.gz

As shown above, the installation is successful.

[Solved] ERROR: Subproject directory not found and gst-plugins-base.wrap file not found

gstreamer1.0-plugins-bad compile Error:

| Found pkg-config: /sd1/jarvis-workspace/build-jarvis-imx-fb-imx6ull/tmp/work/cortexa7t2hf-neon-mx6ul-poky-linux-gnueabi/gstreamer1.0-plugins-bad/1.16.3-r0/recipe-sysroot-native/usr/bin/pkg-config (0.29.2)
| Run-time dependency gstreamer-1.0 found: YES 1.16.3
| Run-time dependency gstreamer-base-1.0 found: YES 1.16.3
| Run-time dependency gstreamer-net-1.0 found: YES 1.16.3
| Run-time dependency gstreamer-controller-1.0 found: YES 1.16.3
| Run-time dependency gstreamer-pbutils-1.0 found: YES 1.16.3
| Run-time dependency gstreamer-allocators-1.0 found: YES 1.16.3
| Run-time dependency gstreamer-app-1.0 found: YES 1.16.3
| Run-time dependency gstreamer-audio-1.0 found: YES 1.16.3
| Run-time dependency gstreamer-fft-1.0 found: YES 1.16.3
| Run-time dependency gstreamer-riff-1.0 found: YES 1.16.3
| Run-time dependency gstreamer-rtp-1.0 found: YES 1.16.3
| Run-time dependency gstreamer-rtsp-1.0 found: YES 1.16.3
| Run-time dependency gstreamer-sdp-1.0 found: YES 1.16.3
| Run-time dependency gstreamer-tag-1.0 found: YES 1.16.3
| Run-time dependency gstreamer-video-1.0 found: YES 1.16.3
| Run-time dependency gstreamer-check-1.0 found: YES 1.16.3
| Found CMake: NO
| Run-time dependency gstreamer-gl-1.0 found: NO (tried pkgconfig and cmake)
| Looking for a fallback subproject for the dependency gstreamer-gl-1.0
| 
| meson.build:283:0: ERROR: Subproject directory not found and gst-plugins-base.wrap file not found
| 
| A full log can be found at /sd1/jarvis-workspace/build-jarvis-imx-fb-imx6ull/tmp/work/cortexa7t2hf-neon-mx6ul-poky-linux-gnueabi/gstreamer1.0-plugins-bad/1.16.3-r0/build/meson-logs/meson-log.txt
| ERROR: meson failed
| WARNING: exit code 1 from a shell command.
| ERROR: Execution of '/sd1/jarvis-workspace/build-jarvis-imx-fb-imx6ull/tmp/work/cortexa7t2hf-neon-mx6ul-poky-linux-gnueabi/gstreamer1.0-plugins-bad/1.16.3-r0/temp/run.do_configure.2066278' failed with exit code 1
ERROR: Task (/sd1/jarvis-workspace/layers/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.16.3.bb:do_configure) failed with exit code '1'

Solution:

sudo apt install libva-dev

_LSOpenURLsWithCompletionHandler() failed for the application xxx with error -10671 [Solved]

Problem description

After updating the macos system and turning off SIP in mbp version 2022, the applications on the ipad installed on the system do not start properly and the following error is reported when running the open command in the terminal:

longyudeMacBookPro:~ longyu$ open -a "xxx"
_LSOpenURLsWithCompletionHandler() failed for the application /Applications/xxx.app with error -10671.
longyudeMacBookPro:~ longyu$

Note: The program name is for example only.

Equipment model and version information

mbp 2022

mac version: macOs Monterey version 12.6

 

Resolution process

  1. Checked app permissions – no exception found
  2. Tried to change application permissions – still can’t start after changing
  3. Check if there is already a process running – open activity monitor, no relevant process found
  4. Think about the items that the system modifies when it works and when it does not work
  5. Suspect a relationship with the SIP configuration.

 

Solution:

When the computer is shut down, long press the shutdown key to enter the recovery mode, open the terminal, execute csrutil enable to enable SIP, and restart the system. After re-entering the system, the program starts normally.

 

Other problems:

I searched the web for the return value of _LSOpenURLsWithCompletionHandler and did not find the meaning of the -10671 return value. The original intention of closing SIP was to use dtrace, a long-known program, normally, but since it has such a side effect after closing it can only be opened temporarily for fun, not all the time.

[Solved] Pytorch Error: RuntimeError: expected scalar type Double but found Float

Problem description:

This error occurs when LSTM is used for data training, I convert the numpy data directly to the tensor data type in the torch:

RuntimeError: expected scalar type Double but found Float

Cause analysis:

The data type of the tensor is incorrect

x_train_tensor = torch.from_numpy(x_train)
y_train_tensor = torch.from_numpy(y_train)

Solution:

Convert the original tensor to the torch.float32 type

x_train_tensor = torch.from_numpy(x_train).to(torch.float32)
y_train_tensor = torch.from_numpy(y_train).to(torch.float32)

[Solved] AttributeError: module ‘distutils‘ has no attribute ‘version‘

mmyolo + tensorboard failed to start error:

File "D:\Anaconda3\envs\mmyo\lib\site-packages\mmengine\visualization\vis_backend.py", line 495, in _init_env
    from torch.utils.tensorboard import SummaryWriter
  File "D:\Anaconda3\envs\mmyo\lib\site-packages\torch\utils\tensorboard\__init__.py", line 4, in <module>
    LooseVersion = distutils.version.LooseVersion
AttributeError: module 'distutils' has no attribute 'version'

Reason:

The version of setuptools is too higher.

Solution:
Install the lower version of setuptools via the following command:
 

pip install setuptools==56.1.0

ERROR: This system does not support “RDRAND“ [How to Solve]

Problem phenomenon:

When running DPDK app programs in some environments, the following problems may occur:

Solution:

Before compiling, you can use the grep command in the DPDK root directory to check where there is a configuration setting about RDRAND, here there is a relevant configuration inside the first meson.build.

After opening the file, you can find that RDRAND is iterated through the optional_flags, so delete the above iterated items and recompile.

Summary:

The reason here is that RDRAND is an instruction set of CPUs. Not all CPUs support this instruction. In order to make the program universal, we can delete this configuration when compiling, so that we can run on CPUs that do not support RDRAND.