Payara Micro ConfigProperty "payara.instance.https.port" not working correctly - payara

Currently I use payara-micro-4.1.2.174 and microprofile-config-api.version 1.2.1 and injected follow:
but always get the http Port and not the https port.
"#Inject #ConfigProperty(name="payara.instance.https.port") int httpsPort;"
Why am I getting the http port and not the https port?

Payara Micro does not start an SSL port by default, you need to specify it on the command line with --sslport. Auto binding is also supported with the --autobindssl option.
Once the SSL port is present, then the #ConfigProperty injection should work, if not, then that would be a bug to be raised on GitHub.

Related

How send request from react native to local server

I am using android emulator and when i send request to localhost it gives me error. I have tried the forwarding the port also ngrok but none of them worked for me. It always gives me error.
[Error:Network Error].
IN Emulator go to setting->click on Network and Internet ->then select Internet->select available network and then re-run your project and check it will work
Please try http://10.0.2.2:8080 instead of localhost:8080. If you are referring your localhost on your system from the Android emulator then you have to use http://10.0.2.2:8080/ Because Android emulator runs in a Virtual Machine therefore here 127.0.0.1 or localhost will be emulator's own loopback address.
Original Answer Source

Moodle unable to access using domainName

Installing MOODLE_33_STABLE origin/MOODLE_33_STABLE on Ubuntu 16.04.2
I am able to install it and , access it with my vm's ip,
but when i try to change
$CFG->wwwroot = 'http://ipaddress'
to
$CFG->wwwroot = 'http://somerandomname.com'
in config.php,
i am unable to access it using somerandomname.com in my lan.
i have also mapped the vm ip in hosts file of both apache2 and of the other systems in lan, still it shows HTTP ERROR 502, in chrome.
and Host not found when i check the chrome console.
if i am missing something guide me.
i want to access the moodle installed on my VM across my local connection with some domainname rather than the IP .
Thank you.
Sounds like you have to try classical debugging:
Try to access your moodle instance on the specific port, using eg. telnet
telnet somerandomname.com 80
Delete browser cache or open the URL in your incognito mode
Check the apache error log on Ubuntu: /var/log/apache2/error.log.
Check out further possibilities which are causing this 502 error:
https://www.lifewire.com/502-bad-gateway-error-explained-2622939

Using Angular Ionic and node.js - how to listen to the server?

I am relatively new to node.js and super new to Ionic and am super confused. As I was looking online for answers, I came across one blog which would say that I have to runnodejs server using node (in my case) nam start and the app using ionic serve, so lets say I am listening on port 3000, it wouldn't be http://localhost:3000 but something like http://123.456.789.123:3000
I assume that both must listen on the same port?! so if my node.js is listening on port 3000, my ionic must listen on 3000 too?
Running live reload server: http://localhost:35729
Running dev server: http://localhost:8100
I don't understand what http://localhost:35729 means - is it correct to say that Im listening on port 8100
I tried to set my node.js server to listen on port 8100 (probably all wrong what I did) and it doesn't work- can't see anything when I type ip address::8100
Thank you!!

Timed out error on starting Webdriver server when connected to network via VPN

In my protractor config file, I had this line, seleniumAddress: 'http://localhost:4444/wd/hub'. On running Protractor I was getting an error "ECONNREFUSED connect ECONNREFUSED". After going through lot of other existing issues and solutions, I removed "seleniumAddress" property. That resolved the issue. Selenium standalone server gets started. "Selenium standalone server started at http://192.168.1.156:64477/wd/hub"
But when I turn on the VPN, then I get an error "Error: Timed out waiting for the WebDriver server at http://192.168.1.156:63199/wd/hub", which I have been not able to resolve.
I am on a HP laptop which has Windows 7 Professional and I am using Cisco VPN.
(Hi, so I can't comment yet (low rep)...)
Could you try running webdriver-manager start before running protractor? It will run in the address http://localhost:4444/wd/hub which is the seleniumAddress referred to in the protractor config. Does that change anything?
This might be related (VPN-workaround): protractor stand alone selenium fails: Error: Timed out waiting for the WebDriver server at
Check the settings of the firewall that stays between Selenium standalone server (which might run also on your local host) and your working station (usually your localhost).
In my case (running on local Linux station) I had a very restrictive iptables firewall rules such that the WebDriver process launched on localhost could not access the Selenium standalone server which also run on localhost at whatever TCP port.
Just try to turn it off and check if that is the case ; then accommodate your firewall settings such that the respective connection passes your firewall rules.
If you want your scripts communicate directly with the Firefox|Chrome Driver (bypassing the Selenium server entirely) then try adding the directConnect: true in your protractor.conf.js
Git and other tools, often use the git: protocol for accessing files
in remote repositories. Some firewall configurations are blocking
git:// URLs, which leads to errors when trying to clone repositories
or download dependencies. (For example corporate firewalls are
"notorious" for blocking git:.)
If you run into this issue, you can force the use of https: instead,
by running the following command: git config --global
url."https://".insteadOf git://
(see Common Issues on Angular tutorial)

How to use taskqueues with GAE 1.7.7 behind a proxy

I upgraded to GAE 1.7.7 today and found out that task queues stopped working on my development setup.
I'm using https on my development environment through an nginx set up to proxy the connections from fakedomain.local:80 and fakedomain.local:443 to localhost:8080 (where GAE listens).
With this setup, taskqueues end up being created to be executed at fakedomain.local:80. This used to work because the request would be picked up by nginx, but the version 1.7.7 of the development server seems to have a port registry which won't serve a request unless the port is known (if I understand google.appengine.tools.devappserver2.Dispatcher._resolve_target correctly). Of course, GAE listens on port 8080 and my tasks marked to run on fakedomain.local:80 never get executed (GAE logs this error: An error occured while sending the task "task1" (Url: "...") in queue...).
I tried patching dispatcher.py:577 so instead of raising a ServerDoesNotExistError when the port is not known it will just use the default server. With this modification I can get the taskqueues running again, but I'd rather use a solution which doesn't involve changing GAE's code.
How can I make GAE register the port 80 and 443 in version 1.7.7? Alternatively, is there a way I could specify the complete target URL for the task? (ie fakedomain.local:8080/my_task, instead of just /mytask).
taskqueue.add(target=taskqueue.DEFAULT_APP_VERSION, ...)
will run it on your default app, which should do exactly what you want.
taskqueue.DEFAULT_APP_VERSION =>
app_identity.get_default_version_hostname() =>
environ['DEFAULT_VERSION_HOSTNAME'] =>
'%s:%s' % (environ['SERVER_NAME'], server_port)

Resources