Author Archives: Robins

Nginx 502 Error: Failed to load resource: the server responded with a status of 502 (Bad Gateway)

problem found



was meant for cookie with too many headers, required header data was too big

solve the problem

nginx adds configuration

    # 502 bad gateway 错误解决配置 start
    proxy_buffer_size 64k;
    proxy_buffers 32 32k;
    proxy_busy_buffers_size 128k;
    # 502 bad gateway 错误解决配置 end
    

note the location of the configuration

individual open source project (general back office management system) — > Can look at https://gitee.com/wslxm/spring-boot-plus2, like
in this paper, to this end, if you feel useful, move the small hand thumb up or focus on bai, do not regularly will continue to update more… Thank you for watching!

HTTP 405 Error: Failed to load resource: the server responded with a status of 405 (Method Not Allowed)

carelessness:

    $.ajax({
        type: 'POST',
        async: false,
        url: url,
        dataType: 'json',
        contentType: 'application/json',
        data: JSON.stringify(postData),
        success: function(result){
            if(result.state==1){
                //成功
                var data = result.data.tableList;
                var sumnum = result.data.iSumNum;
                grid.setDatasource(data,sumnum);
            }else{
                cui.error("数据初始化失败");
            }
        }
    });
}
开始的时候没写url导致该错误

Successfully solved opencv error: assertion failed (SCN = = 3 | SCN = = 4) in CV:: cvtcolor

successfully resolve OpenCV Error: Assertion failed (SCN == 3 || SCN == 4) in CV ::cvtColor

directory

solve the problem

solution

solution


solve the problem

OpenCV Error: SCN == 3 || SCN == 4) in CV :cvtColor, file C:\projects\ OpenCV \modules\imgproc\ SRC \color. CPP, line 11111

failed to recv data in handshakeReceive2Callback

‘failed to recv data in handshakeReceive2Callback “error

Well with the

has been * * * today suddenly found that can’t open web page, see the log that is “failed to recv data in handshakeReceive2Callback” mistake refresh, ok then to search to see what exactly is this problem. A search found that everyone is saying that this is thunderbolt dao ghost, suddenly think of today I have nothing to do to upgrade thunderbolt, so nine out of ten is thunderbolt dry.

without further ado, let’s go straight to the solution:

  1. disables the xlserviceplatform service.
  2. open C:\Program Files\Common Files\Thunder Network\ServicePlatform\ xlsp. DLL and empty the contents (64-bit system as C:\Program Files (x86)\Common Files\Thunder Network\ServicePlatform\ xlsp. DLL). </span b>)</ span b>
  3. problem solved.

Error in Git clone or pod install: smudge filter LFS failed clone succeeded, but checkout failed

encountered the following problem when git clone :

git-lfs smudge '第三方库某个文件': git-lfs: command not found
error: external filter 'git-lfs smudge %f' failed 127
error: external filter 'git-lfs smudge %f' failed
fatal: 第三方库某个文件: smudge filter lfs failed
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry with 'git restore --source=HEAD :/'

basically means that a file is too large to be checked out.

solve :
execute command :brew install git-lfs

reason :
git-lfs solves the problem that a single file is too big, specific can be below baidu.

MySQL failed to start prompt: job failed to start

Today, I modified the character set for the mysql database under Linux. In order to facilitate operation, I modified the permissions for the configuration file sudo Chmod 777 My.cnF

after modification, start: Job failed to start appears.
Nothing is printed in the
error log.

after the character set configuration is removed still prompt cannot start.

finally consider the possibility that only permissions have been modified due to permissions.

sudo chomd o-w my.cnf

sudo chmod g-w my.cnf

and then start MySQL.

Coredata: error: failed to call designed initializer on nsmanagedobject

first put a breakpoint (remember global breakpoints, so you can detect when something breaks) and then I know that my own class is writing

TTCourse *course=[[TTCourse alloc]init]; This is a problem, after is – [TTCourse setCourseID:] : unrecognized selector that sent to instance 0 x7fa392ecb080 this mistake, and then I looked at it inherited type is NSManagedObject, so initialization must use this type of initialization, namely insertNewObjectIntoContext this method.

TTCourse *course = [TTCourse insertNewObjectIntoContext:[TTImporter sharedInstance].context]; [TTImportersharedInstance].0 context. You can just write your own context.



Also, here’s a more recognized selector sent to instance

>

>

Importerror using tensorflow: DLL load failed: the specified program cannot be found

introduction

will encounter a variety of problems in the process of using tensorflow, which will be recorded here for my review and later learning.

problem description

has tensorflow installed in anaconda, and the call has this problem:

>>> import tensorflow
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "D:\Anaconda\envs\dl\lib\site-packages\tensorflow\__init__.py", line 24, in <module>
    from tensorflow.python import pywrap_tensorflow  # pylint: disable=unused-import
  File "D:\Anaconda\envs\dl\lib\site-packages\tensorflow\python\__init__.py", line 59, in <module>
    from tensorflow.core.framework.graph_pb2 import *
  File "D:\Anaconda\envs\dl\lib\site-packages\tensorflow\core\framework\graph_pb2.py", line 6, in <module>
    from google.protobuf import descriptor as _descriptor
  File "D:\Anaconda\envs\dl\lib\site-packages\google\protobuf\descriptor.py", line 47, in <module>
    from google.protobuf.pyext import _message
ImportError: DLL load failed: 找不到指定的程序。

solution

through careful review, yesterday I upgraded to protobuf when installing object-detection, so, call back the protobuf version, it should be ok.

pip install protobuf==3.6.0
![在这里插入图片描述](https://img-blog.csdnimg.cn/20190708150939546.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2x2c2VoYWl5YW5nMTk5Mw==,size_16,color_FFFFFF,t_70)

WebSocket handshake Unexpected response code 403

sometimes when a client makes a websocket request, the front end displays an error as follows:

index.js:9 WebSocket connection to 'ws://127.0.0.1:8080/shop/ws?uid=3224458&sid=826' failed: Error during WebSocket handshake: Unexpected response code: 403

cause:

as of Spring Framework 4.1.5, the default behavior of WebSocket and SockJS is to accept only the same original requests. You can also allow a list of all or specified sources.

resolved:

links that are allowed to be accessed can be set when registered in WebSocketConfig.
setAllowedOrigins(String[] domains) allows long connections to a given domain name or IP(including port number), domains allowed to be accessed.
if you use the “*” sign indefinitely, and if you specify a domain name, you must start with HTTP or HTTPS.

example:

setAllowedOrigins (” http://127.0.0.1:8080 “);
or add setAllowedOrigins(“*”)


@Configuration
@EnableWebMvc
@EnableWebSocket
public class ShopWebSocketConfig extends WebMvcConfigurerAdapter implements WebSocketConfigurer{

	@Resource
	private ShopWebSocketHandler shopWebSocketHandler;
	
	@Override
	public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) {
		registry.addHandler(shopWebSocketHandler, "/ws").addInterceptors(new ShopHandshakeInterceptor()).setAllowedOrigins("*");
		registry.addHandler(shopWebSocketHandler, "/sockjs/ws").addInterceptors(new ShopHandshakeInterceptor()).withSockJS();
	}
}

error: src refspec master does not match any error:failed to push some refs to ‘[email protected]:xxxx

once you have a local repository you need to set up a github repository and have both repositories remotely synchronized, the first time you synchronize your code remotely

occurs

git push-u origin master has problems:

error: src refspec master does not match any
error: failed to push some refs to '[email protected]:xxxxxxxx/xxx.git'

cause:

1. If the readme.md is not checked when the remote warehouse is created: commit to the remote library without any content in the staging area. If the empty staging area cannot be committed, add and commit

are required at least once

2. If the readme.md file on github is not in the local directory

resolved:

if question 1:

git add .

git commit -m “commit all local code to origin”

git push -u origin master

if question 2:

Git pull –rebase origin master

this is where you can see the local readme.md file

and now you can do git push-u origin master

How to solve the error of “failed to create the Java virtual machine” in installing eclipse 2020-03 in MAC environment

MAC environment installation Eclipse 2020-03 report “failed to create the Java virtual machine” error resolution

in macOS Catalina 10.15.2 environment, install the latest version of Eclipse: eclipse-je-2020-03-r-gesty-macosx-cocoa-x86_64. DMG, and run Eclipse report “failed to create the Java virtual machine” after installation.

as shown in figure 1:

the problem is due to JDK 14 being installed in the macOS environment. Even with the latest version of Eclipse, JDK 14 is still not supported, up to JDK 13, so the solution is to uninstall JDK 14. If you want to keep JDK 14 and Eclipse 2020-03 coexisting, you can solve this:

step 1: execute the command under the Shell terminal:

$ /usr/libexec/java_home -V
Matching Java Virtual Machines (3):
    14, x86_64:	"Java SE 14"	/Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents/Home
    11.0.3, x86_64:	"AdoptOpenJDK 11"	/Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home
    1.8.0_232, x86_64:	"AdoptOpenJDK 8"	/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home

as you can see, I have JDK 8, 11, and 14 on my host.

note , executing “/usr/libexec/ java_home-v 11” is invalid, it will not resolve the error of Eclipse.

step 2: use the editor open Eclipse app/Contents/Resources/Info. The file, found at the back of the label, and modify the content is as follows: </ p>

    <array>
		<string>-vm</string>
        <string>/Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home/bin</string>
        <string>-keyring</string>
        <string>~/.eclipse_keyring</string>
    </array>

as shown in figure 2:

save and exit.
note that you add the -vm option and point the vm option to JDK 11 (you can also point to JDK 8 or any version that is not native to JDK14, depending on your needs).

restart Eclipse and the familiar interface returns. Figure 3:

Remember a virtual machine expansion swapoff failed: cannot allocate memory

capacity expansion method :
capacity expansion method point here

Gparted when deleting “Linux swap” reported an error:
swapoff failed: Cannot allocate memory

found a solution online:
error report solution point here

results at the end of the cat /proc/meminfo check found that their available memory is not enough… After adding memory to it, delete “Linux swap” without returning an error