Oracle 10g UTL_HTTP begin_request return ORA-29273: HTTP request failed - plsql

I am using Oracle10g plsql to access a Jasperserver webservice in order to generate a PDF and store it in a blob. I follow this post
When I change the Jasperserver host I replace the url from
http://myOLDserver:8080/jasperserver/rest_v2/reports/apex/reportname.pdf?j_username=jus&j_password=jpw&ID=2758
to
http://myNEWserver:8080/jasperserver/rest_v2/reports/apex/reportname.pdf?j_username=jus&j_password=jpw&ID=2758
and the procedure raise an error like this
ORA-29273: HTTP request failed
ORA-06512: at "SYS.UTL_HTTP", line 1389
ORA-29261: bad argument
ORA-06512: at line 51
ORA-29273: HTTP request failed
ORA-06512: at "SYS.UTL_HTTP", line 1029
ORA-12541: TNS:no listener
on executing UTL_HTTP.begin_request
The machine of my oracle user ping myNEWserver correctly and the url in a browser is working correctly

I found the problem was an incorrect configuration of the DNS of my db server.
From different db server correctly configured the UTL_HTTP.begin_request with the same URL work without error with no db configuration like ACL or WALLET.
The db server that call the procedure is AIX Version 6.1 and I have to modify the /etc/resolv.conf and the hosts (because it is not possible to reboot the servere immediatly).
I hope this solution can help

Related

Airflow SambaHook authentication issue with SpnegoError and Kerberos?

I am trying to connect to a Samba server in Airflow using the SambaHook class. The Samba server requires Kerberos authentication.
I have already defined a Samba connection in Airflow using the following parameters:
Host,Schema and Extra {"auth": "kerberos"}
airflow connections add "samba_repo" --conn-type "samba" --conn-host "myhost.mywork.com" --conn-schema "fld" --conn-extra '{"auth": "kerberos"}'
I'm trying to use the SambaHook class in Airflow to connect to a Samba server. When I run my code, I get the following error:
Failed to authenticate with server: SpnegoError (1): SpnegoError (16): Operation not supported or available, Context: Retrieving NTLM store without NTLM_USER_FILE set to a filepath, Context: Unable to negotiate common mechanism
However, when I use smbclient to connect to the same server using Kerberos authentication from the Docker terminal, it works fine with the command: smbclient //'myhost'/'fld' -c 'ls "\workpath\*" ' -k
What I tried: I set up a connection to the Samba server in Airflow using the SambaHook class and tried to use the listdirmethod to retrieve a list of files in a specific directory.
What I expected to happen: I expected the listdir method to successfully retrieve a list of files in the specified directory from the Samba server.
What actually resulted: Instead, I encountered the following error message:
Failed to authenticate with server: SpnegoError (1): SpnegoError (16): Operation not supported or available, Context: Retrieving NTLM store without NTLM_USER_FILE set to a filepath, Context: Unable to negotiate common mechanism

Running WireMock server as a stand alone

I am trying to set up a mock server using wireMock as a standalone process. I downloaded the jar file and executed the following command:
java -jar wiremock-standalone-2.23.2.jar --port 0
I had to dynamically determine a port because I am already using the default 8080 port for another program running on my machine. It gave me the port number 55142, but when I tried accessing that on the web, it gave me the following error:
HTTP ERROR 403
Problem accessing /__files/. Reason:
Forbidden
Powered by Jetty://
It's probably due to the fact that you just entered http://localhost:55142
and as there are no mappings in ./mappings directory and files in ./files directory (the same where you have your wiremock.jar file is located)
2019-06-04 00:10:58.890 Request was not matched as there were no stubs registered:
{
"url" : "/"
...
}
please try call with __admin endpoint to see if WireMock is working
http://localhost:55142/__admin
please see also docs here for more nice admin commands.

Got Connect Failed error when request to tf serving server,and it's all good in windows

I make a server and request successfully in windows,then I put them to the linux which is the develop machine of company.
And I Got Connect Failed error when I run the clien.py. I have changed the host IP to localhost,0.0.0.0,127.0.0.1 and the IP of develop machine,but it doesn't work.
And I tried the docker inspect command,but the IPAddress is empty like "".
And I changed the port to 8500,8501,4321 and still got the error.
I tried make proxy to the company,the request returns a Name resolution failure error.So I think maybe the cause is the net of company?
Any answer would be very appreciate!
The Error Message:
grpc._channel._Rendezvous: <_Rendezvous of RPC that terminated with:
status = StatusCode.UNAVAILABLE
details = "Connect Failed"
debug_error_string = "{"created":"#1551677753.381330483","description":"Failed to create subchannel","file":"src/core/ext/filters/client_channel/client_channel.cc","file_line":2721,"referenced_errors":[{"created":"#1551677753.381328206","description":"Pick Cancelled","file":"src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc","file_line":241,"referenced_errors":[{"created":"#1551677753.381303114","description":"Connect Failed","file":"src/core/ext/filters/client_channel/subchannel.cc","file_line":689,"grpc_status":14,"referenced_errors":[{"created":"#1551677753.381278484","description":"Failed to connect to remote host: OS Error","errno":111,"file":"src/core/lib/iomgr/tcp_client_posix.cc","file_line":205,"os_error":"Connection refused","syscall":"connect","target_address":"ipv4:0.0.0.0:8501"}]}]}]}"

How to make HTTP stream from RTSP

I have LRP camera which produces RTSP stream in rtsp://172.16.4.6. I use VLC to see this streaming. Then I need to use ALPR Daemon for passing stream in http:// to recognize registration plates captured by camera. According to documentation in should be only http://. So using VLC I am trying to convert/transcode it to proper format. What is the problem, that I am not familiar with this field and have no time to study basic.
I installed apache2 on ubuntu that has port 80 and http://127.0.0.1 address. Then I tried to use some of approaches from documentation https://wiki.videolan.org/Documentation:Streaming_HowTo/Command_Line_Examples/ , then I tried $vlc -I http rtsp://172.16.4.6:554/HighResolutionVideo :sout='#transcode{vcodec=MJPG,vb=800,fps=5}:std{access=http{mime=multipart/x-mixed-repace},mux=mpjpeg,dst=127.0.0.1:80/go.mjpg,delay=0}'
But then I have this error log:
[00007f5fb0001268] core access out error: socket bind error: Permission denied
[00007f5fb0001268] core access out error: cannot create socket(s) for HTTP host
[00007f5fb0001268] access_output_http access out error: cannot start HTTP server
[00007f5fb0003388] stream_out_standard stream out error: no suitable sout access module for `http{mine=multipart/x-mixed-repace}/mpjpeg://172.0.0.1:80/go.mjpg'
[00007f5fb0000b18] core stream output error: stream chain failed for `transcode{vcodec=MJPG,vb=800,fps=5}:std{access=http{mine=multipart/x-mixed-repace},mux=mpjpeg,dst=172.0.0.1:80/go.mjpg,delay=0}'
[00007f5fb42929f8] core input error: cannot start stream output instance, aborting
[00007f5fb0003388] access_output_http access out: Consider passing --http-host=IP on the command line instead.
[00007f5fb0003388] core access out error: socket bind error: Permission denied
[00007f5fb0003388] core access out error: cannot create socket(s) for HTTP host
[00007f5fb0003388] access_output_http access out error: cannot start HTTP server
[00007f5fb0001268] stream_out_standard stream out error: no suitable sout access module for `http{mine=multipart/x-mixed-repace}/mpjpeg://172.0.0.1:80/go.mjpg'
[00007f5fb0000b18] core stream output error: stream chain failed for `transcode{vcodec=MJPG,vb=800,fps=5}:std{access=http{mine=multipart/x-mixed-repace},mux=mpjpeg,dst=172.0.0.1:80/go.mjpg,delay=0}'
[00007f5fb42929f8] core input error: cannot start stream output instance, aborting
I think you have a typo in repace, Try this:
--sout #transcode{vcodec=MJPG,venc=ffmpeg{strict=1}}:standard{access=http{mime=multipart/x-mixed-replace;boundary=--7b3cc56e5f51db803f790dad720ed50a},mux=mpjpeg,dst=:80/go.mjpg}

Jmap - Error connecting to remote debug server

My requirement is to create a dump file of heap memory of a remote server using Jmap.
I did this way.
jmap -dump:file=remoteDump.txt,format=b 3104
This worked fine as 3104 is the pid of a process from my local machine.
How do I do the same with remote server?
I tried
jmap -dump:file=remoteDump.txt,format=b 3104 54.197.228.33:8080
But it's failed.
I tried creating a debug server using jsadebugd, as below.
1.Started rmiregistry
rmiregistry -J-Xbootclasspath/p:$JAVA_HOME/lib/sa-jdi.jar
2.Ran jsadebugd
>jsadebugd 11594 54.197.228.33:9009
But the step 2 is throwing the following error:
Error attaching to process or starting server: sun.jvm.hotspot.debugger.D
Exception: Windbg Error: WaitForEvent failed!
at sun.jvm.hotspot.debugger.windbg.WindbgDebuggerLocal.attach0(Na
thod)
at sun.jvm.hotspot.debugger.windbg.WindbgDebuggerLocal.attach(Win
ggerLocal.java:152)
at sun.jvm.hotspot.HotSpotAgent.attachDebugger(HotSpotAgent.java:
at sun.jvm.hotspot.HotSpotAgent.setupDebuggerWin32(HotSpotAgent.j
)
at sun.jvm.hotspot.HotSpotAgent.setupDebugger(HotSpotAgent.java:3
at sun.jvm.hotspot.HotSpotAgent.go(HotSpotAgent.java:313)
at sun.jvm.hotspot.HotSpotAgent.startServer(HotSpotAgent.java:220
at sun.jvm.hotspot.DebugServer.run(DebugServer.java:106)
at sun.jvm.hotspot.DebugServer.main(DebugServer.java:45)
at sun.jvm.hotspot.jdi.SADebugServer.main(SADebugServer.java:55)
Help me get out of it.
The reason why you can not attach to process could be that it is already attached to some other debuger or executed on other visual machine than your jmap is running.
Try to assure that process is not attached to any debuger and you attach to the same VM.

Resources