Hey All,
I've been going through the forums trying to solve this one, but can't seem to get it. I created a Jserver as a webhook for SMS return messages from Nexmo (vonage). I tested it on my local PC running Windows with Postman emulating the SMS service. It receives the returned SMS and stores it into a SQLlite database. Another Handler is called from my B4J program and checks for any unprocessed messages. If there are any, it downloads the data and marks the sqlite record as processed. After 30 days the processed sqlite records are automatically removed.
I set up a VPS using IONOS.com.
Installed Java
SFTP'd my Jserver app "EVsms" to the VPS server /opt/evSMS
I'm using port 9955 for my application.
I opened the port in the firewall.
Then I started it:
Checking the port gives me:
So it looks like everything works, but when I go to test it from Postman I get <crickets> No connection
http://198.71.48.56:9955/test
Not even an error message saying bad data, just no connection.
What did I forget to do?
Thanks,
Jim
I've been going through the forums trying to solve this one, but can't seem to get it. I created a Jserver as a webhook for SMS return messages from Nexmo (vonage). I tested it on my local PC running Windows with Postman emulating the SMS service. It receives the returned SMS and stores it into a SQLlite database. Another Handler is called from my B4J program and checks for any unprocessed messages. If there are any, it downloads the data and marks the sqlite record as processed. After 30 days the processed sqlite records are automatically removed.
I set up a VPS using IONOS.com.
Installed Java
SFTP'd my Jserver app "EVsms" to the VPS server /opt/evSMS
I'm using port 9955 for my application.
I opened the port in the firewall.
B4X:
iptables -I INPUT -p tcp -m tcp --dport 9955 -j ACCEPT
Then I started it:
B4X:
nohup java -jar /opt/evSMS/EVsms.jar > nohup.out &
cat nohup.out
2020-06-12 19:14:40.829:INFO::main: Logging initialized @248ms to org.eclipse.jetty.util.log.StdErrLog
2020-06-12 19:14:41.259:INFO:oejs.Server:main: jetty-9.4.z-SNAPSHOT; built: 2018-05-03T15:56:21.710Z; git: daa59876e6f384329b122929e70a80934569428c; jvm 11.0.7+10-post-Ubuntu-2ubuntu218.04
2020-06-12 19:14:41.322:INFO:oejs.session:main: DefaultSessionIdManager workerName=node0
2020-06-12 19:14:41.322:INFO:oejs.session:main: No SessionScavenger set, using defaults
2020-06-12 19:14:41.327:INFO:oejs.session:main: node0 Scavenging every 600000ms
2020-06-12 19:14:41.336:INFO:oejsh.ContextHandler:main: Started o.e.j.s.ServletContextHandler@365185bd{/,file:///opt/evSMS/www,AVAILABLE}
2020-06-12 19:14:41.338:INFO:oejs.AbstractNCSARequestLog:main: Opened /opt/evSMS/logs/b4j-2020_06_12.request.log
2020-06-12 19:14:41.362:INFO:oejs.AbstractConnector:main: Started ServerConnector@6c7f32ad{HTTP/1.1,[http/1.1]}{0.0.0.0:9955}
2020-06-12 19:14:41.362:INFO:oejs.Server:main: Started @789ms
Server started
Checking the port gives me:
B4X:
sudo nc -w5 -z -v 198.71.48.56 9955
Connection to 198.71.48.56 9955 port [tcp/*] succeeded!
sudo lsof -i -P -n | grep LISTEN
systemd-r 600 systemd-resolve 13u IPv4 22612 0t0 TCP 127.0.0.53:53 (LISTEN)
java 26266 root 11u IPv6 764759 0t0 TCP *:9955 (LISTEN)
So it looks like everything works, but when I go to test it from Postman I get <crickets> No connection
http://198.71.48.56:9955/test
Not even an error message saying bad data, just no connection.
What did I forget to do?
Thanks,
Jim
Last edited: