Feb 17 13:24:07 microservice-1st systemd[27709]: myapp.service: Failed to locate executable /.nvm/versions/node/v20.11.0/bin/npm>
Feb 17 13:24:07 microservice-1st systemd[27709]: myapp.service: Failed at step EXEC spawning /.nvm/versions/node/v20.11.0/bin/np>
Feb 17 13:24:07 microservice-1st systemd[1]: myapp.service: Main process exited, code=exited, status=203/EXEC
Feb 17 13:24:07 microservice-1st systemd[1]: myapp.service: Failed with result 'exit-code'.
Feb 17 13:24:07 microservice-1st systemd[1]: myapp.service: Scheduled restart job, restart counter is at 5.
Feb 17 13:24:07 microservice-1st systemd[1]: Stopped My Application.
Feb 17 13:24:07 microservice-1st systemd[1]: myapp.service: Start request repeated too quickly.
Feb 17 13:24:07 microservice-1st systemd[1]: myapp.service: Failed with result 'exit-code'.
Feb 17 13:24:07 microservice-1st systemd[1]: Failed to start My Application.
this.httpService.get<any>(`${ip}`, { headers: {
'code': `${encodeURIComponent(code)}`,
'version': `${versionVk}`,
'access': `${access}`,
},
})
118.194.251.101 - - [12/Feb/2024:16:30:52 +0000] "GET / HTTP/1.1" 301 169 "-" "curl/7.29.0" "-" "-" "-" "-"
118.194.251.101 - - [12/Feb/2024:16:30:54 +0000] "\x16\x03\x01\x00\xEE\x01\x00\x00\xEA\x03\x03*4\x8D\xD7\xA5\xF8\xC9I\xAE\xF9\xFA\xFDv\xAF\x16\xC6{=W1\x9D\xB1\xE5\x95$wC\xC6AQ\xB3\xD3 \xB2\xB8\xD6!mA\x97\x8B\xA2H\xE0\xBD\x97\xCD\x92AJ\x95\xC8i`\xDBTu\xF6G\xCC\xBCy\xBC\x8C\xC2\x00&\xC0+\xC0/\xC0,\xC00\xCC\xA9\xCC\xA8\xC0\x09\xC0\x13\xC0" 400 157 "-" "-" "-" "-" "-" "-"
118.194.251.101 - - [12/Feb/2024:16:30:54 +0000] "t3 12.1.2" 400 157 "-" "-" "-" "-" "-" "-"
this.httpService.get<any>(`${ip}`, { headers: {
'code': `${encodeURIComponent(code)}`,
'version': `${versionVk}`,
'access': `${access}`,
},
})
http {
map $http_code $custom_code {
default "-";
"~^(?P<code>.*)$" $code;
}
map $http_versionvk $custom_versionvk {
default "-";
"~^(?P<versionvk>.*)$" $versionvk;
}
map $http_access_token $custom_access_token {
default "-";
"~^(?P<access_token>.*)$" $access_token;
}
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for" '
'"$custom_code" "$custom_versionvk" "$custom_access_token"';
</code>
и вывод 45.79.181.223 - - [12/Feb/2024:15:57:07 +0000] "GET / HTTP/1.1" 301 169 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 13_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36" "-" "-" "-" "-"
и тут уже видно "-", "-", "-", "-": что нет данных почему то.
export default {
getCode: function(r) {
return r.headersIn['code'] || '-';
},
getVersionvk: function(r) {
return r.headersIn['versionVk'] || '-';
},
getAccessToken: function(r) {
return r.headersIn['access_token'] || '-';
},
logHeaders: function(r) {
var headers = '';
for (var key in r.headersIn) {
if (r.headersIn.hasOwnProperty(key)) {
headers += key + ': ' + r.headersIn[key] + ', ';
}
}
r.log(headers);
return '-';
}
};
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log notice;
pid /var/run/nginx.pid;
load_module modules/ngx_http_js_module.so;
events {
worker_connections 1024;
}
http {
js_import /etc/nginx/headers.js;
js_set $custom_code headers.get_code;
js_set $custom_versionvk headers.get_versionvk;
js_set $custom_access_token headers.get_access_token;
js_set $log_headers headers.logHeaders; # Для отладки
resolver 8.8.8.8;
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for" '
'"$custom_code" "$custom_versionvk" "$custom_access_token" "$log_headers"';
access_log /var/log/nginx/access.log main;
sendfile on;
keepalive_timeout 65;
include /etc/nginx/conf.d/*.conf;
}