Tag Archives: linux

curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused

problem description: implement the sh -c "$(curl - fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" download ohmyzsh times wrong: curl: port 443 (7) Failed to connect to raw.githubusercontent.com: Connection refused

join process

Hinata% sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused

reason: this is not the connection timeout, nor the certificate problem, this is not to let the connection, indicating that

is qiang

solution: fan goes out and reexecutes the command

and how to get out, I'm using the (s)(s)+polipo, (s)(s) (s) tutorial and you can search again, polipo USES which I've written before, you can look at this Linux socks5 over HTTP

pycharm: Unable to display frame vriables

works fine when you use pycharm to connect to programs on a Linux server. But can not be debugged, debugging time is special card, and variable window variables can not load out

tried to expand the memory of pycharm, but failed.

pycharm website for the solution of the method can effectively solve the: https://blog.jetbrains.com/pycharm/2012/08/gevent-debug-support/

is recorded here:

file-> setting-> python debugger

and then check the box in front of the Gevent compatible.

NACOS error com.alibaba.nacos.api.exception.NacosException: failed to req API:/api//nacos/v1/ns/instance

service registry to nacos error: com. Alibaba. Nacos. API. Exception. NacosException: failed to the req API:/API// nacos/v1/ns/instance after all the servers ([192.168.175.100:1111]) tried: java.net.ConnectException: Refuse a Connection (Connection union)

after looking for a long time without finding the reason, it turns out that as long as you modify spring.application.name, it can be restored to normal:

so that it can start normally, which is very strange.

sometimes stops the service, restarts it and can’t be registered, and then changes the service name again.

Fedora32 start container error – OCI runtime create failed: This version of runc doesn’t work on cgroups V2: unknown

background: Fedora 32 version of the operating system, running the container times error

[root@Fedora4 ~]# docker run -d -p 1001:80 --name blog1 tutum/wordpress
97da5679108744a76fda3e171d49304cce059091ee321d6fd08c8d61a4300ee8
docker: Error response from daemon: OCI runtime create failed: this version of runc doesn't work on cgroups v2: unknown.

try again to start the container as well:

[root@Fedora4 ~]# docker start blog1
Error response from daemon: OCI runtime create failed: this version of runc doesn't work on cgroups v2: unknown

The

solution is configured as follows:

[root@Fedora4 ~]# grubby --update-kernel=ALL --args="systemd.unified_cgroup_hierarchy=0"
[root@Fedora4 ~]# reboot

after restart, the container can be started normally.

[root@Fedora4 ~]# docker start blog1
blog1
[root@Fedora4 ~]# docker ps -a
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS                            NAMES
97da56791087        tutum/wordpress     "/run.sh"           4 minutes ago       Up 11 seconds       3306/tcp, 0.0.0.0:1001->80/tcp   blog1

Reference documents:


https://jaranguda.com/fedora-docker-this-version-of-runc-doesnt-work-on-cgroups-v2/

Go get github.com/kotakanbe/go -Problems encountered in CVE dictionary Download

(QIANG)

recently installed vuls on centos, which is the reason for QIANG’s frequent situation. Therefore, document several problems encountered and solutions

1.github.com undownloadable issues

before the reference to reprint an article in the link: https://blog.csdn.net/Jesusons/article/details/104267286
at the end of the centos/etc/hosts add

151.101.72.133 assets-cdn.github.com
151.101.229.194 github.global.ssl.fastly.net

will solve the problem

2. Resolve unknown import path “golang.org/x/sys/unix” : unrecognized import path “golang.org/x/sys”

is still QIANG, so you can’t directly visit golang.org. Fortunately, since Go 1.11, the Go module package dependency management tool has been officially supported. As long as you start Go modules, you can download it smoothly.

启用 Go Modules 功能
export GO111MODULE=on
 配置 GOPROXY 环境变量
export GOPROXY=https://goproxy.io

put a download interface after solving these two problems

Gitlab service migration and gitlab administrator password retrieval

service migration

1. Backup the original server data

gitlab-rake gitlab:backup:create RAILS_ENV=production

2. The backups, which are generally located in /var/opt/gitlab/, automatically generate filenames such as 1595350598_2020_07_22_10.0.0_gitlab_backup.tar

Note : due to Gitlab’s own compatibility issues, the higher version of Gitlab cannot recover the data backed up by the lower version. Note that you need to deploy the same version of Gitlab

on server b as on server a
3. After backups, copy the tar file that was just generated to the corresponding directory on the new server:

4. Restore data on new server

gitlab-rake gitlab:backup:restore RAILS_ENV=production BACKUP=1595350598_2020_07_22_10.0.0

BACKUP time point must be consistent with the original server BACKUP after the file name

administrator password forced retrieval

1. Connect to the server installed by gitlab via xshell

2. Enter the gitlab-rails console production into the gitlab console. Only after entering the console can you enter the gitlab query statement and it will be parsed

gitlab-rails console production

3. Enter user = user.where (id:1). First query the user object with id 1, because the default for super admin users is 1

user = User.where(id:1).first

4. Enter user.password= ‘password’ and fill in your new password position to

user.password='密码'

5. Then enter user.save! Save the user object

user.save

Log in to the login page to test

Method of modifying file and folder permission by Chmod command in Linux

in Linux to modify a folder or file permissions, we need to use Linux chmod command to do, I wrote a few simple example below you can consult.
chmod [who] [+ |-| =] [mode] filename

u
u
u
u
u
u
u
u
u
u
u
g stands for “group user”, that is, all users with the same group ID as the file owner.
o stands for other (others) users.
a stands for “all” users. It is the system default. The
action symbol can be:
+ to add a permission.
– cancel a permission.
= grant the given permission and cancel all other permissions, if any.
the permissions represented by the setting mode can be any combination of the following letters:
r readable.
w can be written.
x executable. The
X attribute is appended only if the target file is executable for some users or if the target file is a directory.
s sets the process’s owner or group ID to the file’s owner at file execution time. Mode “U + S” to set the file user ID bit, “G +s” to set the group ID bit.
t saves the text of the program to the switching device.
u has the same permissions as the file owner.
g has the same permissions as the user in the same group as the file owner.
o has the same permissions as other users. Instance

modify attributes of the file read/write method, such as: the index. The HTML file is modified to write readable executable:

code below copy code chmod 777 index. HTML
directory to modify all write readable executable file attributes can be:

code below copy code chmod 777.
the folder name with the suffix to use * to instead of it.
such as: Modify the properties of all HTM files:
code copy code
chmod 777 *. HTM
method to modify folder properties
change directory /images/xiao to writable readable executable
code copy code
chmod 777 /images/xiao
modify all folder properties
code copy code
chmod 777 *
Just replace the folder name with *

to modify all files and folders in the folder and subfolder properties to be writable readable executable
code as follows copy code
chmod -r 777 /upload

summarizes the difference in permissions between directories and files under Linux.
files: read file contents (r), write data to file (w), execute file as command (x).
directory: read the files contained in the directory name (r), write information into the directory links (add and remove the index point), and search the directory (can use the directory name as a path name to access files and subdirectories) it contains specific said is:

(1) have read permissions users can’t use CD into the directory: also must have execute permission to enter.
(2) users with execute permission will only be able to access files in the directory if they know the file name and have read rights.
(3) you must have read and execute permissions to list directories ls, or use the CD command to enter directories.
(4) has write permissions to the directory and can create, delete, or modify any file or subdirectory under the directory, even if the file or subdirectory belongs to another user.

[Linux] solve the error of decompressing JDK on Linux gzip: stdin: not in gzip format

recently bought a server on ali to play, need to install JDK, encountered some problems in the process of decompression, is a Google hundred degree, finally solved. The problem makes me a little helpless…

enter # tar-xvf jdk-8u131-linux 64. Tar. gz, and when executing the command, the Error was pronounced as follows:
gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: now

.

if neither of the above methods works, keep reading

Linux shell gets the file name under the folder

article author: Tyan
blog: noahsnail.com | CSDN | short book

sometimes need to get all the file names under a folder, can be implemented with the program, but open the IDE, compile and run too troublesome, in Linux server usually can not open the IDE, at this time can be implemented with a few lines of simple shell command, the result can be saved in a file.

Shell script is as follows:

#!/bin/bash
# get all filename in specified path

path=$1
files=$(ls $path)
for filename in $files
do
   echo $filename >> filename.txt
done

Linux command line cursor moving skills

http://blog.csdn.net/leonzhang2008/article/details/6932268 to see a real expert operation command line is definitely a good experience – cursor in shuttling back and forth between words, different rolling command line.
here strongly builds developers to adapt GUI programs to try working under the prompt. But it’s not that simple. You still need to know “how to do it.” To jump between words, use Ctrl+ left or right.

Ctrl+a jumps to the beginning of the line,
Ctrl+e jumps to the end of the page.
Ctrl + u delete words in front of the current cursor
Ctrl + k – deletes the current text cursor at the back of the
Ctrl + Alt + w and d – delete operation for the current word, w to delete the character of the word ahead of the cursor, d is the character after the delete
Alt + Backsapce – deletes the current cursor behind the words,
if you remove errors, use the Ctrl + y to restore Ctrl + L to screen clearing operations

CTRL +a: move the cursor to the beginning of the line.
CTRL +b: move the cursor left one letter
CTRL +c: kill the current process.
CTRL +d: exit the current Shell.
CTRL +e: move cursor to end of line.
CTRL +h: delete the previous character of the cursor, same as the backspace key.
CTRL +k: clears the cursor to the end of the line.
CTRL +l: clear screen, equivalent to clear.
CTRL +r: search for previously typed commands. There will be a prompt to search bash’s history
CTRL +u based on the keyword you entered: clear everything from before the cursor to the beginning of the line.
CTRL +w: remove a word before the cursor
CTRL +t: swap two characters before the cursor position
CTRL +y: paste or restore the previous deletion
CTRL +d: delete the cursor’s letter; Note the difference between backspace and CTRL +h, which are the characters before deleting the cursor
, CTRL +f: move cursor to the right
, CTRL +z: move the current process to the background and restore using the command ‘fg’. For example, top-d1, then CTRL +z, go to the background, then fg, restore
esc combination
esc+d: a word after the cursor is removed
esc+f: skip a word to the right
esc+f: skip a word to the left
esc+t: two words before the cursor is switched.

Solutions to the problem of “symbol lookup error xxxxx, undefined symbol”

symbollookup error gxio_mpipe_init, undefined symbol problem.

symbollookup error _mpipe_init, undefined symbol problem. A large part of the problem with this issue is due to the fact that the dynamic library version is too old for the application to find the corresponding symbol.

However, analyzing Makefile files and updating the dynamic libraries on which gxio depends on the tilera platform will not solve this problem. Finally, the problem was solved by combining NM with LDD. The analysis steps are as follows:

  1. use LDD to test the dynamic libraries on which the application sequence depends
  2. use nm + grep to analyze whether gxio related dynamic libraries contain gxio_mpipe_init symbol
  3. 0

  4. 1 2 3 detection found that gxio related dynamic libraries do not contain gxio_mpipe_init, $nm libgxio.so | grep gxio_mpipe_init. but gxio static library (libgxio. A) contains gxio_mpipe_init
  5. modify the application’s Makefile , connect gxio’s static library to the application, compile test problem solved.
  6. the wish to cause the above problem is that the gxio dynamic library on which the application depends does not have a specific symbol corresponding to gxio_mpipe_init, causing a run-time problem.

summary: the reason for this problem is that the version of the dynamic library is too old, so the application cannot find the corresponding symbol. The problem can be solved by updating the dynamic library to support the exact symbol. Nm and LDD tools can be used in the analysis.

pay attention to the public, “running code tsai, access to more premium content