-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GetProfiles command not working while installing device onvif camera on aws ec2 instance #156
Comments
What is the output of the base call without the part that extracts the tokens? curl -s http://host-ip:59882/api/v2/device/name/Camera001/Profiles | jq . |
it's showing this |
for others it's working properly to get the device name , etc and it's not working for stream uri as well. |
@Shadab995 Are you saying that other device commands that communicate with the camera are working? Getting device name sounds like an EdgeX command and not an Onvif command. A 503 error code is typically something you get when the onvif device service is not able to communicate to the camera, or sends a command to the camera and does not get a response back. You say the services are running on an AWS EC2 instance. Where is the camera located? It needs to be accessible by the AWS EC2 instance for it to work properly. That means setting up port forwarding, using public ips, etc. |
Ok , I need to check that how to connect onvif camera on ec2 instance because the document uses localhost and not server. do you have any idea or any documentation that I can follow to solve this issue ? |
@Shadab995 , are you running EdgeX and camera device service on ec2 instance and trying to connect to camera on a network the ec2 can connect to? |
For now I followed the tutorial as mentioned in the latest video of EdgeXFoundry for connecting a device-onvif camera. I bought the same model as well C200 generate the docker file first and replace “127.0.0.1” with “0.0.0.0” and assigned the required port numbers to the security group. so , after running docker.. |
@Shadab995 It sounds like you are trying to access a camera connected to your local WiFi network via an instance of EdgeX installed in the cloud. This is not a currently supported deployment method. You can probably make it work, but it is not recommended for security reasons. What you should do (if possible) is install EdgeX on a machine (or VM) that is within your same local network. Here is the not recommended way of getting it to work through the cloud. This will open your camera up publically to the entire internet so be warned.
|
Thank you sir. Now , I am running Edgex on my local machine . I followed that but then it gave me this error and I'm facing difficulties troubleshooting this. can you please help me code: 500 , message: request failed, status code: 500, err: {"apiVersion":"v2","message":"error reading DeviceResourece Profiles for Camera001 -\u003e failed to execute read command -\u003e invalid request for the function 'GetProfiles' of web service 'Media'. Onvif error: fault reason: Authority failure, fault detail: , fault code: SOAP-ENV:Sender ter:NotAuthorized ","statusCode":500} |
Hello , Any inputs please. it's really important for me Thank you |
@Shadab995 That means that the username and password for the camera are incorrect. Follow the video at https://youtu.be/vZqd3j2Zn2Y?t=200 |
Thank you for the response but it's correct because i can connect my camera with those credentials to VLC media player using rtsp and it' working fine. But , I'll try creating new credentials and redo the process again. Sir is their anyy other suggestions apart from this that can help me ? |
@Shadab995 Go to consul and set Writable.LogLevel to DEBUG. Also snoop around the InsecureSecrets folders to make sure everything is correct in there. Send us some of the DEBUG logs after you try with the new password. |
Thank you for the support . I looked into log level and found out that the MAC address and Username and Password were not in strings and added ("") to them to make them strings and then used it..Finally got output for some information but for others and for getting the profile token it's still showing error. |
@Shadab995 Can you provide us with the DEBUG logs of the docker services? For example: docker logs $(docker ps -qf name=device-onvif-camera) > /tmp/onvif_logs.txt As far as the strings issue, that sounds suspicious, as I do not know why that would happen. In the consul UI, did you modify the values of InsecureSecrets? Because the consul UI has a tendency to try and format the value as json and will complain if it does not have quotes, however you do not want quotes in them. The reason why some commands may work and others not, is that some commands do not require authentication. I do not know if the ones you called don't or not. Definitely the DeviceInformation one does require it. Another thing you can try is to change your password on the camera. Maybe there is some special character it does not like. |
Hello @ajcasagrande Yes , I changed the password and removed the special char as well. Here is the log file for your reference. It didn't gave me a response for DeviceInformation for gave it for MetaData. Thankyou so much for the help. Highly appreciated I brought the camera just after watching the above video so that it can be easily implemented and also gave the deadline to the people. Hence I request your support and assistance in understanding the errors so as to complete this project. Thank you |
@Shadab995 Yes it appears as though the credentials for the camera have not been properly configured within the system.
Also, note that the quotes you added are messing up the values:
At the root directory of
bin/map-credentials.sh -u "username" -p "password" -P "credentials001" -A usernametoken -M "28:87:BA:B1:B9:F2" Another thing you can try is within the |
ok .. I'll do it . thanks a lot @ajcasagrande sir |
Thanks a lot @ajcasagrande sir , it helped me in setting the proper credentials and it worked fine but while using ffplay and using mplayer as well , i get the error like :
I am trying to solve this from past 2 days but it's not working fine. i installed all the dependencies and the required packages like Please help if possible . thank you |
@Shadab995 , do you still need help with this? |
Yes please , it would be really good if ffplay can work in my system . thank you |
@ajcasagrande , fyi. |
🐞 Bug Report
Description and Minimal Reproduction [REQUIRED]
I'm running this command curl -s http://host-ip:59882/api/v2/device/name/Camera001/Profiles | jq -r '"profileToken: " + '.event.readings[].objectValue.Profiles[].Token'' and it's giving me the output as null but I have 2 profiles on my UI Dashboard.
can you please help me to solve this issue.
thank you
🔥 Exception or Error
🌍 Your Environment
Deployment Environment:
EdgeX Version [REQUIRED]:
Anything else relevant?
The text was updated successfully, but these errors were encountered: