where can i find the logs of ionic and Loopback - ionic-framework

i want log files of the Loopback server where everthing is recorded

Related

Accessing localhost API from android device

I'm developing a Flutter app on a physical android device, I don't know much about networking and I'm having a trouble using an API from the phone to a local database on my laptop.
I reviewed all the answers in this post
Cannot connect to localhost API from Android app
Nothing seems to work for me, I'm using Apache server on XAMPP, and the API works just fine from the laptop (127.0.0.1:8000/api/Students) but when I try to access it from the phone it doesn't work (I replaced 127.0.0.1 with the IP of my laptop which I took from ipconfig)
XAMPP control panel
when I try to access the server from the phone using laptop-IP:80 it access normally the same with laptop-IP:80/phpmyadmin
XAMPP dashboard
but only when my phone is connected to the laptop mobile hotspot, when I connect the two devices to the same WIFI network it shows that it's unreachable:
but when I try laptop-IP:8000/api/Students this happens:
this site can't be reached
I tried to modify Apache httpd.conf:
#Listen 12.34.56.78:80
Listen 8000 <-- Added this
from what I understood this makes the server listens to port 8000 but I'm left with the same problem
NOTE: all the pictures show my attempts to use the API on my phone's Chrome browser
You need to do some tweaks to the url to access it in the device as localhost is only known to the machine not the devices on which the app is running.
The urls are different for different devices
Emulator
Real phone (with usb debugging)
1.Emulator
static const baseUrl = "http://10.0.2.2:8000";
2.Real Device
static const baseUrl = "http://localhost:8000";
Additionally you need to run these command in your cmd,
adb reverse tcp:8000 tcp:8000
Now your requests would go like:
get('$baseUrl/api/Students');

How to configure apache2 on Raspberry pi to serve https?

I am trying to use a Raspberry Pi 4 Model B as a small web server. It works fine for unsecured http, both within my home LAN and over the net. I have obtained a domain name and SSL certificate and key file. I am testing the server by accessing it within my local network using a browser and the Pi hostname. Unsecured http works fine, but making an https request results in a delay and then a "host refused to connect" message on the browser.
I have found conflicting instructions on the Web as to which Apache configuration file needs to be edited to include paths to the SSLCertificateFile and SSLCertificateKeyFile.
Within /etc/apache2 there are sites-available and sites-enabled subdirectories and more than one *.conf file, but apparently I have not edited the right one.
So, first, which is the correct configuration file to edit with the certificate paths, and second, does Apache produce a log file somewhere that would reveal any error messages produced by errors in the certificate?
I found a more complete set of instructions that showed how to add a port 443 virtual host to the default-000.conf file. It is working now.

Can't connect to localhost from my mobile

I developed some simple microservices that take data from a MongoDB database and return them in JSON format.
The database is on my machine, and so are the microservices.
When I start a microservices I can access data on my machine, for example connecting to
http://localhost:7003/projects
on my browser.
I want to get the data from my mobile phone too. So I connected it to the same network, and from my computer, using the ipconfig command I found that the IP address of the pc is 192.168.1.63
If I try to connect to http://192.168.1.63:7003/projects I can't get the data, though.
I searched for some solutions but I found nothing. Am I skipping some step?

Can't get CONNACK + KAASYNC message

I have configured the Kaa Server on Ubuntu 14.04. I have chosen MongoDB as log appender. When i execute my SDK on the same ubuntu machine the data gets inserted into the Mongo Database. But when i try to execute the SDk on Intel Edison board it gives me Can't get CONNACK+KAASYNC message. I have followed all the rules for installing the Kaa Server.
the logs links are
https://drive.google.com/open?id=0Bx5TGFxgyDWbSkZUVVUzbkhqSTA
https://drive.google.com/open?id=0Bx5TGFxgyDWbalNBZkZBMmRtajQ
Have you opened up the ports used by Kaa. If not Check "Firewall rules configuration" in this installation guide "http://docs.kaaproject.org/display/KAA/Installation+guide"
I think earlier, your app sdk and the kaa server must be on the same machine and hence you faced no issue. Now since intel edison needs to communicate with your kaa host as an external device, you need to configure your kaa host admin and also your log appenders with the external IP address of your kaa host. Pls refer to a similar issue mentioned in this question
It looks like you need to re-configure the Kaa instance for the correct 'Kaa host' setting, then regenerate the Kaa SDK and rebuild your application for Intel Edison board with that new SDK.
The 'Kaa host' should match the IP address of the host the kaa-node
instance is running on and be accessible from the application side by that
IP address. This configuration must be done before the SDK for the
application is generated as the bootstrap IP addresses are embedded into
the SDK.
Please check your node network configuration and re-generate the SDK for
the application.

VM from Google Cloud SQL rejecting connection

I have set up a google cloud sql server using the tutorial on youtube. However, Whenever I try to connect to it through the browser, the connect to it through the browser, the error i am getting is ERR_CONNECTION_REFUSED . The firewalls I have set up correlate to whats in the browser. I can also SSH into the VM. But the VM always rejects my connection. I have been trying for days.
Here are my VM Settings allowing http connections
Here is my VM External IP Address
Here is what the browser tells me when i attempt to connect.
Are you referring to this video https://www.youtube.com/watch?v=_kQXgjIfLgo?
In that video there are some steps missing such as install the web server (e.g. Apache) and PHP in the VM. After you install them, you can execute the following command in the VM:
php /var/www/index.php
If it works you can see the source code of the resulting page and if not you'll have an error to solve (maybe a package to install like php-mysql).
Once you can see the resulting page in the VM you can try to load the page through the browser of your machine. If it still doesn't work there is an Apache or network misconfiguration.