-
Notifications
You must be signed in to change notification settings - Fork 104
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
mongoDB Unsupported OP_QUERY command #2353
Comments
It seems you are using a very old version of cygnus (1.9.0) |
Ok thanks for letting me know @AlvaroVega This link is for the latest version of Cygnus: https://fiware-cygnus.readthedocs.io/en/latest/cygnus-ngsi/installation_and_administration_guide/install_with_rpm.html - perhaps someone needs to update this page. According to this link it says to configure the repo using: Now my question is what is the latest version to install via RPM from the above repo - or is there another way to install it via RPM? |
Unfortunately I do not know who is in charge of https://nexus.lab.fiware.org/ (which has too old versions of cygnus). Maybe @jason-fox or @mapedraza know someone to ask. |
We are no longer maintaining RPM-based deployments. Although some legacy artifacts still remain in the repository (such as the .spec files that we still use for keeping track of per-componente changelog) all our deployments are based now in Dockers. |
@AlvaroVega and @fgalan for your feedback and pointing me to the right directions. This is kinda annoying as I spent quite a lot of time setting up cygnus on CentOS with RPM. |
On another note - is this guide on building from sources correct and upto date? |
That link is not updated, dependencies versions are old and some JDK option is also old, but the way of build (using maven) is right. |
I hope that after the changes done in the PR #2354 nobody else fall into the same misunderstanding. Feel free to provide feedback in the PR if you want. |
After merging PR #2354 I think this issue can be closed. @jrobinedwards what do you think? |
Thanks @fgalan for removing the documentation for installing with RPM. |
Thank you for your reply @AlvaroVega @fgalan will someone please be able to update this too with the right dependencies and options. |
@jrobinedwards could you tell us the particular text/link you refer in that document, please? |
@fgalan I'm not sure what's outdated in this document :https://fiware-cygnus.readthedocs.io/en/latest/cygnus-ngsi/installation_and_administration_guide/install_from_sources.html |
So I followed the instructions here: https://fiware-cygnus.readthedocs.io/en/latest/cygnus-ngsi/installation_and_administration_guide/install_from_sources.html I got Flume, JDK and Maven, versions and repo listed below: java -version Maven: mvn -version Cygnus Then ran compile.sh But got the following errors (oh, I also had to remove the -XX:MaxPermSize=128m from compile.sh) : [INFO] Scanning for projects... Any ideas? |
As I said you in #2353 (comment) I encorage you to use JDK 17. Using compile.sh scripts, you should execute compile.sh at the root level which executes first in cygnus-common and then in cygnus-ngsi. |
@jrobinedwards if at the end you go through the installation process following the steps in the Dockerfile as @AlvaroVega suggets, it would be great if you could do a pull request with suggested changes to improve the install_from_sources.md documentation based on your experience, please. Thanks in advance! :) |
@AlvaroVega @fgalan Thank you for your input. Last week, I did manage to get cygnus build from sources by following the dockerfile. I also manage to use flume.env to secure http-source via ssl. I will do a pull request and update it with my findings. |
Hello @fgalan & @AlvaroVega |
You can do the PR if you:
However, if you have having problems with this we can do the PR on behalf of you if you provide as the .md file, as you suggest. Thanks for your contribution! |
I have installed cygnus on Centos 9.
It has MongoDB 7.0.5 running on localhost
Cygnus-ngsi was installed using the documentation at this url:
https://fiware-cygnus.readthedocs.io/en/latest/cygnus-ngsi/installation_and_administration_guide/install_with_rpm.html
Cygnus version from the endpoint /v1/version is "1.9.0.b5547662c0223268bacb8f220911aa7e9bd24131"
I am trying to persist data in mongodb but the cygnus logs show this error:
time=2024-03-04T13:15:41.009Z | lvl=INFO | corr=N/A | trans=N/A | srv=N/A | subsrv=N/A | comp=cygnus-ngsi | op=persistAggregation | msg=com.telefonica.iot.cygnus.sinks.NGSIMongoSink[413] : [mongo-sink] Persisting data at NGSIMongoSink. Database: sth_default, Collection: sth_/_0004A30B00220604_AirQualitySensor, Data: [Document{{recvTime=Mon Mar 04 13:12:31 UTC 2024, attrName=LAT, attrType=Float, attrValue=64.745788574}}, Document{{recvTime=Mon Mar 04 13:12:31 UTC 2024, attrName=LON, attrType=Float, attrValue=20.959072113}}, Document{{recvTime=Mon Mar 04 13:12:31 UTC 2024, attrName=N02, attrType=Float, attrValue=-0.001132657}}, Document{{recvTime=Mon Mar 04 13:12:31 UTC 2024, attrName=PM1, attrType=Float, attrValue=0}}, Document{{recvTime=Mon Mar 04 13:12:31 UTC 2024, attrName=PM10, attrType=Float, attrValue=0}}, Document{{recvTime=Mon Mar 04 13:12:31 UTC 2024, attrName=PM25, attrType=Float, attrValue=0}}]
time=2024-03-04T13:15:41.016Z | lvl=ERROR | corr=N/A | trans=N/A | srv=N/A | subsrv=N/A | comp=cygnus-ngsi | op=processRollbackedBatches | msg=com.telefonica.iot.cygnus.sinks.NGSISink[398] : CygnusPersistenceError. -, Command failed with error 352: 'Unsupported OP_QUERY command: create. The client driver may require an upgrade. For more details see https://dochub.mongodb.org/core/legacy-opcode-removal' on server 127.0.0.1:27017. The full response is { "ok" : 0.0, "errmsg" : "Unsupported OP_QUERY command: create. The client driver may require an upgrade. For more details see https://dochub.mongodb.org/core/legacy-opcode-removal", "code" : 352, "codeName" : "UnsupportedOpQueryCommand" }. Stack trace: [com.telefonica.iot.cygnus.sinks.NGSIMongoSink.persistAggregation(NGSIMongoSink.java:421), com.telefonica.iot.cygnus.sinks.NGSIMongoSink.persistBatch(NGSIMongoSink.java:129), com.telefonica.iot.cygnus.sinks.NGSISink.processRollbackedBatches(NGSISink.java:390), com.telefonica.iot.cygnus.sinks.NGSISink.process(NGSISink.java:372), org.apache.flume.sink.DefaultSinkProcessor.process(DefaultSinkProcessor.java:68), org.apache.flume.SinkRunner$PollingRunner.run(SinkRunner.java:147), java.lang.Thread.run(Thread.java:750)]
time=2024-03-04T13:15:41.017Z | lvl=INFO | corr=N/A | trans=N/A | srv=N/A | subsrv=N/A | comp=cygnus-ngsi | op=doRollbackAgain | msg=com.telefonica.iot.cygnus.sinks.NGSISink[464] : Rollbacking again (db955f28-da28-11ee-9c17-00163eee2746; cbnotif=2), this was retry #5
Does this mean that mongodb 7 is not supported or do the java drivers need to be updated? How can I get this data to persist in mongo?
Thank you!
The text was updated successfully, but these errors were encountered: