RestComm / gmlc

Restcomm Location Server
http://www.restcomm.com/
GNU Affero General Public License v3.0
17 stars 37 forks source link

404 returns on Mobicent on Localhost #53

Closed johnnyAnd closed 8 years ago

johnnyAnd commented 8 years ago

I m trying to check GMLC on localhost by passing it a random MSISDN.

I installed GLMC on my server and localhost.

When I trylocalhost:8080/mobicents on localhost it returns 404. it works fine on VPS what could be the issue on localhost, the mobicent service is running as well.

capture

2 ) How can I test location testing on localhost ? Do I need to connect it with some other server ?

FerUy commented 8 years ago

Hi @JohnTet. That's wrong, you're not adding the msisdn value in the URL. Please go through the README thoroughly and also have in mind that soon that will change as for #50.

Also, for testing you need to run both the server and the jSS7 simulator configured for ATI tests.

johnnyAnd commented 8 years ago

@FerUy when I add MSISDN i still get the same result, on server when I do this I get " Invalid MSISDN specified" which makes sense.

For testing server and jss7 simulator with ATI, is there any tutorial for that ?

FerUy commented 8 years ago

@JohnTet unfortunately we don't have yet a tutorial for testing with ATI, but we will very soon (and not only ATI, but other MAP procedures for 3G location like SRIforLCS, PSL and SLR).

Also, I'm about to board a long trip back home, will be back on Wednesday. Then I will get back to you in this regard. In the meantime, @angrygreenfrogs and/or @Monix might help you.

Having said all of these, please keep in mind that we are at this time refactoring all this GMLC release and will be immensely improved in the next few weeks, with location capabilities from GSM to LTE (SS7/MAP and Diameter-based Evolved Packet Core Location Protocol).

johnnyAnd commented 8 years ago

have a safe trip @FerUy , I will wait for responses from other :)

Vanit commented 8 years ago

Hey @JohnTet, we recently updated the http-servlet dependency, which resulted in the url changing to /restcomm instead of /mobicents.

johnnyAnd commented 8 years ago

@Monix Yes it works with restcomm, but that should be replicated here https://github.com/RestComm/gmlc/blob/master/README.md as well.

Also what about any tutorial to test GMLC (with location) on localhost ? so when I pass it some dummy location it gives me a response, right now it just gives me empty response which is understandable.

Is the tutorial possible ?

Vanit commented 8 years ago

@JohnTet Thanks for the report on the readme. Please add a new issue for that.

I'm not sure about the dummy feature, but please do open an issue for that as well and we'll see.

johnnyAnd commented 8 years ago

@Monix alright I am adding that,

johnnyAnd commented 8 years ago

@Monix It is still same on the server. When I try to hit localhost:8080/restcomm, it throws an error ,

localhost:8080/restcomm?msisdn=10 behaves the same way.

capture

Vanit commented 8 years ago

Hey @JohnTet, can you please upload a copy of your /jboss-5.1.0.GA/server/default/log/server.log

johnnyAnd commented 8 years ago

@Monix PFA

2016-07-19 21:30:33,974 INFO  [javax.slee.SbbNotification[service=ServiceID[name=mobicents-gmlc,vendor=org.mobicents,version=1.0],sbb=SbbID[name=MobileCoreNetworkInterfaceSbb,vendor=org.mobicents,version=1.0]].MobileCoreNetworkInterfaceSbb] (SLEE-EventRouterExecutor-4-thread-1) MSISDN is null, sending back -1 for cellid
2016-07-19 21:30:33,998 INFO  [javax.slee.SbbNotification[service=ServiceID[name=mobicents-gmlc,vendor=org.mobicents,version=1.0],sbb=SbbID[name=MobileCoreNetworkInterfaceSbb,vendor=org.mobicents,version=1.0]].MobileCoreNetworkInterfaceSbb] (SLEE-EventRouterExecutor-4-thread-1) HTTP Request received and response sent.
2016-07-19 21:30:43,809 WARN  [org.mobicents.protocols.ss7.sccp.impl.SccpRoutingControl] (SLEE-EventRouterExecutor-0-thread-1) Received SccpMessage for Translation but no matching Rule found for local routing
SccpMessage=Sccp Msg [Type=-1 networkId=0 sls=1 incomingOpc=-1 incomingDpc=-1 outgoingDpc=-1 CallingAddress(pc=0,ssn=145,AI=18,gt=GlobalTitle0100Impl [digits=000000, natureOfAddress=INTERNATIONAL, numberingPlan=ISDN_TELEPHONY, translationType=0, encodingScheme=BCDEvenEncodingScheme[type=BCD_ODD, code=2]]) CalledParty(pc=0,ssn=6,AI=18,gt=GlobalTitle0100Impl [digits=123, natureOfAddress=INTERNATIONAL, numberingPlan=ISDN_TELEPHONY, translationType=0, encodingScheme=BCDOddEncodingScheme[type=BCD_ODD, code=1]]) DataLen=71]
2016-07-19 21:31:43,807 ERROR [javax.slee.SbbNotification[service=ServiceID[name=mobicents-gmlc,vendor=org.mobicents,version=1.0],sbb=SbbID[name=MobileCoreNetworkInterfaceSbb,vendor=org.mobicents,version=1.0]].MobileCoreNetworkInterfaceSbb] (SLEE-EventRouterExecutor-3-thread-1) 
Rx :  onDialogTimeout DialogTimeout [org.mobicents.slee.resource.map.service.mobility.wrappers.MAPDialogMobilityWrapper@7fb467b7]
2016-07-19 21:31:43,808 WARN  [javax.slee.SbbNotification[service=ServiceID[name=mobicents-gmlc,vendor=org.mobicents,version=1.0],sbb=SbbID[name=MobileCoreNetworkInterfaceSbb,vendor=org.mobicents,version=1.0]].MobileCoreNetworkInterfaceSbb] (SLEE-EventRouterExecutor-3-thread-1) When responding to HTTP no pending HTTP request is found, responseData=DialogTimeout
2016-07-19 22:05:36,816 INFO  [javax.slee.SbbNotification[service=ServiceID[name=mobicents-gmlc,vendor=org.mobicents,version=1.0],sbb=SbbID[name=MobileCoreNetworkInterfaceSbb,vendor=org.mobicents,version=1.0]].MobileCoreNetworkInterfaceSbb] (SLEE-EventRouterExecutor-4-thread-1) MSISDN is null, sending back -1 for cellid
2016-07-19 22:05:36,828 INFO  [javax.slee.SbbNotification[service=ServiceID[name=mobicents-gmlc,vendor=org.mobicents,version=1.0],sbb=SbbID[name=MobileCoreNetworkInterfaceSbb,vendor=org.mobicents,version=1.0]].MobileCoreNetworkInterfaceSbb] (SLEE-EventRouterExecutor-4-thread-1) HTTP Request received and response sent.
FerUy commented 8 years ago

Hi @JohnTet can you please try with URL localhost:8080/restcomm?msisdn=7462379 ? (any number will do)

FerUy commented 8 years ago

Anyway, that won't fix it either @JohnTet and actually we are working on it. Will revert asap when solved.

johnnyAnd commented 8 years ago

ok I am here for any help or assistance. @FerUy

FerUy commented 8 years ago

@JohnTet, just solved the problem... will provide instructions in the next minutes. Stay tuned.

FerUy commented 8 years ago

@JohnTet, please use the following instructions and tell me if it's solved for you too (always using latest release):

0.1) In $JBOSS_HOME/server/simulator/data/SccpStack_sccprouter2.xml set the configuration to the following: `<?xml version="1.0" encoding="UTF-8" ?>

` 0.2) In $JBOSS_HOME/server/simulator/data/SccpStack_sccpresource2.xml set the configuration to the following: ` ` 1) Run the GMLC in simulator mode (next, I'm also binding it to the machine's IP 192.168.26.128). Go to $JBOSS_HOME/bin, then execute: ./run.sh -b 192.168.26.128 -c simulator (if you don't use the -b option, it will run in 127.0.0.1). Wait until you see the server has completely started by seeing in the console log something like this: 13:47:56,877 INFO [ServerImpl](main) JBoss (Microcontainer) [5.1.0.GA (build: SVNTag=JBoss_5_1_0_GA date=200905221634)] Started in 1m:31s:455ms 2) From $JBOSS_HOME go to the jSS7 simulator path, i.e. cd ../tools/restcomm-jss7-simulator/bin. 3) Execute ./run.sh gui (you need to give x rights to the file, chmod +x run.sh). 4) On the GUI that pops up (see image below), just click "Start": ![1_connectingtotesterhost](https://cloud.githubusercontent.com/assets/14883482/17149718/e241ec30-5342-11e6-87c9-c0ba0c9b678d.png) 5) SS7 simulator configuration will pop up. Make sure M3UA settings appear like the images below: ![2_ss7sim_m3ua](https://cloud.githubusercontent.com/assets/14883482/17149788/318ababa-5343-11e6-8f5b-b92b5de2d0f3.png) ![3_ss7sim_m3ua_settings](https://cloud.githubusercontent.com/assets/14883482/17149801/40c112ae-5343-11e6-973a-56711741beab.png) This is consistent with what's by default configured in $JBOSS_HOME/server/simulator/data/Mtp3UserPart_m3ua1.xml 6) Set SCCP settings like it's shown below: ![4_ss7sim_sccp](https://cloud.githubusercontent.com/assets/14883482/17149944/e7b6e386-5343-11e6-9313-cba43c9f9008.png) ![5_ss7sim_sccp_settings](https://cloud.githubusercontent.com/assets/14883482/17149951/ee5e2e88-5343-11e6-8f71-d90c77d24b08.png) The latter shall be consistent with what was configured in 0.1 & 0.2, i.e. $JBOSS_HOME/server/simulator/data/SccpStack_sccprouter2.xml and $JBOSS_HOME/server/simulator/data/SccpStack_sccpresource2.xml (NEVER run the simulator previous to the server, as it might overwrite the server configuration). 7) Just in case, make sure TCAP/MAP settings is as follows: ![7_ss7sim_tcap_settings](https://cloud.githubusercontent.com/assets/14883482/17150227/fe6caa42-5344-11e6-89c0-24de4978b29f.png) and ATI_TEST_SERVER is set, then click "Run Test" ![6_ss7sim_tcap](https://cloud.githubusercontent.com/assets/14883482/17150218/f853c488-5344-11e6-9b13-d34d5e070932.png) 8) On the window that pops up, click on "Start". After some seconds, you should see that SCTP state is connected and M3UA is active, like in the following image: ![8_ss7sim_started_sctpconnectedm3uaactive](https://cloud.githubusercontent.com/assets/14883482/17150376/8bb2b75c-5345-11e6-962f-fcb580675fa6.png) In the server console log, you should see something like this: 14:31:31,775 INFO [SelectorThread](Thread-37) Connected Association [name=ass1, associationType=SERVER, ipChannelType=SCTP, hostAddress=, hostPort=0, peerAddress=127.0.0.1, peerPort=8011, serverName=serv1, extraHostAddress=[]] 14:31:31,776 INFO [AssociationHandler](Thread-37) New association setup for Association=ass1 with 10 outbound streams, and 32 inbound streams. 14:31:31,825 WARN [SccpStackImpl-SccpStack](pool-27-thread-1) Rx : MTP-RESUME: AffectedDpc=1 You are then set to test. 9) Open a browser and perform an HTTP GET test, for example: http://192.168.26.128:8080/restcomm?msisdn=59898437910 (if you are binded to 192.168.26.128) You should immediately receive the following "hardcoded" response: mcc=250,mnc=1,lac=32000,cellid=221,aol=5,vlrNumber=5555555666 Meanwhile, in the server console log, you should read something like this: 14:40:50,911 INFO [MobileCoreNetworkInterfaceSbb](SLEE-EventRouterExecutor-0-thread-1) HTTP Request received and response sent. If you check the SS7 simulator (where the MAP ATI was sent and responded back), you should be able to see the following request and response (click on "Open Event Window" on each event logged): ![9_ss7sim_map-ati_req_eventwindow](https://cloud.githubusercontent.com/assets/14883482/17150555/48f0c48a-5346-11e6-965c-ed372805a563.png) ![10_ss7sim_map-ati_resp_eventwindow](https://cloud.githubusercontent.com/assets/14883482/17150565/527c2ab2-5346-11e6-8f7e-9b0e4613e2c9.png) 10) Try an HTTP POST, for example, by issuing the following command on a terminal window at $JBOSS_HOME/bin (the following assumes the server is running binded to 192.168.26.128): curl -X POST -d @mlpreq.txt http://192.168.26.128:8080/restcomm mlpreq.txt is like this (you may change the MSISDN): ` USERNAME PASSWORD SERVICEID 59899077937 15 ` You should receive the following "hardcoded" response: ` 59899077937 27 28 25.00S 153 01 43.00E 5000 ` In the server console log, you should see something like this: Parsed location request for MSISDN: 59899077937 14:44:31,083 INFO [MobileCoreNetworkInterfaceSbb](SLEE-EventRouterExecutor-7-thread-1) Generated response XML: ` 59899077937 27 28 25.00S 153 01 43.00E 5000 ` 14:44:31,083 INFO [MobileCoreNetworkInterfaceSbb](SLEE-EventRouterExecutor-7-thread-1) HTTP Request received and response sent. Looking forward for your feedback Best regards
johnnyAnd commented 8 years ago

@FerUy I am going to test this after doing ant again. on it.

Vanit commented 8 years ago

@JohnTet Thanks for your persistence here, I can confirm the 503 you encountered is a legitimate bug caused by conflicting dependencies in the Jboss boot sequence. The old version of the servlet is being loaded via org.mobicents.slee.container.management.jmx.DeploymentMBeanImpl. Will be resolving this via reopening #46, so please continue any discussion there.