OroCommerce Forums

Covering OroCommerce topics, including community updates and company announcements.

Forums OroCommerce OroCommerce 4.0 – 401 error – infinit loop reload

This topic contains 4 replies, has 2 voices, and was last updated by  nmella1 2 months, 1 week ago.

  • Creator
    Topic
  • #40353

    nmella1
    Participant

    Hi guys,

    I am testing OroCommerce 4.0. I followed this guide, and I can access the frontend but I can’t login to the backend.

    After success login to the backend, I have an infinite reload loop, so I can’t do anything. It is similar to this post:

    https://forum.oroinc.com/orocrm/orocrm-installationtechnical-issues-or-problems/topic/orocrm-3.1.6-admin-panel-401-error-on-apirestlatestnavigationitemspinbar

    When checking the browser console, I get 403 and 401 error on this files:

    https://www.mercadob2b.cl/admin/sync/ticket (403)
    https://www.mercadob2b.cl/admin/api/rest/latest/navigationitems/pinbar (401)

    Supervisor seems to be OK:

    Nginx proxy configuratoin is:

    server {
    listen 80;
    server_name http://www.mercadob2b.cl;
    return 301 https://www.mercadob2b.cl$request_uri;
    }

    server {
    listen 443 ssl;
    server_name http://www.mercadob2b.cl;
    error_log /var/log/nginx/www.mercadob2b.cl-error.log error;
    #access_log /var/log/nginx/www.mercadob2b.cl-access.log;

    ssl on;
    ssl_certificate /etc/letsencrypt/live/www.mercadob2b.cl/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/www.mercadob2b.cl/privkey.pem;
    ssl_session_cache shared:SSL:10m;
    ssl_session_timeout 5m;
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    ssl_prefer_server_ciphers on;
    ssl_dhparam /etc/nginx/ssl/dhparams.pem;
    ssl_ciphers “ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA:ECDHE-ECDSA-AES128-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA256”;

    location / {
    proxy_pass http://192.168.0.12/;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-for $proxy_add_x_forwarded_for;
    proxy_set_header Host $host;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_pass_header X-CSRFToken;
    proxy_connect_timeout 600;
    proxy_read_timeout 600;
    proxy_send_timeout 600;
    client_max_body_size 1024M; # Set higher depending on your needs
    }
    }

    Nginx internal server configuration is:

    server {
    listen 80;
    server_name http://www.mercadob2b.cl;

    root /usr/share/nginx/html/oroapp4/public;

    error_log /var/log/nginx/mercadob2b.cl_http_error.log;
    access_log /var/log/nginx/mercadob2b.cl_http_access.log;

    index index.php;

    sendfile on;
    tcp_nopush on;
    tcp_nodelay on;

    # Increase this value in file uploads is allowed for larger files
    client_max_body_size 8m;

    gzip on;
    gzip_proxied any;
    gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
    gzip_vary on;

    try_files $uri $uri/ @rewrite;

    location @rewrite {
    rewrite ^/(.*)$ /index.php/$1;
    }

    #location / {
    # try_files $uri /index.php$is_args$args;
    #}

    location ~ /\.ht {
    deny all;
    }

    location ~* ^[^(\.php)]+\.(jpg|jpeg|gif|png|ico|css|txt|bmp|js)$ {
    add_header Cache-Control public;
    expires 1h;
    access_log off;
    }

    location ~ [^/]\.php(/|$) {
    fastcgi_split_path_info ^(.+?\.php)(/.*)$;
    if (!-f $document_root$fastcgi_script_name) {
    return 404;
    }
    }
    include fastcgi_params;
    fastcgi_pass 127.0.0.1:9000;
    fastcgi_index index.php;
    fastcgi_intercept_errors on;
    fastcgi_connect_timeout 300;
    fastcgi_send_timeout 300;
    fastcgi_read_timeout 300;
    fastcgi_buffer_size 128k;
    fastcgi_buffers 4 256k;
    fastcgi_busy_buffers_size 256k;
    fastcgi_temp_file_write_size 256k;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    fastcgi_param PATH_INFO $fastcgi_path_info;
    #fastcgi_param HTTPS on;
    }

    # Websockets connection path (configured in config/parameters.yml)
    location /ws {
    reset_timedout_connection on;

    # prevents 502 bad gateway error
    proxy_buffers 8 32k;
    proxy_buffer_size 64k;

    # redirect all HTTP traffic to localhost:8080;
    proxy_set_header Host $http_host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-NginX-Proxy true;
    proxy_set_header X-Forwarded-Proto $scheme;

    proxy_pass http://127.0.0.1:8080/;
    proxy_redirect off;
    proxy_read_timeout 86400;

    # enables WS support
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection “upgrade”;

    error_log /var/log/nginx/error_ws_error.log;
    access_log /var/log/nginx/access_ws_access.log;
    }
    }

    The configuration parameters.yml is:

    I have cleaned cached, clear cookies, but still, my admin backend is reloading constantly.

    Appreciate any hint !

    Thanks !

    Attachments:
Viewing 4 replies - 1 through 4 (of 4 total)
  • Author
    Replies
  • #40357
    Andrey Yatsenko
    Andrey Yatsenko
    Moderator

    Hi,

    Have you applied the patch from the last answer for the index.php file?

    #40365

    nmella1
    Participant

    Thank you! Yes, it worked fine after applying the patch!

    #40367

    nmella1
    Participant

    Thank you. The patched worked !

    #40368

    nmella1
    Participant

    I just figure out that adding this patch to the index.php make it worked on the Oro Backend, but the Oro Frontend is now not loading…

    So it solved the original problem, but it gives a new error.

    Applied patch:

    I’ll let you know if I found the solution.

Viewing 4 replies - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

You will be redirected to [title]. Would you like to continue?

Yes No