Flyway connecting to a Database Cluster on Linux - linux

I'm trying to connect to an Oracle Cluster using Flyway-Commandline. It works fine from DOS using:
# Ommitting the other params for brevity: jarDir, locations, user, password, driver etc
flyway clean -url="jdbc:oracle:thin:#(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST = my_host_1)(PORT=8020))(ADDRESS=(PROTOCOL=TCP)(HOST = my_host_2)(PORT=8020))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=MY_SERVICE_NAME)))"
But when I do the same on linux I get an error:
ERROR: FlywayException: Unable to obtain Jdbc connection from DataSource
ERROR: Occured in com.googlecode.flyway.core.util.jdbc.JdbcUtils.openConnection() at line 56
ERROR: Caused by oracle.net.ns.NetException: NL Exception was generated
ERROR: Occured in oracle.net.resolver.AddrResolution.resolveAddrTree() at line 626
It works fine on both platforms if I connect directly to one of the hosts directly using:
flyway clean -url=jdbc:oracle:thin:#my_host_1:8020/MY_SERVICE_NAME
The problem is that when one host in the cluster goes down, which happens regularly, this stops working.

This sounds like a problem with your Linux environment and not with Flyway itself.

Related

pysmb not working on linux ubuntu server 22.04 LTS

I have a telegram bot and there I implemented support for receiving files from a file server, in my case smb. The problem is that on the local everything works fine! You also need to keep in mind that I have Ubuntu 20.04 on my local. This is the only thing I haven't been able to check. And I checked the following points.
on the server, the python version was 3.10.4, on the local 3.9. Then i installed the latest version of python and the project works great!
and on the server, when trying to make a connection to SMB, there was an error:
File "bot/venv/lib/python3.10/site-packages/smb/utils/md4.py", line 251, in int_array2str
nstr = nstr + str(chr(i))
TypeError: 'U32' object cannot be interpreted as an integer
Then I found this problem on the Python discuss and tried to do the same. This error disappeared but another, more direct one came up. Now it's just AssertionError and points to the string with the connection attempt.
This is my code with connection:
conn = SMBConnection(
SMB_LOGIN, SMB_PASSWORD,
LOCAL_NAME, SMB_REMOTE_NAME, use_ntlm_v2=True
)
assert conn.connect(SMB_IP_ADDRESS, 139)
There doesn't seem to be anything remarkable here.
I also tried to change ports, put 445/135/137.
445:
ConnectionResetError: [Errno 104] Connection reset by peer
135 and 137:
timeout expired
A simple connection via the smbclient from the terminal also works.
I don't understand what exactly is the problem. The only thing left for me to check is to change the version of Linux. But I also do not believe that after that it will start working

How to connect Guidewire to Oracle database?

I have installed Oracle in my system and wanted to change my local database to Oracle, but making changes in the database-config.xml I am unable to get my server started and getting the following error:
java.lang.RuntimeException : No Appropriate database found in
configuration: env = 'local'
Just add to your configuration file (database-config.xml) the parameter env="local".
Example:
<database
autoupgrade="full"
name="BillingCenterDatabase"
dbtype="oracle"
env="local">

Unable to use file endpoint in Mule on Linux server

Everytime I try to poll network drive on linux machine, it gets failed. I've tried both the options giving the absolute path and the mount path of the network drive. It is specifically giving errors when my Mule Runtime is also on Linux, on Windows it is working perfectly fine. Here is my flow:
I've also tried path="/ihr_dev_test/Dev/Ingest_Storage/Practitioner", since ihr_dev_test is mounted on my linux server, but every time I get the same error:
I'm running my Mule workflow on linux Machine, following is the Stacktrace:
2017-12-18 06:08:47,639 [qtp100710435-9788] INFO org.mule.transport.file.FileConnector - Registering listener: filepollerFlow on endpointUri: file:///nasv0053.uhc.com/ihr_dev_test/Dev/Ingest_Storage/Practitioner
2017-12-18 06:08:47,640 [qtp100710435-9788] INFO org.mule.lifecycle.AbstractLifecycleManager - Initialising: 'null'. Object is: FileMessageReceiver
Message : Failed to start inbound endpoint "endpoint.file.nasv0053.uhc.com.ihr.dev.test.Dev.Ingest.Storage.Practitioner"
Element : /endpoint.file.nasv0053.uhc.com.ihr.dev.test.Dev.Ingest.Storage.Practitioner # app:filepoller.xml:10 (File)
Exception stack is:
Failed to start inbound endpoint "endpoint.file.nasv0053.uhc.com.ihr.dev.test.Dev.Ingest.Storage.Practitioner" (org.mule.api.lifecycle.LifecycleException)
org.mule.util.FileUtils.openDirectory(FileUtils.java:128)
org.mule.transport.file.FileMessageReceiver.doConnect(FileMessageReceiver.java:155)
org.mule.transport.AbstractMessageReceiver.connectHandler(AbstractMessageReceiver.java:448)

Unable to install logstash plugin

Logstash 5.1.1 on Windows 7 32bit, trying without success to install logstash-filter-elapsed. Below the method I tried.
Before running plugin installer, I run:
set DEBUG=1
to show debug output.
Then I run:
logstash-plugin install logstash-filter-elapsed
This fails both when I'm in my corporate network (with proxy) and when using a network without proxy, with the following error:
Looking if package named: logstash-filter-elapsed exists at https://artifacts.elastic.co/downloads/logstash-plugins/logstash-filter-elapsed/logstash-filter-elapsed-5.1.1.zip
Errno::ECONNREFUSED: Connection refused - Connection refused
initialize at org/jruby/ext/socket/RubyTCPSocket.java:126
open at org/jruby/RubyIO.java:1197
connect at C:/tools/logstash-5.1.1/vendor/jruby/lib/ruby/1.9/net/http.rb:763
timeout at org/jruby/ext/timeout/Timeout.java:98
connect at C:/tools/logstash-5.1.1/vendor/jruby/lib/ruby/1.9/net/http.rb:763
do_start at C:/tools/logstash-5.1.1/vendor/jruby/lib/ruby/1.9/net/http.rb:756
start at C:/tools/logstash-5.1.1/vendor/jruby/lib/ruby/1.9/net/http.rb:745
start at C:/tools/logstash-5.1.1/vendor/jruby/lib/ruby/1.9/net/http.rb:557
start at C:/tools/logstash-5.1.1/lib/pluginmanager/utils/http_client.rb:13
remote_file_exist? at C:/tools/logstash-5.1.1/lib/pluginmanager/utils/http_client.rb:23
get_installer_for at C:/tools/logstash-5.1.1/lib/pluginmanager/pack_fetch_strategy/repository.rb:27
create at C:/tools/logstash-5.1.1/lib/pluginmanager/install_strategy_factory.rb:15
each at org/jruby/RubyArray.java:1613
create at C:/tools/logstash-5.1.1/lib/pluginmanager/install_strategy_factory.rb:14
execute at C:/tools/logstash-5.1.1/lib/pluginmanager/install.rb:27
run at C:/tools/logstash-5.1.1/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/command.rb:67
execute at C:/tools/logstash-5.1.1/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/subcommand/execution.rb:11
run at C:/tools/logstash-5.1.1/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/command.rb:67
run at C:/tools/logstash-5.1.1/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/command.rb:132
(root) at C:\tools\logstash-5.1.1\lib\pluginmanager\main.rb:46
It seems that there's a timeout in contacting the url "https://artifacts.elastic.co/downloads/logstash-plugins/logstash-filter-elapsed/logstash-filter-elapsed-5.1.1.zip".
Opening this url in a browser returns an xml with an error message (seems like the xml you when trying to access a not existing object from a AWS S3 bucket).
Adding the --no-verify flag yelds the same result.
EDIT
I tried to bypass this problematic "Looking if package named:..." step: I edited logstash-5.1.1\lib\pluginmanager\pack_fetch_strategy\repository.rb, adding a return nil at the beginning of the def get_installer_for(plugin_name).
Running the installation, I get another error:
Installing logstash-filter-elapsed
Error Bundler::HTTPError, retrying 1/10
Could not fetch specs from https://rubygems.org/
Error Bundler::HTTPError, retrying 2/10
Could not fetch specs from https://rubygems.org/
...

Bad SSL Key When Trying to Use spark-ec2 script to launch cluster on EC2?

Version of Apache Spark: spark-1.2.1-bin-hadoop2.4
Platform: Ubuntu
I have been using the spark-1.2.1-bin-hadoop2.4/ec2/spark-ec2 script to create temporary clusters on ec2 for testing. All was working well.
Then I started to get the following error when trying to launch the cluster:
[Errno 185090050] _ssl.c:344: error:0B084002:x509 certificate routines:X509_load_cert_crl_file:system lib
I have traced this back to the following line in the spark_ec2.py script:
conn = ec2.connect_to_region(opts.region)
Thus, the first time the script interacts with ec2, it is throwing this error. Spark is using the Python boto library (included with the Spark download) to make this call.
I assume the error I am getting is because of a bad cacert.pem file somewhere.
My question: which cacert.pem file gets used when I try to invoke the spark-ec2 script, and why is it not working?
I also had this error with spark-1.2.0-bin-hadoop2.4
SOLVED: the embedded boto library that comes with Spark found a ~/.boto config file I had for another non-Spark project (actually it was for the Google Cloud Services...GCS installed it, I had forgotten about it). That was screwing everything up.
As soon as I deleted the ~/.boto config file GCS installed, everything started working again for Spark!

Resources