Error parsing afsocket, inner-dest plugin disk-buffer not found...? - syslog

I'm modifying syslog-ng.conf with the following changes.
destination d_tls{
syslog("IP"
port(514)
transport("tls")
tls(
ca-dir(CertPath)
cert_file(NodeCredentialCert)
key_file(NodeCredentialKey)
peer_verify(requared-trusted)
)
disk-buffer(
mem-buf-size(524288)
disk-buf-size(1048576)
reliable(yes)
dir(SYSLOG_BUFFER_DIR)
)
);
};
Now I'm getting following error.
Error parsing afsocket, inner-dest plugin disk-buffer not found in /etc/syslog-ng.conf at line 350, column 3:
disk-buffer(
^^^^^^^^^^^
Can anyone tell me the issue here? What should I change?
I'm using following syslog-ng version.
syslog-ng 3.3.6
Installer-Version: 3.3.6
Revision: ssh+git://algernon#git.balabit//var/scm/git/syslog-ng/syslog-ng-ose--mainline-
-3.3#master#d32b5c63e09a4c3897cbc2239c07967cea393de9
Compile-Date: Apr 9 2020 09:58:41
Default-Modules: affile,afprog,afsocket,afuser,basicfuncs,csvparser,dbparser,syslogformat
Error opening plugin module; module='afsocket-notls', error='/usr/lib64/syslog-
ng/libafsocket-
notls.so: undefined symbol: tls_context_setup_session'
Available-Modules:
affile,afprog,convertfuncs,tfjson,dummy,syslogformat,csvparser,dbparser,afsocket-
tls,afuser,confgen,afmongodb,afsocket,basicfuncs
Enable-Debug: off
Enable-GProf: off
Enable-Memtrace: off
Enable-IPv6: on
Enable-Spoof-Source: off
Enable-TCP-Wrapper: on
Enable-Linux-Caps: off
Enable-Pcre: off

The disk-buffer() module is not available in such an old syslog-ng version.
Please upgrade to at least v3.8.1. The current version (v3.28.1) contains quite a few bug fixes.

Related

Application crashes when using vtkSmartVolumeMapper::New()

Crash happens in runtime on vtkSmartVolumeMapper::New() step.
And it goes deep to vtkFixedPointVolumeRayCastMapper constructor. Don't understand how to tackle such an issue, please help
Exception thrown at 0x00007FF73A60735A in smop-ptqt.exe: 0xC0000005: Access violation reading location 0x0000000000000000.
Qt 5.15.6, VTK 9.1.0, ITK 5.2.1
Finally fixed crash on vtkSmartVolumeMapper::New() by using VTK9's new module approach in cmakelists.
So previously, while project used some vtk7.1 version.
CmakeLists treated VTK like this
find_package(VTK CONFIG REQUIRED PATHS "<some_path>/3rd_party/VTK/build/install_dir/lib/cmake/vtk-9.1" )
then used and so on.
target_link_libraries( ...${VTK_LIBRARIES} )
Now I applied module way
find_package(VTK CONFIG REQUIRED
COMPONENTS
GUISupportQt
CommonCore
ViewsCore
ViewsInfovis
DICOM
RenderingCore
RenderingLabel
CommonExecutionModel
RenderingOpenGL2
InteractionWidgets
IOPLY
IOGeometry
RenderingQt
RenderingVolumeOpenGL2
IOImport )
...
target_link_libraries(${PROJECT_NAME} ...
VTK::GUISupportQt
VTK::CommonCore
VTK::ViewsCore
VTK::ViewsInfovis
VTK::DICOM
VTK::RenderingCore
VTK::RenderingLabel
VTK::CommonExecutionModel
VTK::RenderingOpenGL2
VTK::InteractionWidgets
VTK::IOCore
VTK::IOPLY
VTK::IOGeometry
VTK::RenderingQt
VTK::RenderingVolumeOpenGL2
VTK::IOImport
)
...
vtk_module_autoinit(
TARGETS ${PROJECT_NAME}
MODULES VTK::GUISupportQt
VTK::CommonCore
VTK::ViewsCore
VTK::ViewsInfovis
VTK::DICOM
VTK::RenderingCore
VTK::RenderingLabel
VTK::CommonExecutionModel
VTK::RenderingOpenGL2
VTK::InteractionWidgets
VTK::IOCore
VTK::IOPLY
VTK::IOGeometry
VTK::RenderingQt
VTK::RenderingVolumeOpenGL2
VTK::IOImport
)
( was inspired by this script, thank you Qt-VTK-viewer developer(s) who worked on that script https://github.com/martijnkoopman/Qt-VTK-viewer/blob/master/CMakeLists.txt )

Using Http source throws org/wso2/transport/http/netty/contract/config/ListenerConfiguration error

Using http source, I'm trying to insert 3 parameters into a stream, which I will use as an input to other streams.
#App:name("SiddhiSample")
#App:description("Sample http")
#source(type='http', receiver.url='http://0.0.0.0:8008/event', #map(type = 'json', #attributes(a='$.a', b='$.c', c='$.c')))
define stream InputStream(a string, b string, c string);
I'm getting this error at the line '#source' -
Caused by: org.wso2.siddhi.core.exception.SiddhiAppCreationException: Error on 'SiddhiSample' # Line: 5. Position: 143, near '#source(type='http', receiver.url='http://0.0.0.0:8008/event', #map(type = 'json', #attributes(a='$.a', b='$.b', c='$.c')))'. org/wso2/transport/http/netty/contract/config/ListenerConfiguration
at org.wso2.siddhi.core.util.ExceptionUtil.populateQueryContext(ExceptionUtil.java:43)
at org.wso2.siddhi.core.util.parser.helper.DefinitionParserHelper.addEventSource(DefinitionParserHelper.java:370)
at org.wso2.siddhi.core.util.SiddhiAppRuntimeBuilder.defineStream(SiddhiAppRuntimeBuilder.java:114)
at org.wso2.siddhi.core.util.parser.SiddhiAppParser.defineStreamDefinitions(SiddhiAppParser.java:307)
at org.wso2.siddhi.core.util.parser.SiddhiAppParser.parse(SiddhiAppParser.java:223)
at org.wso2.siddhi.core.SiddhiManager.createSiddhiAppRuntime(SiddhiManager.java:65)
at org.wso2.siddhi.core.SiddhiManager.createSiddhiAppRuntime(SiddhiManager.java:74)
at org.wso2.carbon.stream.processor.core.internal.StreamProcessorService.deploySiddhiApp(StreamProcessorService.java:100)
at org.wso2.carbon.stream.processor.core.internal.StreamProcessorDeployer.deploySiddhiQLFile(StreamProcessorDeployer.java:93)
... 14 more
Caused by: java.lang.NoClassDefFoundError: org/wso2/transport/http/netty/contract/config/ListenerConfiguration
at org.wso2.extension.siddhi.io.http.source.util.HttpSourceUtil.getListenerConfiguration(HttpSourceUtil.java:177)
at org.wso2.extension.siddhi.io.http.source.HttpSource.initSource(HttpSource.java:478)
at org.wso2.extension.siddhi.io.http.source.HttpSource.init(HttpSource.java:415)
at org.wso2.siddhi.core.stream.input.source.Source.init(Source.java:69)
at org.wso2.siddhi.core.util.parser.helper.DefinitionParserHelper.addEventSource(DefinitionParserHelper.java:365)
... 21 more
This was working previously - I was able to pass data to the stream via curl commands. Can someone help me understand what's wrong?
I'm using WSO2SP 4.3.0 and siddhi-io-http-1.1.2.jar
WSO2SP 4.3.0 is not supporting siddhi-io-http-1.1.2.jar, please use WSO2SP 4.4.0 instead, and WSO2SP 4.4.0 will also work with the current latest version of siddhi-io-http-1.2.1 .jar
https://mvnrepository.com/artifact/org.wso2.extension.siddhi.io.http/siddhi-io-http/1.2.1

file_get_html() not working for the only webpage

I want to call a simple DOM file
I tested with another links and it works, but with this url it's not working.
My code is:
$bnadatos = file_get_html("http://www.rofex.com.ar/cem/FyO.aspx");
foreach($bnadatos->find('[#id="ctl00_ContentPlaceHolder1_gvFyO"]') as $i){
echo "datos:";
echo $i->innertext;
}
Response is a blank page.
What's wrong?
i solved with
$arrContextOptions=array(
"ssl"=>array(
"verify_peer"=>false,
"verify_peer_name"=>false,
),
);
$response = file_get_html("https://www.rofex.com.ar/cem/FyO.aspx", false, stream_context_create($arrContextOptions));
foreach($response->find('[#id="ctl00_gvwDDF"]/tbody/tr[2]/td[2]') as $i){
echo $i->innertext;
}
thank you #maio290 for light my road
This is just a guess, but do you have your error reporting on?
Out of the box, this is not working with the simple-html-dom library:
Warning: file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed in /var/www/html/dom.php on line 83
Warning: file_get_contents(): Failed to enable crypto in /var/www/html/dom.php on line 83
Warning: file_get_contents(http://www.rofex.com.ar/cem/FyO.aspx): failed to open stream: operation failed in /var/www/html/dom.php on line 83
Fatal error: Call to a member function find() on boolean in /var/www/html/test.php on line 11
A fix for this can be found here - with that in place, I still get a blank page, which is due to a wrong answer (301 Moved Permanently) - for this to fix, you need to modify
'follow_location' => false
to
'follow_location' => true
so, now we get the proper site content - you can modify the selector to $html->find('#ctl00_ContentPlaceHolder1_gvFyO'); this will find all element which id=ctl00_ContentPlaceHolder1_gvFyO - see the documentation as reference.

QBS: Explicitly setting qbs.profiles inside Products causing build to fail

My use-case is this:
I have a static library which I want to be available for some profiles (e.g. "gcc", "arm-gcc", "mips-gcc").
I also have an application which links to this library, but this applications should only build using a specific profile (e.g. "arm-gcc").
For this I am modifying the app-and-lib QBS example.
The lib.qbs file:
import qbs 1.0
Product {
qbs.profiles: ["gcc", "arm-gcc", "mips-gcc"] //I added only this line
type: "staticlibrary"
name: "mylib"
files: [
"lib.cpp",
"lib.h",
]
Depends { name: 'cpp' }
cpp.defines: ['CRUCIAL_DEFINE']
Export {
Depends { name: "cpp" }
cpp.includePaths: [product.sourceDirectory]
}
}
The app.qbs file:
import qbs 1.0
Product {
qbs.profiles: ["arm-gcc"] //I added only this line
type: "application"
consoleApplication: true
files : [ "main.cpp" ]
Depends { name: "cpp" }
Depends { name: "mylib" }
}
The app build fails. Qbs wrongly tries to link to the "gcc" version of the library instead of the "arm-gcc" version, as you can see in the log:
Build graph does not yet exist for configuration 'default'. Starting from scratch.
Resolving project for configuration default
Setting up build graph for configuration default
Building for configuration default
compiling lib.cpp [mylib {"profile":"gcc"}]
compiling lib.cpp [mylib {"profile":"arm-gcc"}]
compiling lib.cpp [mylib {"profile":"mips-gcc"}]
compiling main.cpp [app]
creating libmylib.a [mylib {"profile":"gcc"}]
creating libmylib.a [mylib {"profile":"mips-gcc"}]
creating libmylib.a [mylib {"profile":"arm-gcc"}]
linking app [app]
ERROR: /usr/bin/arm-linux-gnueabihf-g++ -o /home/user/programs/qbs/usr/local/share/qbs/examples/app-and-lib/default/app.7d104347/app /home/user/programs/qbs/usr/local/share/qbs/examples/app-and-lib/default/app.7d104347/3a52ce780950d4d9/main.cpp.o /home/user/programs/qbs/usr/local/share/qbs/examples/app-and-lib/default/mylib.eyJwcm9maWxlIjoiZ2NjIn0-.792f47ec/libmylib.a
ERROR: /home/user/programs/qbs/usr/local/share/qbs/examples/app-and-lib/default/mylib.eyJwcm9maWxlIjoiZ2NjIn0-.792f47ec/libmylib.a: error adding symbols: File format not recognized
collect2: error: ld returned 1 exit status
ERROR: Process failed with exit code 1.
The following products could not be built for configuration default:
app
The build fails only when selecting one profile in the app.qbs file, and this profile should not be the first profile in the qbs.profiles line in the lib.qbs file.
When selecting two or more profiles - the build succeeds.
My analysis:
I think this problem is related to multiplexing:
The lib.qbs contains more than one profile. This turns on multiplexing when building the library, which, in turn, adds additional 'multiplexConfigurationId' to the build-directory name (moduleloader.cpp).
The app.lib contains only one profile, so multiplexing is not turned on and the build-directory name does not get the extra string.
The problem can be solved by changing the code (moduleloader.cpp) so that multiplexing is turned even if there is only one profile i.e. with the following patch:
--- moduleloader.cpp 2018-10-24 16:17:43.633527397 +0300
+++ moduleloader.cpp.new 2018-10-24 16:18:27.541370544 +0300
## -872,7 +872,7 ##
= callWithTemporaryBaseModule<const MultiplexInfo>(dummyContext,
extractMultiplexInfoFromProduct);
- if (multiplexInfo.table.size() > 1)
+ if (multiplexInfo.table.size() > 0)
productItem->setProperty(StringConstants::multiplexedProperty(), VariantValue::trueValue());
VariantValuePtr productNameValue = VariantValue::create(productName);
## -891,7 +891,7 ##
const QString multiplexConfigurationId = multiplexInfo.toIdString(row);
const VariantValuePtr multiplexConfigurationIdValue
= VariantValue::create(multiplexConfigurationId);
- if (multiplexInfo.table.size() > 1 || aggregator) {
+ if (multiplexInfo.table.size() > 0 || aggregator) {
multiplexConfigurationIdValues.push_back(multiplexConfigurationIdValue);
item->setProperty(StringConstants::multiplexConfigurationIdProperty(),
multiplexConfigurationIdValue);
This worked for my use case. I don't know if it make sense in a broader view.
Finally, the questions:
Does it all make sense?
Is this a normal behavior?
Is this use-case simply not supported?
Is there a better solution?
Thanks in advance.
Yes, the default behavior with multiplexing is that the a non-multiplexed product depends on all variants of the dependency. In general, there is no way for a user to change that behavior, but there should be.
However, luckily for you, profiles are special:
Depends { name: "mylib"; profiles: "arm-gcc" }
This should fix your problem.

OpenFOAM: FOAM FATAL ERROR: Unknown TurbulenceModel type RASModel

I'm trying to follow this OpenFOAM tutorial for using Gmsh to generate Axisymmetric mesh. The files are provided here. However when I try to solve the problem using the pimpleFoam solver I get the error:
--> FOAM FATAL ERROR:
Unknown TurbulenceModel type RASModel
Valid TurbulenceModel types:
3
(
LES
RAS
laminar
)
From function static Foam::autoPtr > Foam::TurbulenceModel::New(const alphaField&, const rhoField&, const volVecto rField&, const surfaceScalarField&, const surfaceScalarField&, const transportMo del&, const Foam::word&) [with Alpha = Foam::geometricOneField; Rho = Foam::geom etricOneField; BasicTurbulenceModel = Foam::incompressibleTurbulenceModel; Trans portModel = Foam::transportModel; Foam::TurbulenceModel::alphaField = Foam::geometricOneField; Foam::Turbulenc eModel::rhoField = Foam::geome tricOneField; Foam::volVectorField = Foam::GeometricField; Foam::surfaceScalarField = Foam::GeometricFi eld; Foam::TurbulenceModel::transportModel = Foam::transportMo del]
in file /opt/CFDSupportFOAM4.0/beta/OpenFOAM-dev/src/TurbulenceModels/turbul enceModels/lnInclude/TurbulenceModel.C at line 113.
As explained in this page apparently the syntax of turbulenceProperties in case/constant has changed. So I edited the turbulenceProperties file from:
simulationType RASModel;
to
simulationType RAS;
RAS
{
RASModel kEpsilon;
turbulence on;
printCoeffs on;
}
but then I get a different error:
FOAM FATAL IO ERROR:
attempt to read beyond EOF
file: .../Axisymmetric2D/case/system/fvSchemes.divSchemes.default at line 29.
From function virtual Foam::Istream& Foam::ITstream::read(Foam::token&)
in file db/IOstreams/Tstreams/ITstream.C at line 82.
FOAM exiting
It seems like the tutorial is meant for an older version of OpenFOAM. I would appreciate if you could help me know what is the problem and how I can solve it.
The goal for me is to learn how to make axisymmetric mesh using Gmsh. so out of the box solutions or tutorials for the newer versions of OpenFOAM als would do.
P.S. I have reported the issue here in the Github repo
I was able to solve the issue by looking into the different versions of axisymmetricJet template provided in official OpenFOAM GitHub repo (version 2.3.x and version 5.x). Changes to be made:
in case/constant/RASProperties add these at the end:
kEpsilonCoeffs
{
Cmu 0.09;
C1 1.44;
C2 1.92;
sigmaEps 1.3;
}
in case/constant/turbulenceProperties replace the line simulationType RASModel; with:
simulationType RAS;
RAS
{
RASModel kEpsilon;
turbulence on;
printCoeffs on;
}
in case/system/fvSchemes change the line div((nuEff*dev(T(grad(U))))) Gauss linear; to div((nuEff*dev2(T(grad(U))))) Gauss linear;
It the solver converges as expected. I still don't know what these changes mean and how they work. I will add them as soon as I figure that out. I have forked the GitHub repo here including the required edits.

Resources