How to connect kafka with MySQL on another Host? - mysql

My database is in another Linux node lets suppose xxx.xx.xxx.xxx:3306 and I am running the standalone command of kafka connect from my Windows machine. My server.properties code is
name=test-source-mysql-jdbc-autoincrement
connector.class=io.confluent.connect.jdbc.JdbcSourceConnector
tasks.max=1
connection.url=jdbc:mysql://xxx.xx.xxx.xxx:3306/databasename?user=username&useSSL=false
&password=password
mode=incrementing
incrementing.column.name=columnname
topic.prefix=mysqlname-databasename-database-
I am Receiving the following error
Mar 28, 2019 11:55:41 AM org.glassfish.jersey.internal.inject.Providers checkProviderRuntime
WARNING: A provider org.apache.kafka.connect.runtime.rest.resources.ConnectorPluginsResource registered in SERVER runtime does not implement any provider interfaces applicable in the SERVER runtime. D
ue to constraint configuration problems the provider org.apache.kafka.connect.runtime.rest.resources.ConnectorPluginsResource will be ignored.
Mar 28, 2019 11:55:41 AM org.glassfish.jersey.internal.inject.Providers checkProviderRuntime
WARNING: A provider org.apache.kafka.connect.runtime.rest.resources.ConnectorsResource registered in SERVER runtime does not implement any provider interfaces applicable in the SERVER runtime. Due to
constraint configuration problems the provider org.apache.kafka.connect.runtime.rest.resources.ConnectorsResource will be ignored.
Mar 28, 2019 11:55:41 AM org.glassfish.jersey.internal.inject.Providers checkProviderRuntime
WARNING: A provider org.apache.kafka.connect.runtime.rest.resources.RootResource registered in SERVER runtime does not implement any provider interfaces applicable in the SERVER runtime. Due to constr
aint configuration problems the provider org.apache.kafka.connect.runtime.rest.resources.RootResource will be ignored.
Mar 28, 2019 11:55:41 AM org.glassfish.jersey.internal.Errors logErrors
WARNING: The following warnings have been detected: WARNING: The (sub)resource method createConnector in org.apache.kafka.connect.runtime.rest.resources.ConnectorsResource contains empty path annotati
on.
WARNING: The (sub)resource method listConnectors in org.apache.kafka.connect.runtime.rest.resources.ConnectorsResource contains empty path annotation.
WARNING: The (sub)resource method listConnectorPlugins in org.apache.kafka.connect.runtime.rest.resources.ConnectorPluginsResource contains empty path annotation.
WARNING: The (sub)resource method serverInfo in org.apache.kafka.connect.runtime.rest.resources.RootResource contains empty path annotation.
[2019-03-28 11:55:42,108] ERROR Stopping after connector error (org.apache.kafka.connect.cli.ConnectStandalone)
java.lang.IllegalArgumentException: Number of groups must be positive.
at org.apache.kafka.connect.util.ConnectorUtils.groupPartitions(ConnectorUtils.java:41)
at io.confluent.connect.jdbc.JdbcSourceConnector.taskConfigs(JdbcSourceConnector.java:148)
at org.apache.kafka.connect.runtime.Worker.connectorTaskConfigs(Worker.java:305)
at org.apache.kafka.connect.runtime.standalone.StandaloneHerder.recomputeTaskConfigs(StandaloneHerder.java:307)
at org.apache.kafka.connect.runtime.standalone.StandaloneHerder.updateConnectorTasks(StandaloneHerder.java:333)
at org.apache.kafka.connect.runtime.standalone.StandaloneHerder.putConnectorConfig(StandaloneHerder.java:211)
at org.apache.kafka.connect.cli.ConnectStandalone.main(ConnectStandalone.java:107)
Any help is appreciated.

The error Number of groups must be positive. indicates that Kafka Connect JDBC source has not found any tables/objects to fetch from the database. Looking at your config, you've not specified table.whitelist / table.blacklist so that could be why. Another reason would be if the user is not authorised to select from any of the available objects. This article goes into more detail.

Related

Cannot install jinja2 with jython pip?

I am using Windows 7 with Jython 2.7.0. I am able to run jython --version and pip --version in the bin directory and get back what I expect, 2.7.0 and 1.6, with a bunch of extra information.
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\myUser>cd ../..
C:\>cd jython2.7.0/bin
C:\jython2.7.0\bin>pip --version
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.python.core.PySystemState (file:/C:/jy
thon2.7.0/jython.jar) to method java.io.Console.encoding()
WARNING: Please consider reporting this to the maintainers of org.python.core.Py
SystemState
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflect
ive access operations
WARNING: All illegal access operations will be denied in a future release
Feb 16, 2021 1:37:50 PM org.python.netty.util.internal.PlatformDependent <clinit
>
INFO: Your platform does not provide complete low-level API for accessing direct
buffers reliably. Unless explicitly requested, heap buffer will always be prefe
rred to avoid potential system unstability.
pip 1.6.dev1 from C:\jython2.7.0\Lib\site-packages (python 2.7)
I try to install jinja2 with pip install jinja2 and have also tried it captialized since I saw that as well pip install Jinja2 and get the following
C:\jython2.7.0\bin>pip install jinja2
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.python.core.PySystemState (file:/C:/jy
thon2.7.0/jython.jar) to method java.io.Console.encoding()
WARNING: Please consider reporting this to the maintainers of org.python.core.Py
SystemState
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflect
ive access operations
WARNING: All illegal access operations will be denied in a future release
Feb 16, 2021 1:44:35 PM org.python.netty.util.internal.PlatformDependent <clinit
>
INFO: Your platform does not provide complete low-level API for accessing direct
buffers reliably. Unless explicitly requested, heap buffer will always be prefe
rred to avoid potential system unstability.
Downloading/unpacking jinja2
Got this failure javax.net.ssl.SSLException: Tag mismatch! during SSL handshake
(<_realsocket at 0x215 type=client open_count=1 channel=[id: 0x53d8a502, /192.16
8.1.59:64975 => pypi.python.org/199.232.36.223:443] timeout=15.0>)
Got this failure javax.net.ssl.SSLException: Tag mismatch! during SSL handshake
(<_realsocket at 0x216 type=client open_count=1 channel=[id: 0x3d4b1e67, /192.16
8.1.59:64976 :> pypi.python.org/199.232.36.223:443] timeout=15.0>)
←[31m Cannot fetch index base URL https://pypi.python.org/simple/
←[0mGot this failure javax.net.ssl.SSLException: Tag mismatch! during SSL handsh
ake (<_realsocket at 0x217 type=client open_count=1 channel=[id: 0x5f10319d, /19
2.168.1.59:64977 :> pypi.python.org/199.232.36.223:443] timeout=15.0>)
←[31m Could not find any downloads that satisfy the requirement jinja2
←[0mCleaning up...
←[31mNo distributions at all found for jinja2
←[0m←[31mStoring debug log for failure in C:\Users\bkarabinchak\.pip\pip.log
←[0m
This line ←[31mNo distributions at all found for jinja2 makes me think there is no Jinja2 for jython, nor Cheetah which I also tried to install. I tried those as they were referenced here as jython HTML Templaters.
Can someone either 1) Help me troubleshoot installing jinja2 or 2) Recommend a HTML Template package that does exist for jython if jinja2/Cheetah do no work?

WARNING: Name of the hazelcast schema location is incorrect, using default

The warning level logs we receive while starting our application are below,
[main()] starting... [OK] Sep 03, 2019 1:38:17 PM
com.hazelcast.config.AbstractXmlConfigHelper WARNING: Name of the
hazelcast schema location is incorrect, using default WARNING: An
illegal reflective access operation has occurred WARNING: Illegal
reflective access by
com.hazelcast.internal.networking.nio.SelectorOptimizer
(file:/home/abc/def/ghe/lib/thirdparty/hazelcast-3.12.jar) to field
sun.nio.ch.SelectorImpl.selectedKeys WARNING: Please consider
reporting this to the maintainers of
com.hazelcast.internal.networking.nio.SelectorOptimizer WARNING: Use
--illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be
denied in a future release
How can ignore these WARNING logs or how can change log level INFO?
Or is there any way you know?
This warning would be thrown, if you have a version mismatch between the XSD version in your hazelcast.xml file and the version of hazelcast (hazelcast jar file) you use in your application.
Recently, one of the tester complaint about same warning. While investigation I have found that her hazelcast.xml file has some different version of XSD as given below :
<hazelcast xmlns="http://www.hazelcast.com/schema/config"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.hazelcast.com/schema/config hazelcast-config-
3.6.xsd">
Whereas in my machine, I was not getting that warning therefore, I just copy my namespace header as given below in her hazelcast.xml file and it fixed the problem for her.
<hazelcast
xmlns="http://www.hazelcast.com/schema/config"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.hazelcast.com/schema/config
http://www.hazelcast.com/schema/config/hazelcast-config-3.12.xsd">
So please make sure you use the same version of XSD url in your hazelcast.xml file as hazelcast jar version.
Try changing
<hazelcast-client xmlns:xsi="w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="hazelcast.com/schema/client-config hazelcast.com/schema/client-config/hazelcast-client-config-3.6.xsd"
xmlns="httt p://www.hazelcast.com/schema/client-config">
to
<hazelcast-client xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.hazelcast.com/schema/client-config hazelcast-client-config-3.12.xsd"
xmlns="http://www.hazelcast.com/schema/client-config">
It may be a cut&paste error, but in your comment the xmlns has 3 "t"s in the "http: section.
Or, since you're using 3.12, you could use YAML configuration.

package failed to load due to error 0x80131534 "(null)". This occurs when CPackage::LoadFromXML fails

I ran the following batch file on our SQL Server "9". It is an SSIS 2012 package with no connections, no tasks, no code. It's an empty package.
ECHO before dtexe!
REM "DTExec.exe" /FILE "E:\SSIS\MyAppName\Packages\Empty2012Package.dtsx"
"D:\SQL2012\110\DTS\Binn\DTExec.exe" /FILE "E:\SSIS\MyAppName\Packages\Empty2012Package.dtsx"
SET RESULT=%errorlevel%
ECHO RESULT AFTER DTEXEC=%RESULT%
exit /B %RESULT%
Here's my output:
----------------------------------------------------------------
Output of messages for workload object TEST/GHG1990R.28/MAIN
Start date Tue Oct 06 20:45:38 2015
----------------------------------------------------------------
C:\Users\MyServerId>ECHO before dtexe!
before dtexe!
C:\Users\MyServerId>REM "DTExec.exe" /FILE "E:\SSIS\MyAppName\Packages\Empty2012Package.dtsx"
C:\Users\MyServerId>"D:\SQL2012\110\DTS\Binn\DTExec.exe" /FILE "E:\SSIS\MyAppName\Packages\Empty2012Package.dtsx"
Microsoft (R) SQL Server Execute Package Utility
Version 11.0.5058.0 for 64-bit
Copyright (C) Microsoft Corporation. All rights reserved.
Started: 8:45:39 PM
Could not load package "E:\SSIS\MyAppName\Packages\Empty2012Package.dtsx" because of error 0x80131534.
Description: The package failed to load due to error 0x80131534 "(null)". This occurs when CPackage::LoadFromXML fails.
Source: {BA581388-EFF5-4BC7-89E7-48E11D6DF0AE}
Started: 8:45:39 PM
Finished: 8:45:39 PM
Elapsed: 0.094 seconds
C:\Users\MyServerId>SET RESULT=5
C:\Users\MyServerId>ECHO RESULT AFTER DTEXEC=5
RESULT AFTER DTEXEC=5
C:\Users\MyServerId>exit /B 5
I get the same error regardless of whether I run with the 32 or 64 bit DTEXEC utility. When I run the same batch file against the same package on another SQL Server, server "80", I get no error.
All of the packages work on server 80, none work on 9. I get the above error every time on server 9.
When I execute this on both 80 and 9,
select ##version
I get the same result
Microsoft SQL Server 2012 - 11.0.5058.0 (X64)
May 14 2014 18:34:29
Copyright (c) Microsoft Corporation
Enterprise Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1) (Hypervisor)
I am able to successfully use the sqlcmd and bcp utilities on 9, but not the dtexec utility.
The error that I am getting seems to suggest that I am using an old version of dtexec to open up a newer package, for example, trying to use a SQL 2008 dtexec util to execute a new SQL 2012 package.
Clearly the packages are not corrupt because all of the packages work on 80 and copies of the exct files on 9 all do not work.
The only thing I can think of is a installation issue with SQL Server, for example, a corrupt install or unregistered dll.
As far as I can tell, this is the first and only version of SQL Server installed on these machines, so I shoould not be acidentily runnning an old version of DTEXEC with a newer 2012 package.
Here is the complete Empty2012Package.dtsx file:
<?xml version="1.0"?>
<DTS:Executable
DTS:refId="Package" xmlns:DTS="www.microsoft.com/SqlServer/Dts"
DTS:ExecutableType="SSIS.Package.3"
DTS:CreatorName="MyDOMAIN\MyLanId"
DTS:CreatorComputerName="MYCPTR"
DTS:CreationDate="7/2/2015 8:26:52 AM"
DTS:PackageType="5"
DTS:VersionBuild="2"
DTS:VersionGUID="{00FD1F37-6375-4942-91D3-9ECA0B131FFD}"
DTS:LastModifiedProductVersion="11.0.2100.60"
DTS:LocaleID="1033"
DTS:ObjectName="Empty2012Package"
DTS:DTSID="{1539BA56-F17B-438E-A874-A2151F2F79C5}"
DTS:CreationName="SSIS.Package.3">
<DTS:Property
DTS:Name="PackageFormatVersion">6</DTS:Property>
<DTS:Variables />
<DTS:Executables />
<DTS:DesignTimeProperties><![CDATA[<?xml version="1.0"?>
<!--This CDATA section contains the layout information of the package. The section includes information such as (x,y) coordinates, width, and height.-->
<!--If you manually edit this section and make a mistake, you can delete it. -->
<!--The package will still be able to load normally but the previous layout information will be lost and the designer will automatically re-arrange the elements on the design surface.-->
<Objects
Version="sql11">
<!--Each node below will contain properties that do not affect runtime behavior.-->
</Objects>]]></DTS:DesignTimeProperties>
</DTS:Executable>
Since I used SQL 2012 to create the dtsx file, I knew that is was a 2012 package. However, according to this web page,
http://www.techbrothersit.com/2014/09/ssis-how-to-find-version-of-ssis.html
PackageFormatVersion of 6 indicates a 2012 package.
I don't have access to the server to see the versions of each dtexec.exe file. I hope to get this information soon.
When I run the same batch file with the same package on 80, as mentioned above, it works:
----------------------------------------------------------------
Output of messages for workload object C1_GHG1_TEST/GHG1999I.11/MAIN
Start date Tue Oct 06 22:21:08 2015
----------------------------------------------------------------
C:\Users\MyServerId>ECHO before dtexe!
before dtexe!
C:\Users\MyServerId>REM "DTExec.exe" /FILE "E:\SSIS\MyAppName\Packages\Empty2012Package.dtsx"
C:\Users\MyServerId>"D:\SQL2012\110\DTS\Binn\DTExec.exe" /FILE "E:\SSIS\MyAppName\Packages\Empty2012Package.dtsx"
Microsoft (R) SQL Server Execute Package Utility
Version 11.0.5058.0 for 64-bit
Copyright (C) Microsoft Corporation. All rights reserved.
Started: 10:21:08 PM
DTExec: The package execution returned DTSER_SUCCESS (0).
Started: 10:21:08 PM
Finished: 10:21:08 PM
Elapsed: 0.203 seconds
C:\Users\MyServerId>SET RESULT=0
C:\Users\MyServerId>ECHO RESULT AFTER DTEXEC=0
RESULT AFTER DTEXEC=0
C:\Users\MyServerId>exit /B 0
Any ideas on what may be causing this error? I'm thinking that this is a server SQL Server setup issue rather than something that I can control.
Your thoughts?
Update
The problem is related to security permissions. When we try running the job in the CA Scheduler udner MyServiceID, an Admin with access to the box then checked the Event Log and found this error:
The user has not been granted the requested logon type at this machine.
Furthermore, When a user who is in the local Admin group remotes to this server and launches the same batch file, the job runs successfully.
According to this link,
https://technet.microsoft.com/en-us/library/cc732593(v=ws.10).aspx
The error can be resoled by granting the right to "Allow User To Log On Locally." The user is already granted "Allow Log On As Batch" rights. When I dop a "net user MyServiceId" command from the command line, I also see that the ID is active and allowed on all Workstations at all times.
When I requested "Allow user to LogOn Locally" rights to be granted, apparently even the "Admins" could not grant this right because is is disallowed by Group Policy. Because this is the only server where this is happening, I am left wondering what is different about this server assuming that all serevrs share the same Group Policy. One thing that we noticed is that the OWNER property on the dtsx file is not MyServiceId and in environments. I don't have the righs to change this but I don't thing that this is it. The MyServiceAccount does have full control of the folder where the batch files and packages reside.
Update 2
Since this is now clearly a security issue, perhaps it would help if I try an state the question after stating the known facts:
MyServiceId has execute access to the local folder, E:\SSIS\MyAppName\Packages\, in which SSIS package resides
MyServiceId has execute access to the local folder, D:\SQL2012\110\DTS\Binn\, in which DTEXEC resides
MyServiceId has LogOn As Batch rights on the Server.
MyServiceId is an active account that is allowed on all Servers and Workstations
Question:
Given the simple one line batch file that calls DTEXEC passing a package path as a param, what could be contributing to the error that I am getting? What additional things can I look for? Sicne "Allow User To Log On locally" is never set on other server, what can be different on this server that is contributing to this error:
The user has not been granted the requested logon type at this machine.
Is the value of the OWNER property of the dtsx file relevant?
Update 3
Calling process Name: C:\Windows\System32\LSASS.exe
Is this a hint?
Update 4
In production, where it works,the service id is executing with a Network Logon type of 3, which is interactive. On 9, where it's giving us this error, it is executing with a logon type of 2, which is interactive. (We do not have the option to turn on "Allow Log On Locally" for the uyser on 9. This is verboten.
What would account for the same ID running on 2 different machines on teh same domain, to run as different user types?
I encountered this error shortly after making a modification to my machine.config file on my workstation. I resolved my issues in the machine.config (I had placed a node under the wrong parent node) and this error went away.
Unfortunately, since the error is vague, this may not be the solution for your situation. Just thought I'd share in case it helps someone.
I changed my SQL service account to local system. My SSIS services were also running from local system only.
So, ideally we can try keeping both as same services account.
NOTE: this needs to be applied only in case we are not able to change the access rights of SQL agent service account.

Confluence html macro ssl exception

We are using the html-include macro for displaying content from an https resource. However, if we include the macro the following exception occurs:
Error rendering macro 'html-include' :
com.atlassian.renderer.v2.macro.MacroException:
com.atlassian.confluence.macro.MacroExecutionException:
javax.net.ssl.SSLHandshakeException:
sun.security.validator.ValidatorException: PKIX path building failed:
sun.security.provider.certpath.SunCertPathBuilderException:
unable to find valid certification path to requested target
We don't know what to do for getting this to work. Can you please help us?
Cause
The two instances communicating do not explicitly trust one another, even though they are using the same keystore. The certificate the instances are using must be present in the truststore for server-to-server communication to work.
Resolution
Follow the instructions in this document: Connecting to LDAP or JIRA or Other Services via SSL if you are on JDK 1.5
Follow the instructions in this document: keytool - Key and Certificate Management Tool if you are on JDK 1.6
This will require a restart of all applications that have the parameter added.

SQL Server Agent Error on running an SSIS package

When trying to execute an SSIS package I get the following error:
Date 14/08/2013 15:02:42 Log Job History (test)
Step ID 1 Server YGAL1-MOBL1 Job Name test Step Name ssis
Duration 00:00:00 Sql Severity 0 Sql Message ID 0 Operator
Emailed Operator Net sent Operator Paged Retries Attempted 0
Message Executed as user: GER\YGAL1-MOBL1$. Microsoft (R) SQL Server
Execute Package Utility Version 10.50.1600.1 for 64-bit Copyright
(C) Microsoft Corporation 2010. All rights reserved. Started:
15:02:42 Error: 2013-08-14 15:02:42.84 Code: 0xC0011007
Source: {0AF31012-7A56-4B28-92EF-BE439E68E6F0} Description:
Unable to load the package as XML because of package does not have a
valid XML format. A specific XML parser error will be posted. End
Error Error: 2013-08-14 15:02:42.84 Code: 0xC0011002 Source:
{0AF31012-7A56-4B28-92EF-BE439E68E6F0} Description: Failed to
open package file "C:\Users\ygal1\Documents\Visual Studio
2008\Projects\Integration Services Project2\Integration Services
Project2\Package.dtsx" due to error 0x80070005 "Access is denied.".
This happens when loading a package and the file cannot be opened or
loaded correctly into the XML document. This can be the result of
either providing an incorrect file name was specified when calling
LoadPackage or the XML file was specified and has an incorrect format.
End Error Could not load package "C:\Users\ygal1\Documents\Visual
Studio 2008\Projects\Integration Services Project2\Integration
Services Project2\Package.dtsx" because of error 0xC0011002.
Description: Failed to open package file
"C:\Users\ygal1\Documents\Visual Studio 2008\Projects\Integration
Services Project2\Integration Services Project2\Package.dtsx" due to
error 0x80070005 "Access is denied.". This happens when loading a
package and the file cannot be opened or loaded correctly into the XML
document. This can be the result of either providing an incorrect file
name was specified when calling LoadPackage or the XML file was
specified and has an incorrect format. Source:
{0AF31012-7A56-4B28-92EF-BE439E68E6F0} Started: 15:02:42 Finished:
15:02:42 Elapsed: 0.046 seconds. The package could not be found.
The step failed.
Any ideas on how can I solve it?
i had a similar problem and what i did to get my package to run was:
a. Open Job properties in SQL Server
b. On the Steps page in the Package field: I used the entire folder name instead of the mapped name, for example: \share\allusers\myuserid\mypackage.dtsx instead of A:\mypackage.dtsx
Best.
It looks to me like the Service account for the SQL Agent doesn't have permissions to read package.dtsx.
Maybe check which account is running the SQL Agent & give it NTFS read permissions to C:\Users\ygal1\Documents\Visual Studio 2008\Projects\Integration Services Project2\Integration Services Project2
Or store the DTSX file in a location the SQL Agent account can access?