GCloud auth login: Ports 8085 and 8184 possible blocked - gcloud

I have installed and uninstalled and reinstalled GCloud on MACOS Monterey (Chipset M1) and I'm facing the next situation: When I run in Terminal gcloud auth login, it displays the next message:
WARNING: Failed to start a local webserver listening on any port between 8085 and 8184. Please check your firewall settings or locally running programs that may be blocking or using those ports.
WARNING: Defaulting to --no-browser mode.
You are authorizing gcloud CLI without access to a web browser. Please run the following command on a machine with a web browser and copy its output back here. Make sure the installed gcloud version is 372.0.0 or newer.
I have tried in many ways to install: The last one was this:
curl https://sdk.cloud.google.com | bash
exec -l $SHELL #restart shell
But I still facing that message.
Anybody couls help me with this?

This happens because my Internet provider has blocked these ports. There will be to make some fixes to the router.
Patch solution for this:
gcloud auth login --no-launch-browser
Follow the instructions given on Terminal

Related

I have installed cloudctl but when I try to login in command prompt getting 'cloudctl' not recognized error

enter image description here
Any help is much appreciated.
There are multiple platform versions (Windows™, Linux®, or macOS )of the CloudCtl [Ref1], and install the appropriate CLI
you can list the files using curl
curl -kL https://--masterNodeIpAddress--:8443/api/cli
"cloudctl-darwin-amd64"
"cloudctl-linux-amd64"
"cloudctl-linux-ppc64le"
"cloudctl-linux-s390x"
"cloudctl-win-amd64.exe"
replace the --masterNodeIPAddress- for your cluster
##for linux x86
use the curl to download
curl -kLo /tmp/cloudctl-linux-amd64 https://--masterNodeIpAddress--:8443/api/cli/cloudctl-linux-amd64
Change permission to execute and copy to local path
chmod +x /tmp/cloudctl-linux-amd64
cp /tmp/cloudctl-linux-amd64 /usr/local/bin/cloudctl
Login to the cluster
cloudctl login -a https://--masterNodeIpAddress--:8443
-- replace masteNodeIPaddress with masternode IP address or haproxy, or load balancer used for the High availability master node
Customized Instructions to install clients from ICP console
You can also find the customized instructions for downloading and installing all the clients.
Log-in in to your IBM Cloud Private cluster management console from a web browser.
Connect to the URL https://masterORloadBalenacer:8443 and use the appropriate credentials.
Menu ( left BurgerIcon) left navigation -> CommandLine tools
Direct link https://masterORloadBalancerHostname:8443/console/tools/cli
Ref-1: Installing the IBM® Cloud Private CLI
https://www.ibm.com/docs/en/cloud-private/3.2.0?topic=cloudctl-installing-cloud-private-cli

Cannot complete pgadmin4 setup. Apache web server

I've got problem with completing pgadmin4 installation thru sudo /usr/pgadmin4/bin/setup-web.sh command.
During this process instalator does not recognizing that Apache is running and asks me if I want to start it:
The Apache web server is not running. We can enable and start the web server for you to finish pgAdmin 4 installation. Continue (y/n)? y
Then it just spits some errors:
Too few arguments.
Error enabling . Please check the systemd logs
Too few arguments.
Error starting . Please check the systemd logs
So far I havn't found where the logs are stored.
About my apache, I am quite sure that my server is running, because I can connect to it through browser, phpmyadmin is working properly, and service apache2 status returns * apache2 is running. By my understanding apache2 is just fancy word for httpd service, and there is no other service called simply apache.
PostgreSQL seems to work properly from command line, haven't tested if I can connect to it yet, but this shouldn't be the case right?
I am using
**PostgreSQL:** 12.5 (Ubuntu 12.5-0ubuntu0.20.04.1)
**Ubuntu:** Ubuntu 20.04 LTS
**Server:** Apache/2.4.41 (Ubuntu)
I had the same issue for Debian 10 and Ubuntu 20. The /usr/pgadmin4/bin/setup-web.sh script is using 'uname -a' which doesn't contain "Debian" identifier in the return string. Updating this to read /proc/version will allow APACHE to be specified as the Debian variant of apache2.
Change:
UNAME=$(uname -a)
To:
UNAME=$(cat /proc/version)
I had a similar problem with Ubuntu running inside WSL 2. Managed to resolve it by modifying the /usr/pgadmin4/bin/setup-web.sh script. I moved these lines outside of the conditional:
IS_DEBIAN=1
APACHE=apache2
This allowed the installation to progress beyond the Too few arguments. error. There was still an error however:
System has not been booted with systemd as init system (PID 1). Can't operate.
Error restarting apache2. Please check the systemd logs
I resolved this by running:
sudo service apache2 restart
After this I tried bringing up the admin page by visiting http://127.0.0.1/pgadmin4 from the Windows host. This still didn't work, and had to connect using the Ubuntu machine's ip address (you can find it out via ifconfig) which finally allowed me to see the login page.

How to connect to the database in ddev?

I installed successfully ddev for TYPO3 and now want to connect to the mariadb database. But what are the credentials? If I ssh into the container and want to connect I got a password prompt.
Access via external tools is described in Using Developer Tools with ddev.
Specifically you need to execute the following command to get the necessary credentials:
ddev describe
When upgrading my ddev and deleting all the containers, everything stayed the same except my new port number incremented up by one.
mariadb
Host: localhost:portNumberIncrementedByOne
User/Pass: 'db/db'

Why google cloud shell auto disconnect after 1 hours

I use Google Cloud Shell to run Jupyter Notebook on instance , but after 1 hours,the connection is disconnect.
And I reconnect to instance, there is nothing, is same as reset instance.
So, please tell me how to set up ,make the connection of cloud shell
keep connect.
Thanks!
Google Cloud Shell auto disconnect because you didn't do anything in the Cloudshell's terminal! So to keep the cloudshell session alive, you can enter the following javascript code to the browser's javascript console
setInterval(function() {document.elementFromPoint(500, 500).click();}, 30000);
That's the trick!
P/S: If you want to use Jupyter Notebook, why you don't use Google Colab instead? It has a pre-installed Jupyter Notebook as well as more CPU and ram. You can use the same js for Colab!
UPDATE: you can try Cloud Shell SDK, then connect to Google Cloud Shell by gcloud cloud-shell ssh, which is much faster than the web interface, allow port forwarding (based on ssh), and have a longer time limit.
You can even connect to it using VSCode.
The virtual machine instance that backs your Cloud Shell session is
not permanently allocated to a Cloud Shell session and terminates if
the session is inactive for an hour.
https://cloud.google.com/shell/docs/limitations
I am late to answer this but try this if not already. Open the sysctl.conf and add below lines.
grep keep /etc/sysctl.conf
sudo vi /etc/sysctl.conf
net.ipv4.tcp_keepalive_time=60
net.ipv4.tcp_keepalive_intvl=60
net.ipv4.tcp_keepalive_probes=5
stop and start your instance.
Answer from a year later
You can use gcloud cli. Just install it, open a terminal and run gcloud cloud-shell ssh --authorize-session, then you can use the terminal.
You can also ssh from VSCode to Google Cloud Shell. Just set the key file to .ssh/google_compute_engine, get the ip of CloudShell machine by curl -L ipconfig.me, and then ssh to that ip with port 6000.

What is veewee waiting for when it's waiting for ssh login?

When veewee is displaying the following message, Waiting for ssh login on 127.0.0.1 with user veewee to sshd on port => 7222 to work, timeout=10000 sec what exactly is it waiting on?
As far as I can tell there is a ssh server on port 7222 on the host that veewee has put up and it's waiting on that. This means that something in the guest is going to connect back to it. However, I can't figure out what that thing might be - and thus I can't debug further.
Further details
I'm trying to build a virtualbox image for vagrant with the CentOS-6.3-x86_64-minimal template. My steps:
bundle exec veewee vbox define 'ejs-centos6.3-1' 'CentOS-6.3-x86_64-minimal'
wget http://mirror.symnds.com/distributions/CentOS-vault/6.3/isos/x86_64/CentOS-6.3-x86_64-minimal.iso
bundle exec veewee vbox build 'ejs-centos6.3-1'
The CentOS install appeared to run without error but it's stuck waiting for the ssh login.
You're right, there's a Ssh server on listening on port 7222, but it's on the guest (VM), not the host.
The host (Veewee) is waiting to connect to it. This SSH service is supposed to become available when the VM install process finishes, that's one of the steps used by Veewee to assume that the setup went fine and that the VM is ready.
If Veewee blocks and never gets this SSH connection, I think there could be multiple reasons:
VM setup went wrong and something prevents it from finishing successfully. Check Veewee output and the Virtualbox VM graphical console that should have opened when launching vewee box build.
There's something preventing your host computer to connect to the VM at the network level.
The VM image doesn't have Sshd installed, and/or the veewee box configuration files (in veewee/definitions/ejs-centos6.3-1/) miss instructions to install the ssh package
You should try to login to the VM using Virtuabox console window and check if there's an ssh package installed (rpm -qa | grep openssh-server) and a process named sshd running.
I've run Veewee against Centos 7 built with GUI on and it stuck on anaconda asking for source of packages. I've checked the ks.cfg and it was pointing to dead resource (404). After pointing to valid url it went through.