-
Notifications
You must be signed in to change notification settings - Fork 3
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
Diameter stack doesn't seem to start #41
Comments
Hi @franzgranlund You can start by increasing the "org. diameter" log level to TRACE and check if the requests are not rejected. Starting the stack is done automatically by the quarkus-jdiameter extension. Your application will listen on port 3868 if the stack is successfully started. |
Thank you for your answer @eddiecarpenter . So basically it should start, if I have the correct config, by just having the CdfDiameterService.java? @DiameterService
@DiameterServiceOptions("test1")
public class CdfDiameterService implements ServerRfSessionListener {
@Override
public void doRfAccountingRequestEvent(ServerRfSession appSession, RfAccountingRequest request) throws InternalException, IllegalDiameterStateException, RouteException, OverloadException {
Log.info("CdfDiameterService ---- doRfAccountingRequestEvent");
}
@Override
public void doOtherEvent(AppSession session, AppRequestEvent request, AppAnswerEvent answer) throws InternalException, IllegalDiameterStateException, RouteException, OverloadException {
Log.info("CdfDiameterService ---- doOtherEvent");
}
} Also, should I use
or
? |
Hi @franzgranlund , The diameter service is registered by adding the @DiameterService annotation to the class. The @DiameterServiceOption annotation is used to pass options to the interceptor, the most relative option being the configuration profile it should use. Note, that if used a default config (without the "test1." component, then you do not need to provide the @DiameterServiceOption annotation. I see that the documentation was slightly outdated as I have changed the "config" attribute to "value". So, the correct format is I have updated the documentation. |
Hi @franzgranlund, |
Hi @eddiecarpenter! Yes, I finally managed to get the diameter stack started! Basically the only thing I needed to do was to inject the So if anyone comes across this thread, this works for me to get a Rf Server running (quarkus-jdiameter 2.0.5): CdfDiameterService.java @DiameterService
public class CdfDiameterService implements ServerRfSessionListener {
@Override
public void doRfAccountingRequestEvent(ServerRfSession appSession, RfAccountingRequest request) throws InternalException, IllegalDiameterStateException, RouteException, OverloadException {
Log.info("CdfDiameterService ---- doRfAccountingRequestEvent");
Log.info("e=doRfAccountingRequestEvent, session_id=" + appSession.getSessionId());
}
@Override
public void doOtherEvent(AppSession session, AppRequestEvent request, AppAnswerEvent answer) throws InternalException, IllegalDiameterStateException, RouteException, OverloadException {
Log.info("CdfDiameterService ---- doOtherEvent");
}
} CdfStack.java @ApplicationScoped
public class CdfStack {
@Inject
CdfDiameterService service;
@Startup
void startup() {
Log.info("Startup");
Log.info("CdfDiameterService is " + service.toString());
}
@Shutdown
void shutdown() {
Log.info("Shutdown");
}
} application.properties quarkus.diameter.local-peer.uri=aaa://127.0.0.1:3870
quarkus.diameter.local-peer.ip-addresses=127.0.0.1
quarkus.diameter.local-peer.realm=my.realm.com
quarkus.diameter.local-peer.product-name=RfServer
quarkus.diameter.local-peer.firmware-revision=1
quarkus.diameter.local-peer.applications.0.acct-appl-id=3
quarkus.diameter.network.peers.0.peer-uri=aaa://127.0.0.1:1812
quarkus.diameter.network.peers.0.ip=127.0.0.1
quarkus.diameter.network.peers.0.attempt-connect=false
quarkus.diameter.network.peers.0.rating=1
quarkus.diameter.network.realms."my.realm.com".peers=127.0.0.1
quarkus.diameter.network.realms."my.realm.com".local-action=local
quarkus.diameter.network.realms."my.realm.com".dynamic=false
quarkus.diameter.network.realms."my.realm.com".exp-time=1
quarkus.diameter.network.realms."my.realm.com".application-id.acct-appl-id=3 Thank you again @eddiecarpenter for your help! |
I reckon you have found a startup bug :-) |
Hi,
So I'm quite new to both Quarkus and jdiameter so I'm sorry if there is something I'm totally missing.
My goal is to create the most simple Diameter Rf Server. I followed the Implementing Diameter Service and got both Quarkus and the dependencies working and compiling.
I created a class CdfDiameterService.java like this:
I added to application.properties:
Everything compiles but the diameter stack doesn't seem to start. Should it just work with only this?
I then tried creating a class CdfStack.java:
If I uncomment stack.start() and stack.stop() / stack.destroy() then the diameter stack seem to start according to logs. I can even connect to it with a diameter client. But then the CdfDiameterServices doesn't seem to listen/trigger.
What am I doing wrong? I appreciate all the help I can get.
The text was updated successfully, but these errors were encountered: