How can I correct CUPS 'connection refused' error on chromebook? - connection

I have installed CUPS on a new linux chromebook. It recognized my printers, and I used
sudo system-config-printer
to install drivers and test. The printers all worked. But I was unable to access CUPS using the localhost:631 web page, so I rebooted the chromebook. After that, the printers still work and I still can't access the localhost interface, but now the sudo system-config-printer fails with
No protocol specified
Unable to init server: Could not connect: Connection refused
No protocol specified
Unable to init server: Could not connect: Connection refused
No protocol specified
Unable to init server: Could not connect: Connection refused
(system-config-printer.py:658): Gtk-WARNING **: 08:11:20.173: cannot open display: :0
However, the simple system-config-printer command, without sudo, does bring up the CUPS gui window, although most functionality is unavailable. This feels like a permissions problem, but I can't find it.
Any help out there?

Related

Using DevTools features with Selenium Grid on Docker

I managed to work with DevTools features in Selenium 4 locally, but when I tried to use it on Selenium Grid, it didn't work.
In order to investigate it, I installed a local grid with one Chrome node using docker-compose and I got the same error:
OpenQA.Selenium.WebDriverException : Unexpected error creating WebSocket DevTools session.
----> System.Net.WebSockets.WebSocketException : Unable to connect to the remote server
----> System.Net.Http.HttpRequestException : A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. (172.18.0.3:4444)
----> System.Net.Sockets.SocketException : A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
Where 172.18.0.3 is the private IP of chrome-node container.
I guess that the main reason is that I don't have access to that IP from the host, and that's probably a docker configuration matter, on which I'm not an expert. But that wasn't the only problem.
Using the debugger, I was able to track that the driver tries to use this address due to the following capability that is returned from the driver after creation: "se:cdp": "ws://172.18.0.3:4444/session/2c519f679e1060cdc926ca74e63e222f/se/cdp". I then tweaked this value (in the debugger, before trying to create the connection to the DevTools protocol) to use localhost instead of the private IP, and then I got the following error: IOException: The response ended prematurely..
What do I need to do in order to use the DevTools features of Selenium through Selenium Grid (and docker)?
Adding - SE_NODE_GRID_URL=http://localhost:4444/ environment to the "chrome" container in the docker-compose yaml file solves the problem.
If you want to access the grid from outside of the host, instead of localhost write the IP or name of the machine.

VSCode remote-containers.attachTorunningContainerFromViewlet error

I'm using Remote-SSH to connect to a remote, and then Attach Visual Studio Code on the remote host gives me an error.
[2022-01-12 16:59:07.497] [exthost] [error] Shell server terminated (code: 255, signal: null)
enter code here
ssh: Could not resolve hostname local-88-centos0-frp: No such host is known.
remote-containers.attachToRunningContainerFromViewlet {"value":"ms-vscode-remote.remote-containers","_lower":"ms-vscode-remote.remote-containers"}
I also met this problem on my computer when I tried to connect our lab server:
But others' computers didn't pop up this error when they tried to connect to remote-containers.
Shell server terminated (code: 255, signal: null)
ssh: connect to host xxx.xxx.xxx.xx port 22: Connection refused
OK finally I find the solution, it maybe a bug on vscode Remote - SSH extension.
click extension
click Remote-SSH and right click setting
find Remote.SSH: Config File (The absolute file path to a custom SSH config file.)
please leave this setting empty and it is the default at .ssh/config, please modify at there but no input here.
Then I found my problem solved.... Hope it's can help people who met same problem as I did.

Connection refused trying to get account info in Solana

solana account <address>
When I get account info, I have this error:
Error: RPC request error: cluster version query failed: error sending request for url (http://localhost:8899/): error trying to connect: tcp connect error: Connection refused (os error 111)
The error is indicating that the CLI RpcClient can not communicate with the Solana validator.
This is usually caused by not having solana-test-validator running in another terminal. Many make the mistake of thinking that the localhost is running the validator all the time... it's not.
In one terminal do: solana-test-validator which will startup up the local validator
Open a second terminal and do solana account - This will return account info for the default keypair
It's a network connection problem.
I use ubuntu 20.04, I was using windscribe VPN because my location and got the error, now I'm using psiphon VPN and it's working fine.

PyCharm cannot use interpreter in local docker-machine

I am using windows 10 professional and I have installed docker using DockerToolBox, so I have a docker-machine running in VirtualBox. When trying to configure an interpreter in PyCharm using my docker-machine, I get the following error:
"Cannot connect: java.lang.NullPointerException: uri was not specified"
docker-machine error
When I choose 'TCP socket', I get the following error which is different from above:
"Cannot connect: java.io.IOException: Channel disconnected before any data was received"
TCP socket error
I am sure my docker-machine is running because I can connect to it using terminal tools like MobaXterm or XShell, and I can also connect to MySQL running in my docker-machine.
Replacing tcp:// by https:// in the api url works for me in Webstorm (Windows 8.1).
https://github.com/kubernetes/minikube/issues/580
I have tried thousands of methods, and finally resolved this problem. The solution is running pycharm as administrator. WTF
I have same issue.
You must check Pycharm logs. There is detailed information about error.
In my case Pycharm shows same error "Channel disconnected before any data was received".
But in logs i found that error is caused by:
"ERROR - HttpResponseStreamHandlerFixed - exceptionCaught before first read or disconnect, we may be hanging
io.netty.handler.codec.DecoderException: javax.net.ssl.SSLHandshakeException: No name matching "my_server_hostname" found"
In my case, the problem was that domain name that i connecting to is in not the same as hostname in SSL self signed cert installed in dockerd.
Domain name that you are connecting to must match domain name in SSL cert that dockerd uses.
I have to make hosts record (C:\Windows\System32\drivers\etc\hosts on Windows, and /etc/hosts on Linux) and connect to it.
And "https://" protocol is required :)
PS. You can check SSL cert hostname by opening Chrome browser to the docker API endpoint with https and opening certificate details.

Jetty: HTTP ERROR: 503/ Service Unavailable after change the server ip address WHEN NO INTERNET CONNECTION

I did install Opennms in a VM Ubuntu on PROXMOX. Everything went well until I did change the interface IP address because the VM must work in a LAN without Internet access. Since then the opennms start correctly but the browser give me the error:
Jetty: HTTP ERROR: 503
Problem accessing /opennms/. Reason:
Service Unavailable
The problem seems to be related with the connection to Internet at the starting of opennms. When I start opens without Internet connection the server do to start correctly.
OpenNMS has a bugfix that may take care of it.
http://issues.opennms.org/browse/NMS-7683

Resources