zu Bad Gateway
schau nochmal ob das alexa plugin auch auf port 9000 lauscht.
PHP-Code:
pi@pi_hq:~ $ sudo netstat -tupl | grep 9000 tcp 0 0 *:9000 *:* LISTEN 16232/python3
pi@pi_hq:~ $ sudo netstat -tupl | grep 9000 tcp 0 0 *:9000 *:* LISTEN 16232/python3
Response:
{
"errorMessage": "getaddrinfo ENOTFOUND https://xyz.myfritz.net https://xyz.myfritz.net:443",
"errorType": "Error",
"stackTrace": [
"errnoException (dns.js:26:10)",
"GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:77:26)"
]
}
Request ID:
"c4c61a06-f83d-11e7-b3fc-03fb1dd09bee"
Function Logs:
START RequestId: c4c61a06-f83d-11e7-b3fc-03fb1dd09bee Version: $LATEST
2018-01-13T08:43:03.713Z c4c61a06-f83d-11e7-b3fc-03fb1dd09bee requesting {"header":{"payloadVersion":"2","namespace":"Alexa.ConnectedHome.Discovery","name":"DiscoverAppliancesRequest","messageId":"F8752B11-69BB-4246-B124-3BFB27C06C7D"},"payload":{}}
2018-01-13T08:43:03.793Z c4c61a06-f83d-11e7-b3fc-03fb1dd09bee request failed { [Error: getaddrinfo ENOTFOUND https://xyz.myfritz.net https://xyz.myfritz.net:443]
code: 'ENOTFOUND',
errno: 'ENOTFOUND',
syscall: 'getaddrinfo',
hostname: 'https://xyz.myfritz.net',
host: 'https://xyz.myfritz.net',
port: '443' }
2018-01-13T08:43:03.812Z c4c61a06-f83d-11e7-b3fc-03fb1dd09bee {"errorMessage":"getaddrinfo ENOTFOUND https://xyz.myfritz.net https://hczx6l3zhygbdk21.myfritz.net:443","errorType":"Error","stackTrace":["errnoException (dns.js:26:10)","GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:77:26)"]}
END RequestId: c4c61a06-f83d-11e7-b3fc-03fb1dd09bee
REPORT RequestId: c4c61a06-f83d-11e7-b3fc-03fb1dd09bee Duration: 159.55 ms Billed Duration: 200 ms Memory Size: 128 MB Max Memory Used: 25 MB
alexa:
class_name: Alexa
class_path: plugins.alexa
service_host: 127.0.0.1
service_port: 9000
2018-01-13 09:41:37 DEBUG plugin Main Starting alexa Plugin -- plugin.py:start:104
2018-01-13 09:41:37 DEBUG __init__ alexa Alexa: validating device esszimmer-lampe -- __init__.py:validate_devices:153
2018-01-13 09:41:37 DEBUG __init__ Main KNX[default]: 1.1.8 set 4/3/28 to 19.8 -- __init__.py:parse_telegram:348
2018-01-13 09:41:37 INFO __init__ alexa Alexa: providing 1 devices -- __init__.py:create_alias_devices:164
2018-01-13 09:41:37 INFO _cplogging BackendServer [13/Jan/2018:09:41:37] ENGINE Serving on http://192.168.178.125:8383 -- _cplogging.py:error:219
2018-01-13 09:41:37 DEBUG __init__ Main KNX[default]: write request from 1.1.8 to 4/3/28 with '07bc' and DPT 9 -- __init__.py:parse_telegram:360
2018-01-13 09:41:37 INFO service alexa Alexa: service starting -- service.py:start:27
2018-01-13 09:41:37 DEBUG __init__ BackendServer BackendServer: engine started -- __init__.py:run:157
ll /etc/apache2/mods-enabled/php5.* -bash: ll: Kommando nicht gefunden. [root@SmartHomeNG ~]# sudo apt-get install libapache2-mod-php5 Paketlisten werden gelesen... Fertig Abhängigkeitsbaum wird aufgebaut. Statusinformationen werden eingelesen.... Fertig Paket libapache2-mod-php5 ist nicht verfügbar, wird aber von einem anderen Paket referenziert. Das kann heißen, dass das Paket fehlt, dass es abgelöst wurde oder nur aus einer anderen Quelle verfügbar ist. E: Für Paket »libapache2-mod-php5« existiert kein Installationskandidat.
server {
server_tokens off;
## Blocken, wenn Zugriff aus einem nicht erlaubten Land erfolgt ##
if ($allowed_country = no) {
return 403;
}
# https://www.cyberciti.biz/tips/linux-unix-bsd-nginx-webserver-security.html
## Block download agents ##
if ($http_user_agent ~* LWP::Simple|BBBike|wget) {
return 403;
}
## Block some robots ##
if ($http_user_agent ~* msnbot|scrapbot) {
return 403;
}
## Deny certain Referers ##
if ( $http_referer ~* (babes|forsale|girl|jewelry|love|nudit|organic|poker|porn|sex|teen) )
{
return 403;
}
## MEIN SERVER WIRD HIER EINGETRAGEN DYNDNS ODER FRITZBOX XYZ.myfritz.net##
listen 443 ssl default_server;
server_name XYZ.myfritz.net;
##
# SSL
##
## Activate SSL, setze SERVER Zertifikat Informationen ##
# Generiert via Let's Encrypt!
ssl on;
ssl_certificate /etc/letsencrypt/live/XYZ.myfritz.net/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/XYZ.myfritz.net/privkey.pem;
ssl_session_cache builtin:1000 shared:SSL:10m;
ssl_prefer_server_ciphers on;
# unsichere SSL Ciphers deaktivieren!
ssl_ciphers HIGH:!aNULL:!eNULL:!LOW:!3DES:!MD5:!RC4;
##
# HSTS
##
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
##
# global
##
root /var/www/XYZ.myfritz.net;
index index.php index.htm index.html;
# Weiterleitung zu SmartHomeNG (Websocket Schnittstelle) mit Basic Auth
location / {
auth_basic "Restricted Area: smartVISU";
auth_basic_user_file /etc/nginx/.smartvisu;
# Zugreifendes Land erlaubt?
if ($allowed_country = no) {
return 403;
}
# Nur Websocket Verbindungen gegen "/" durchlassen!
if ($http_upgrade = websocket) {
proxy_pass http://192.168.178.125:80;
}
if ($http_upgrade != websocket) {
return 403;
}
}
# Zugriff auf die SmartVISU mit Basic Auth
location /smartVISU {
auth_basic "Restricted Area: smartVISU";
auth_basic_user_file /etc/nginx/.smartvisu;
# Zugreifendes Land erlaubt?
if ($allowed_country = no) {
return 403;
}
proxy_pass http://192.168.178.125/smartVISU;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
# Alexa Plugin Weiterleitung
location /alexa {
auth_basic "Restricted Area: Alexa";
auth_basic_user_file /etc/nginx/.alexa;
# Zugreifendes Land erlaubt?
if ($allowed_country = no) {
return 403;
}
proxy_pass http://192.168.178.125:9000/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
# Network Plugin Weiterleitung
location /shng {
auth_basic "Restricted Area: SmartHomeNG";
auth_basic_user_file /etc/nginx/.shng;
if ($allowed_country = no) {
return 403;
break;
}
proxy_pass http://192.168.178.125:8090/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
##
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# https://www.nginx.com/resources/wiki/start/
# https://www.nginx.com/resources/wiki/start/topics/tutorials/config_pitfalls/
# https://wiki.debian.org/Nginx/DirectoryStructure
#
# In most cases, administrators will remove this file from sites-enabled/ and
# leave it as reference inside of sites-available where it will continue to be
# updated by the nginx packaging team.
#
# This file will automatically load configuration files provided by other
# applications, such as Drupal or Wordpress. These applications will be made
# available underneath a path with that package name, such as /drupal8.
#
# Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.
##
# Default server configuration
#
server {
listen 80 default_server;
listen [::]:80 default_server;
include /etc/nginx/snippets/letsencrypt.conf;
# SSL configuration
#
# listen 443 ssl default_server;
# listen [::]:443 ssl default_server;
#
# Note: You should disable gzip for SSL traffic.
# See: https://bugs.debian.org/773332
#
# Read up on ssl_ciphers to ensure a secure configuration.
# See: https://bugs.debian.org/765782
#
# Self signed certs generated by the ssl-cert package
# Don't use them in a production server!
#
# include snippets/snakeoil.conf;
root /var/www/html;
# Add index.php to the list if you are using PHP
index index.html index.htm index.nginx-debian.html index.php;
server_name _;
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ =404;
}
# pass PHP scripts to FastCGI server
#
#location ~ \.php$ {
# include snippets/fastcgi-php.conf;
#
# # With php-fpm (or other unix sockets):
# fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
# # With php-cgi (or other tcp sockets):
# fastcgi_pass 127.0.0.1:9000;
#}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}
# Virtual Host configuration for example.com
#
# You can move that to a different file under sites-available/ and symlink that
# to sites-enabled/ to enable it.
#
#server {
# listen 80;
# listen [::]:80;
#
# server_name example.com;
#
# root /var/www/example.com;
# index index.html;
#
# location / {
# try_files $uri $uri/ =404;
# }
#}
root@pi_hq:/home/pi# ll /etc/apache2/mods-enabled/php5.*
lrwxrwxrwx 1 root root 27 Dec 19 20:21 /etc/apache2/mods-enabled/php5.conf -> ../mods-available/php5.conf
lrwxrwxrwx 1 root root 27 Dec 19 20:21 /etc/apache2/mods-enabled/php5.load -> ../mods-available/php5.load
sudo apt-get install libapache2-mod-php5
[B]Base:[/B] [URL="https://downloads.raspberrypi.org/raspbian_lite_latest"]Raspbian "stretch lite"[/URL] from November, 29th 2017. Kernel 4.9.70-v7+
SmartHomeNG ~]# apt-get install php5-fpm Paketlisten werden gelesen... Fertig Abhängigkeitsbaum wird aufgebaut.... 50% Abhängigkeitsbaum wird aufgebaut. Statusinformationen werden eingelesen.... Fertig Paket php5-fpm ist nicht verfügbar, wird aber von einem anderen Paket referenziert. Das kann heißen, dass das Paket fehlt, dass es abgelöst wurde oder nur aus einer anderen Quelle verfügbar ist.
/* [root@SmartHomeNG ~]# sudo ps fax | grep nginx 6558 pts/1 S+ 0:00 | \_ grep nginx 5005 ? Ss 0:00 nginx: master process /usr/sbin/nginx -g daemon on; master_process on; 5953 ? S 0:00 \_ nginx: worker process 5954 ? S 0:00 \_ nginx: worker process 5956 ? S 0:00 \_ nginx: worker process 5958 ? S 0:00 \_ nginx: worker process [root@SmartHomeNG ~]# sudo netstat -tupl | grep ngin tcp 0 0 0.0.0.0:http 0.0.0.0:* LISTEN 5005/nginx: master tcp 0 0 0.0.0.0:https 0.0.0.0:* LISTEN 5005/nginx: master tcp6 0 0 [::]:http [::]:* LISTEN 5005/nginx: master [root@SmartHomeNG ~]#
[root@SmartHomeNG ~]# ps fax | grep nginx 13393 pts/0 S+ 0:00 | \_ grep nginx
pi@pi_hq:~ $ sudo ps fax | grep nginx
17238 pts/0 S+ 0:00 \_ grep --color=auto nginx
735 ? Ss 0:00 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
736 ? S 0:12 \_ nginx: worker process
737 ? S 0:09 \_ nginx: worker process
738 ? S 0:07 \_ nginx: worker process
739 ? S 0:12 \_ nginx: worker process
pi@pi_hq:~ $ sudo netstat -tupl | grep ngin
tcp 0 0 *:http *:* LISTEN 735/nginx -g daemon
tcp 0 0 *:https *:* LISTEN 735/nginx -g daemon
START RequestId: f789d133-f5fb-11e7-ab50-bfdfe01a49a1 Version: $LATEST
2018-01-10T11:46:59.997Z f789d133-f5fb-11e7-ab50-bfdfe01a49a1 [DEBUG] Discovery Request: {"header":{"payloadVersion":"2","namespace":"Alexa.ConnectedHome.Discovery","name":"DiscoverAppliancesRequest","messageId":"F8752B11-69BB-4246-B124-3BFB27C06C7D"},"payload":{}}
2018-01-10T11:47:00.036Z f789d133-f5fb-11e7-ab50-bfdfe01a49a1 TypeError: Cannot read property 'trim' of undefined
at handleDiscovery (/var/task/index.js:203:56)
at exports.handler (/var/task/index.js:377:13)
END RequestId: f789d133-f5fb-11e7-ab50-bfdfe01a49a1
REPORT RequestId: f789d133-f5fb-11e7-ab50-bfdfe01a49a1 Duration: 128.68 ms Billed Duration: 200 ms Memory Size: 128 MB Max Memory Used: 20 MB
RequestId: f789d133-f5fb-11e7-ab50-bfdfe01a49a1 Process exited before completing request

Wir verarbeiten personenbezogene Daten über die Nutzer unserer Website mithilfe von Cookies und anderen Technologien, um unsere Dienste bereitzustellen. Weitere Informationen findest Du in unserer Datenschutzerklärung.
Indem Du unten auf "ICH stimme zu" klickst, stimmst Du unserer Datenschutzerklärung und unseren persönlichen Datenverarbeitungs- und Cookie-Praktiken zu, wie darin beschrieben. Du erkennst außerdem an, dass dieses Forum möglicherweise außerhalb Deines Landes gehostet wird und bist damit einverstanden, dass Deine Daten in dem Land, in dem dieses Forum gehostet wird, gesammelt, gespeichert und verarbeitet werden.


Einen Kommentar schreiben: