I am interested in kubernetes , devops , functional programming and more
My most commonly used programming languages are Java , Golang and Python
Learning Rust !
A k8s web terminal connect tool, java lightweight implementation.
License: MIT License
kubeApiClient = new ClientBuilder().setBasePath(apiService).setVerifyingSsl(false).setAuthentication(new AccessTokenAuthentication(token)).build();
使用这种方式初始化的kubeApiClient 在执行outputStream.write(cmdArgs.getBytes())会报错
java.net.ProtocolException: Expected HTTP 101 response but was '400 Bad Request'
When the program is running, I don't know under what circumstances there will be a session connection that keeps opening. In the following code, the value of len has been consistently -1, and running this loop has caused the CPU to remain high. How do I solve this problem
while (true) { byte data[] = new byte[1024]; int len = inputStream.read(data); if (len != -1) { byte[] data1 = Arrays.copyOfRange(data, 0, len); TextMessage textMessage = new TextMessage(data1); if (initValid && isValidBash(textMessage, shellPath)) { break; } else { tryBash = true; initValid = false; } session.sendMessage(textMessage); } }
您好,运行报错:
java.net.ProtocolException: Expected HTTP 101 response but was '400 Bad Request'
at okhttp3.internal.ws.RealWebSocket.checkUpgradeSuccess(RealWebSocket.java:224)
at okhttp3.internal.ws.RealWebSocket$1.onResponse(RealWebSocket.java:195)
at okhttp3.RealCall$AsyncCall.execute(RealCall.java:174)
at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
假如 namespace 或 container 随意写会报 404,那么我猜测认证已通过。
SpringWebSocketHandler.afterConnectionEstablished 的 connected 日志也能看到,之后就 400
烦请指点。
把项目中websocket部分拷贝到了自己工程,
然后在浏览器中的websocket测试工具测试,
现象是发送什么,返回什么。有点奇怪
是否可以集成下这个功能:kubernetes-client/java#900
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.