Configure Artifactory to work with external MSSQL server error - sql

I try to install Artifactory 7.11 on linux instance.
Detiles:
Cloud: AWS
OS: amazon linux
If i start the service with the default configuration everything work properly.
But if i uncomment the database section in the system.yaml file to work with SQL server i got an error that the "system.yaml validation failed" at node .shared.database.
Note that the connection details like user,password are checked and worked.
Additionally - the sql port(1433) port is already opened.
As you can see that the connection to the DB succeeded:
Default configuration file looks like this:
Configuration file with connection to the DB
Does anyone have an idea what can be the issue?
Thanks.

After a long examination I finally understood the main reason...
default the IPv6 is configured, so i've disable the ip section in the system.yaml and put the IPv4 server ip
multiple sql drivers was in the folder so i've deleted all of them except the v11.jar
Thanks #Prasanna for your help!

Related

Azure Release Pipelines: Azure SQL Database deployment error with not able to get to database server

We are seeing an error when trying to run a .SQL file on our Azure Dev Ops release pipeline:
Here is the error:
System.Management.Automation.RuntimeException: No resource found with serverName [the server], serverType Microsoft.Sql/servers in subscription [subscription id]. Specify the correct serverName/serverType and try again.Check out how to troubleshoot failures at https://aka.ms/sqlazuredeployreadme#troubleshooting-
We do have this set to checked on the networking tab of the sql server database:
I've checked the database server name and everything is correct.
It has something to do with the firewall rules though, but we can't figure out why we can't release our migration scripts to run auto.
Any other ideas of what else we can try?
Thanks.
UPDATE 1:
We have about 5 other instances that are set up the same way that seem to work fine.
Update 2:
Here is the Release step we are doing to push a .sql file to Azure Database which is failing:
Answer:
We removed the tcp: of of the server= part of the connection string and it worked.
Failed:
Server=tcp:server.database.azure.net,1433;Initial Catalog=[enter-db-nm];Persist Security Info=False;User ID=[enter-userid];Password=[enter-pw];MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;App={0}
Worked:
Server=server.database.azure.net,1433;Initial Catalog=[enter-db-nm];Persist Security Info=False;User ID=[enter-userid];Password=[enter-pw];MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;App={0}
We could leave the tcp: of of the server= and open up all ip addresses and it would work.
Suppose the tcp does something on the back side.
You can use the tcp: fine with logging into the database from SSMS.

VS code can't ssh to server: failed to create hard link

SETUP
I have a windows 10 PC connecting to my linux server (ubuntu 18.04.2). I run/edit code on my powerful server by remotely accessing the server through VS code's ssh ability. It is super convenient to edit my code on the server with VS code...
THE ISSUE
Visual Studio code won't connect to my Linux server. What is weird is that I am able to ssh into the server from the terminal within VScode by just literally typing ssh <username>#<server-hostname>
However, when I do the Remote-SSH option within VScode then it does not want to connect to the server...strange...
Here is how I remotely SSH into server with VScode built in functionality (marked with red rectangle). Also part of this screenshot is my config file, which I have triple checked as correct (IP address and .ssh/id_rsa_gpu_1_solarpv_ssh location)
HERE IS THE ERROR OUTPUT
MY ATTEMPTS
I have made sure that the config file is setup correctly and that the IP address is correct.
I have ensured that the server's IP address is also in the 'known_hosts' file located at /Users/.ssh/
I even generated my own private key for SSH connection as advised by the great documentation here: https://code.visualstudio.com/docs/remote/troubleshooting#_quick-start-using-ssh-keys
Still getting the error of failed to create hard link...
With all of my back-end stuff done right, I am absolutely clueless regarding why this is an issue.
After spending literally 9 hours on this issue...here is the answer:
When you launch VScode and remotely access the linux server, the linux server is instructed to download and install a vscode server so that you (on the other side) can remotely connect to the server.
If the server does not have internet just make sure the following setting is ticked
This allows the remote server (without or with internet connection) to get the vscode server running.
To eliminate the "failed to create hard link error" go to the directory mentioned by the error, which in this case on linux server is
navigate to /home/<username>/.vscode-server/bin/0ba0ca.../
then remove/delete the hardlink file and target file which also has
the same name as the directory.
Then just attempt to remotely access your server again through
vscode and all should be fine
Here is also a discussion regarding the issue...if you still have problems https://github.com/microsoft/vscode-remote-release/issues/2507
I solved this by enabling the option Lockfiles in Tmp:
i just deleted the whole library and it works, i don't see anything wrong with doing that.
rm -r /path_to_project/.vscode-server/
if i'm wrong feel free to correct me :)
Try this
Just in case others need to try the same here is the detail
ctrl-shift-p and choose:
Remote-SSH: kill VS Code Server on Host...
Chose the host name
Selected the platform type (linux)
https://github.com/microsoft/vscode-remote-release/issues/4307#issuecomment-762882247
worked for me.

Aginity Workbench Redshift Server Connection Error

I've downloaded Aginity Workbench for Redshift, version 4.3.
I'm receiving the error message
The Connection is not open
I selected my server endpoint by using this document: http://docs.aws.amazon.com/redshift/latest/gsg/rs-gsg-connect-to-cluster.html
example from link: examplecluster.userid.us-west-2.redshift.amazonaws.com
Port is 5439
I noticed right away that I could select a database from the dropdown. If I supply the database name I still get the error message "The connection is not open", does anybody know what I'm missing? Thanks.
lowercase loginid should fix your issue.
This could be several things.
Does the instance require SSL connections? If so, select 'require' for the SSL mode in the connection setup.
Also, the link doesn't typically contain a 'userid' (examplecluster.userid.us-west-2.redshift.amazonaws.com). You can get the endpoint from the configuration tab in AWS management console for the redshift instance. The page looks just like the image referenced in the doc here.
http://docs.aws.amazon.com/redshift/latest/gsg/rs-gsg-connect-to-cluster.html
The Connection is not open is the error at beginning stage, so could you please check if there are any firewall issue. run the command from your computer:
telnet examplecluster.userid.us-west-2.redshift.amazonaws.com 5439
If can't, you need check the security group setting on that redshift cluster instance and open inbound port 5439 to public or your own IP address.

Why is WLST not recognizing the user/password in the key and config file in connect() call?

I'm trying to connect to an admin server in WLST using config and key files. There are no error messages but I am prompted for a username and password. These files were created (by another developer who is long gone[1]) with the storeUserConfig() command. My call to connect looks something like this: connect(userConfigFile=configFile, userKeyFile=keyFile, url='t3://somehost:7031')).
Is there some restriction in using these files, such as it can only be used on the host where created, or it needs access to the domain's boot.properties file?
Note: I'm trying to connect to an admin server on a different host and non-standard port (e.g. not 7001). The server I am running WLST on and the remote host are the same version of Weblogic.
Some of the things I have tried:
verified that these files appear correct, the key file being binary data and the config file having a line for "weblogic.management.username={AES}..." and "weblogic.management.password={AES}...".
verified that there is a server on the specified port by entering a known login and password that is successful
specified the admin server in the connect parameter
turn on debug(true); the only output is <wlst-debug> connect : Will check if userConfig and userKeyFile should be used to connect to the server and another line giving the path to the userConfig file
turn on Python logging in jython with -Dpython.verbose=debug; nothing relevant to decryption operation
Munging the key or the config files generates no error messages and behaviour as above
[1]: These files are still used today by other existing WLST scripts. However, these scripts are so convoluted and deliberately obfuscated that they are very difficult to reverse-engineer how connect() is being called.
You do not need to access to the domain's boot.properties file. You just need to make sure the configFile and keyFile pointing to the right files. FYI, here is one of the commands we are using:connect(userConfigFile='./user.secure',userKeyFile='./key.secure',url='t3://somehost:7001')
Have you check the network connectity that might be having a firewall in between that troubling you, check the traceroute from the script machine to the Remote machine. Recently I have faced simalar issue. once the routing table updated with allow the WL admin server port everything got set.
Hope this could helps you!
I had this problem too. In a script, I exported the Linux variables userConfigFile and userKeyFile. Then I connected by running:
url='t3://localhost:7002'
userConfigFile='$userConfigFile'
userKeyFile='$userKeyFile'
connect(userConfigFile=$userConfigFile, userKeyFile=#userKeyFile, url=url)
That all worked in a script, but would not work interactively. I changed to doing the following:
url='t3://localhost:7002'
userConfigFile='/users/me/weblogic-2014/weblogic-admin-WebLogicConfig.properties'
userKeyFile='/users/me/weblogic-2014/weblogic-admin-WebLogicKey.properties'
connect(userConfigFile=userConfigFile, userKeyFile=userKeyFile, url=url)
And that worked interactively.

ODBC Connection String Problem

I am having major trouble connecting to my database via ODBC.
The db is local (but I have a mirror on a virtual machine), so I am trying to use the connectionstring:
Dsn=MonetDB;host=TARBELL
where TARBELL is the name of my computer. However, it doesn't connect. BUT, this string does:
Dsn=MonetDB;host=localhost
as does
Dsn=MonetDB
Can anyone explain this? I am at a complete loss.
I have taken down my firewalls (at least until I get this figured out), so that can't be the problem.
I eventually want to change the TARBELL to the mirrored virtual machine running another instance of the database.
Many thanks,
Brett
I can recommend connectionstrings.com for details on the supported syntax across all of the supported ADO.NET providers.
DNS usually resolves TARBALL and localhost differently. You can see with ping:
c:\>ping tarball
Pinging tarball [192.168.1.99] with 32 bytes of data:
^^^^^^^^^^^^
c:\>ping localhost
Pinging tarball [127.0.0.1] with 32 bytes of data:
^^^^^^^^^
The computer name resolves to the external IP, while localhost resolves to the special IP 127.0.0.1 that always points at the local machine. Some installations of MySQL listen on localhost only, so if you specify the computer name, they stop listening.
This behaviour is configured using the bind-address option:
--bind-address=127.0.0.1
Or the equivalent (MySQL also uses DNS to resolve hostnames):
--bind-address=localhost
To make the server listen on all interfaces, specify:
--bind-address=0.0.0.0
On Windows, MySQL reads configuration options from:
WINDIR\my.ini, WINDIR\my.cnf
C:\my.ini, C:\my.cnf
INSTALLDIR\my.ini, INSTALLDIR\my.cnf
See the MySQL manual pages for some more information.
figured i'd post an answer to this here since i found this while searching for a windows monetdb connection string. this is the conn string i'm using and is working for monetdb 5:
DRIVER=MonetDB ODBC Driver;PORT=50000;HOST=<your host>;DATABASE=<your db>;UID=monetdb;PWD=monetdb
I've never seen a "host" parameter for a DSN type connection string. DSN's are either stored with the user, the system or as a file. The way you have referenced your DSN here, it is either stored under your user account or with the system. With a DSN, all the credentials and information about which server and driver to be used are stored in the DSN. If you want control over those parameters, you should consider a DSN-less connection string like so:
"Driver={Mysql}; Server=[server_name];Port=[port_number]; Database=[database_name];UID=[username]; PWD=[password]"