How to resolve UNABLE_TO_GET_ISSUER_CERT_LOCALLY with Vscode on Windows - sql

When opening a SQL script with VS Code on Windows I get the messages:
Initializing SQL tools service for the mssql extension. Note: mssql
commands will be available after installing the service.
Platform: win32, x86_64 (Windows)
Installing SQL tools service to
c:\Users\BRITTG2.vscode\extensions\ms-mssql.mssql-1.8.0\sqltoolsservice\1.8.0\Windows.
Downloading
https://download.microsoft.com/download/e/7/8/e781cf8f-9c3f-4ad5-bd0c-f3c62b8bc6bd/microsoft.sqltools.servicelayer-win-x64-netcoreapp2.2.zip
[ERROR] Error: Request error: UNABLE_TO_GET_ISSUER_CERT_LOCALLY
How do I resolve this error? Note I am behind a corp. fw

You can turn off File -> Preferences -> Settings, search for property http.proxyStrictSSL and turn it off.
Close visual studio and open again, it worked for me.

I faced this problem today when VSCode was running from WSL2 with Ubuntu 20-04 distro. Not your case exactly, but could be useful to others.
In my case the root cause is that our corporate network requires two custom CA certificates from ZScaler. You can easily verify whether your case is similar - google for the exact procedure, it is not complicated.
Anyway, I saved the certificates in a pem file and then followed the instructions on https://ubuntu.com/server/docs/security-trust-store to install them:
$ sudo apt-get install -y ca-certificates
$ sudo cp local-ca.crt /usr/local/share/ca-certificates
$ sudo update-ca-certificates
After that I closed and reopened VS Code and the SQL tools service installed just fine.

Related

Problema: conflicting requests when installing odoo in Fedora 32

I'm trying to install odoo 11 in fedora 32 but I get these errors:
Problema: conflicting requests
nothing provides pychart needed by odoo-11.0.post20191021-1.noarch
nothing provides pyparsing needed by odoo-11.0.post20191021-1.noarch
nothing provides libxslt-python needed by odoo-11.0.post20191021-1.noarch
The steps I've followed are:
Install postgresql & intiate the service
$ sudo yum localinstall https://nightly.odoo.com/11.0/nightly/rpm/odoo_11.0.20191021.noarch.rpm
It seems there are python dependencies that can't be installed but I don't know how can I install them.
Do you have any idea how can I fix this problem? Many thanks!
If the installation packages is not working for you, you can always run Odoo server from the source.
Create a virtual environment for your Odoo app, let's call it venv11.
Get Odoo source code:
git clone https://github.com/odoo/odoo.git --depth 1 -b 11.0
Activate virtual environment. Install Python3 packages using pip.
pip install -r odoo/requirements.txt
Make sure you have installed the dev libraries needed for some of the pip packages that needs to be compiled, you will face xxxx.h not found error, you have search for that library and install using your distro package manager.
After your pip package installation is complete you can generate config file for your Odoo server using following command
python odoo/odoo-bin -c odoo.conf --save --stop-after-init
Edit the config file to add some important configuration, for example, db_user, db_password, http_port.
Now that you have added DB connection details, your Odoo application can now connect with your Postgresql Database and you can start using Odoo application by creating new database. If you don't have Postgresql information, you can just switch to postgres user and create new user with super user access.
sudo su - postgres
psql
create user `username` with superuser;
alter user `username` with encrypted password 'password';
and add those information to the config file. Now you can run Odoo server using
python odoo/odoo-bin -c odoo.conf
Head back to browser, browse 127.0.0.1:8069 8069 is the default port but you can change it from the config file. The database creation web interface will appear and you can start using Odoo application.
** Note: run python commands in virtual environment activated as that will isolate pip packages.

Yum install graphviz on RHEL 7 fails with 'No package graphviz available.'

I am trying to install graphviz on my RHEL VM. when I run
$sudo yum install graphviz
I get this:
This system is not registered with an entitlement server. You can use subscription-manager to register.
No package graphviz available.
Error: Nothing to do
I later found out that I get this same problem with all packages.
I have tried several solutions I have found online such as:
saving the .repo file found here (this link will download the file)
then running
#from dir containing graphviz-rhel.repo
$sudo yum-config-manager --add-repo graphviz-rhel.repo
the output was
This system is not registered with an entitlement server. You can use subscription-manager to register.
adding repo from: graphviz-rhel.repo
grabbing file graphviz-rhel.repo to /etc/yum.repos.d/graphviz-rhel.repo
repo saved to /etc/yum.repos.d/graphviz-rhel.repo
Then I ran
$sudo yum-config-manager --enable graphviz-rhel
This gives no output and $yum-config-manager list all does not list anything related to graphviz as a repo (enabled or disabled)
I tried the solution here: failed to install 'graphviz*' packages with yum command on my RHEL server
except I found the rpm file here
When I ran the rpm command I got an error because I was missing a couple dozen dependencies so I dont think following this solution for all of them is a reasonable solution.
If someone can either inform me why one of these didn't work or let me know how to accomplish my goal of getting yum install <package> to work I would greatly appreciate it.
As posted in the comments, in order to utilize yum on a RHEL system you need an active subscription

Reinstall rhn-client-tools with non working yum

For every yum command it will return SSL certificate error
Loaded plugins: fastestmirror, rhnplugin, security
The SSL certificate failed verification.
My SSL cert if valid.
I checked rhel site for https://access.redhat.com/solutions/93313 but the problem is i cannot reinstall rhn-client-tools since yum is actually not working and for some other reasons i cannot boot it from DVD/image.
Any tips on this?
Before trying to reinstall, have you also checked your firewall settings and the time and date setting on your server ?
If the firewall is not the issue, I would suggest a simpler approach, just by going to RH's site and downloading the appropriate rhn-client-tools RPM package, copying it to your server and installing it.
"What about the possible dependencies?" I foresee you asking...
Use a different server (or VM) with the same OS version that has access to the internet.
use yum with the download only plugin to only download all the needed dependencies (you must have the yum-plugin-downloadonly package installed beforehand) in a local directory like so:
yum install --downloadonly --downloaddir=<directory> <package>
Copy the packages downloaded at step #2 to your affected machine and install them using the rpm utility as so: rpm -ivh /path/to/yum/download/dir/*

How to install apxs on xampp

I have a site I'm running off an Apache server, and I want to run a python script using the server and the web browser. I'm using xampp, and I have researched that I have to use modwsgi, and I have downloaded the zip and unpacked it onto my desktop. Now using command prompt I run
setup.py install
The first time I did this, I didn't have setup tools installed for python (I have python 2.7.8 and I'm on Windows 7 64 bit), so I went ahead and downloaded that, but now when I run the command again I get the following message
RuntimeError: The 'apxs' command appears to not to be installed or is not exectuable.
Please check the list of prerequistes in the documentation for the package and install
any missing Apache httpd server packages.
How exactly do I install apxs because I don't have Apache but xampp?
I was installing apxs on XAMPP in Windows. I wrote a blog post with the complete solution (in Spanish). I basically compiled my own version of apxs. The steps were:
Install ActiveState Perl for Windows
Add C:\xampp\apache\bin to the environment variable Path
Download apxs from here
Unzip tar.gz file in C:\xampp\apache\bin.
Execute:
ppm install dmake
cd c:\xampp\apache\bin\apxs
perl Configure.pl --with-apache2=C:\xampp\apache
--with-apache-prog=httpd.exe

Configuration for Java binding for ZeroMQ (0MQ) with no root privileges on Linux

I am a novice with zeroMQ and I am stuck at binding ØMQ with java on a server running CentOS release 5.9.
Unfortunately, I do not have super user/root privileges on the server and am trying to install ØMQ as a normal user with restricted privileges. I have installed ØMQ by following instructions on http://www.zeromq.org/area:download
Make sure that libtool, autoconf, automake are installed.
Check whether uuid-dev package, uuid/e2fsprogs RPM or equivalent on your system is installed.
Unpack the .tar.gz source archive.
Run ./configure, followed by make.
Could not run the following obviously
To install ØMQ system-wide run sudo make install.
On Linux, run sudo ldconfig after installing ØMQ.
Then I attempted to install jzmq.
Cloned [git clone https://github.com/zeromq/jzmq.git]
Ran autogen.sh
Ran configure
At this point I get the following error
checking for ZeroMQ... no
checking zmq.h usability... no
checking zmq.h presence... no
checking for zmq.h... no
configure: error: cannot find zmq.h
As a result of the above error I am not able to run java tests and get error "no jzmq in java.library.path".
Can anybody help/direct me to how to get java binding for zeromq work when you dont have root privileges to install it? Its difficult to get IT department to install a new software on servers.
Appreciate your help.
Note: I do not have write permissions to /usr directory
Thanks
GBP
This can be overcome by adding --with-zeromq=/home/user/zeromq (installation directory of zeromq)
./configure --with-zeromq=/home/user/zeromq
Other steps include
export LD_LIBRARY_PATH=/home/user/zeromq/lib
You can also use JeroMQ (https://github.com/zeromq/jeromq) which is a pure Java implementation of ZeroMQ
I got this working by running autogen.sh on OEL 6 then running configure / compiling / installing on CentOS 5.9. I briefly looked into why autogen.sh was failing and the problem was the tool chain was too old. Since I had a more up-to-date system with a modern tool chain available running autogen.sh on something other than CentOS 5 was the easiest path for me. I'm sure it works fine with other modern Linux variants, I had OEL 6 at my finger tips.
I also did not have access to a standard directory for installation. To get that working I added zmq.jar to my class path, and the run-time linker needed to be able to find the zeromq and jzmq run-time libraries.
I faced the same issue on CentOS 6.5 and found that you need to install "gcc-c++" for this to work.
I used the following to install dependencies:
yum -y install jdk zeromq-devel unzip libtool gcc autoconf automake gcc-c++ python
Note that "jdk" comes from our private repository and it's same what can be downloaded from java.com
The following public repositories are installed on server:
atomic
Actually, I ended up having this same issue, and the following script worked for me, where I installed zeromq into ~ (so that I have ~/lib contains libzmq.a libzmq.la libzmq.so libzmq.so.3 libzmq.so.3.1.0 pkgconfig)
./autogen.sh ./configure --prefix=$HOME \ #because you don't have root privileges
--with-zeromq=$HOME --includedir=$HOME/include/ --libdir=$HOME/lib/
./make
./make -n install
#to check to see if it installs it to the right location
make install